Stats for translations

This commit is contained in:
Michal Čihař 2012-03-05 13:48:25 +01:00
parent cef6a4ddd9
commit f27f2d0ee4

View File

@ -12,17 +12,26 @@
<h2>{% trans "Translations" %}</h2> <h2>{% trans "Translations" %}</h2>
<ul> <table>
<thead>
<tr>
<th>{% trans "Language" %}</th>
<th colspan="2">{% trans "Translated" %}</th>
<th>{% trans "Fuzzy" %}</th>
</tr>
<tbody>
{% for trans in object.translation_set.all %} {% for trans in object.translation_set.all %}
<li><a href="{{ trans.get_absolute_url }}">{% trans trans.language.name %} {% with trans.get_translated_percent as percent and trans.get_fuzzy_percent as fuzzy %}
{% if trans.fuzzy %} <tr>
{% blocktrans with trans.get_translated_percent as translated and trans.get_fuzzy_percent as fuzzy %}({{ translated }}% translated, {{ fuzzy }}% fuzzy){% endblocktrans %} <th><a href="{{ trans.get_absolute_url }}">{% trans trans.language.name %}</a></th>
{% else %} <td class="percent">{{ percent }}%</td>
{% blocktrans with trans.get_translated_percent as translated %}({{ translated }}% translated){% endblocktrans %} <td class="progress"><div class="progress" id="{{ percent|floatformat:0 }}"></div></td>
{% endif %} <td class="percent">{{ fuzzy }}%</td>
</a></li> </tr>
{% endwith %}
{% endfor %} {% endfor %}
</ul> </tbody>
</table>
{% url 'accounts.views.contact' as contact_url %} {% url 'accounts.views.contact' as contact_url %}