GitLab repository storage has been migrated to hashed layout. Please contact Infrastructure team if you notice any issues with repositories or hooks.

language_release_stats.html 4.29 KB
Newer Older
1 2
{# parent template has to define variable modstats #}

3
{% load i18n stats_extras %}
4

5
<table>
6
<tr>
7
  <td class="leftcell" colspan="3">{{ modstats.totaltransperc }}% ({{ modstats.totaltrans }}/{{ modstats.totalfuzzy }}/{{ modstats.totaluntrans }})</td>
8
  <td style="width: 108px; text-align: center;"><div class="graph">
9
      <div class="translated" style="width: {{ modstats.totaltransperc }}px;"></div>
10
      <div class="fuzzy" style="{{ LANGUAGE_BIDI|yesno:"right,left" }}:{{ modstats.totaltransperc }}px; width:{{ modstats.totalfuzzyperc }}px;"></div>
11
      {% with modstats.totaltransperc|add:modstats.totalfuzzyperc as upos %}
12
      <div class="untranslated" style="{{ LANGUAGE_BIDI|yesno:"right,left" }}:{{ upos }}px; width: {{ modstats.totaluntransperc }}px;"></div>
13 14 15 16
      {% endwith %}
     </div>
   </td>
</tr>
17
</table>
18

19 20
<table class="tablesorter" name="stats-table" id="stats-table">
<thead>
Claude Paroz's avatar
Claude Paroz committed
21 22 23 24
  <tr><th>{% trans "Module" %}</th><th>{% trans "Branch" %}</th>
      <th colspan="2">{% trans "Statistics" %}</th>
      <th>{% trans "Status" %}</th><th>{% trans "Date" %}</th>
  </tr>
25 26 27 28
</thead>
<tbody>
 {# empty line to not disturb tablesorter if 1st line is a colspan #}
 <tr style="display:none;"><td>mod</td><td>br</td><td>100</td><td></td><td>state</td><td></td></tr>
29
{% for catname,categ in modstats.categs.items %}
30
  {% if catname != "default" %}
31
    <tr class="subheader"><td colspan="6" class="leftcell" style="font-weight: bold; padding-top:1em;">
Claude Paroz's avatar
Claude Paroz committed
32
     {% with categ.cattransperc as percentage and categ.catname as categname %}
33 34
     {% blocktrans %}{{ categname }} ({{ percentage }}% translated){% endblocktrans %}
     {% endwith %}
35
    </td></tr>
36
  {% endif %}
37

38 39
  {% for module in categ.modules %}
    {% with module.0 as modname %}
40 41
    {% for branch, doms in module.1.items %}
     {% for dom in doms %}
Claude Paroz's avatar
Claude Paroz committed
42
      {% with dom.0 as domname and dom.1 as stat %}
43
      {% if stat and not stat.is_fake %}
44
        {% if stat.tr_percentage == 100 %}
45
          <tr id="{{ modname }}-{{ stat.domain.id }}-complete">
46 47
        {% else %}
          <tr>
48
        {% endif %}
49
        <td class="leftcell">
50
          {% if language %}
51
          <a href="{% url vertimus_by_names modname,branch,stat.domain.name,language.locale %}">{{ stat.module_description }}
52 53 54
          {% else %}
          <a href="{% url stats.views.module modname %}">{{ stat.module_description }}
          {% endif %}
55
          {% if stat.partial_po %}
56 57
            {# For a partial po, domain description is appended #}
            &bull; {{ domname }}
58
          {% endif %}
59
          </a>
60
          {% for err in stat.info_list %}
61
            <img src="{{ err.get_icon }}" title="{{ err.get_description|striptags }}" alt="{{ err.type }}" />
62
          {% endfor %}
63
          {% if stat|domain_type == "mallard" %}
64
            <img src="{{ MEDIA_URL }}img/mallard.png" width="18" title="{% trans "This document is written in Mallard documentation format" %}" alt="mallard icon"/>
65
          {% endif %}
66 67
        </td>
          <td><span class="branch">{{ branch }}</span></td>
68
          <td><span style="display:none;">{{ stat.tr_percentage }}</span>{{ stat|num_stats:scope }}</td>
69 70 71 72
          <td style="width: 108px; text-align: center;">
             <div class="graph">{{ stat|vis_stats:scope }}</div>
          </td>
          <td>
73
           {% if stat.state.name %}
74
             {% if stat.state.name != "None" %}
Claude Paroz's avatar
Claude Paroz committed
75
             <em><small>{{ stat.state.description }}</small></em></td>
76
             <td><span style="display: none;">{{ stat.state.updated|date:"c" }}</span><em><small>{{ stat.state.updated|date:"DATE_FORMAT" }}
77 78 79 80 81
             {% else %}
               {% if stat.state.last_comment %}
                 <span class="comment">{{ stat.state.last_comment|truncatewords:12 }}</span>
               {% endif %}
               </td><td>
82
             {% endif %}
83
           {% else %} </td><td>
84
           {% endif %}
85
          </td>
86 87 88
        </tr>
      {% endif %}
      {% endwith %}
89
     {% endfor %}
90 91 92 93
    {% endfor %}
    {% endwith %}
  {% endfor %}
{% endfor %}
94
</tbody>
95 96
</table>

97 98 99 100
{% if modstats.all_errors %}
  <h3>{% trans "Error summary" %}</h3>
  <ul>
  {% for err in modstats.all_errors %}
101
    <li><img src="{{ err.get_icon }}" alt="{{ err.type }}" /> {{ err.statistics.module_name }}:<br />
102
        <span class="error">{{ err.get_description|safe }}</span></li>
103 104 105
  {% endfor %}
  </ul>
{% endif %}
106