Commit 299e8b60 authored by Michal Čihař's avatar Michal Čihař

Initial rewrite of translations listing

Signed-off-by: default avatarMichal Čihař <michal@cihar.com>
parent 7d1f6af2
{% load i18n %}
{% load translations %}
<table class="sort">
<table class="sort table">
<thead>
<tr>
<th>{% if show_language == 1 %}{% trans "Language" %}{% else %}{% trans "Project" %}{% endif %}</th>
......@@ -18,7 +19,7 @@
<tr>
<th><a href="{{ trans.get_absolute_url }}">{% if show_language == 1 %}{{ trans.language }}{% else %}{{ trans.subproject }}{% if show_language == 2 %} ({{ trans.language }}){% endif %}{% endif %}</a></th>
<td>{% if trans.is_user_locked %}<span class="ui-icon ui-icon-locked tooltip">{{ trans.get_lock_display }}</span>{% endif %}</td>
<td><div class="progress" data-value="{{ percent|floatformat:0 }}" data-fuzzy="{{ fuzzy|floatformat:0 }}" data-checks="{{ check_percent|floatformat:0 }}"></div></td>
<td class="progress-cell">{% translation_progress trans False %}</td>
<td class="percent">{{ percent }}%</td>
<td class="percent" title="{% blocktrans count words=trans.untranslated_words %}{{ words }} word to translate!{% plural %}{{ words }} words to translate!{% endblocktrans %}" >{{ trans.get_words_percent }}%</td>
<td class="percent">
......
{% load i18n %}
{% if show_percents %}
<div class="row">
<div class="col-xs-10">
{% endif %}
<div class="progress">
<div class="progress-bar progress-bar-success" role="progressbar" aria-valuenow="{{ good }}" aria-valuemin="0" aria-valuemax="100" style="width: {{ good }}%;" title="{% trans "Translated strings" %}"></div>
{% if checks %}
......@@ -12,6 +14,8 @@
<div class="progress-bar progress-bar-danger" role="progressbar" aria-valuenow="{{ fuzzy }}" aria-valuemin="0" aria-valuemax="100" style="width: {{ fuzzy }}%;" title="{% trans "Strings with any failing checks" %}"></div>
{% endif %}
</div>
{% if show_percents %}
</div>
<div class="col-xs-2">
......@@ -19,3 +23,4 @@
</div>
</div>
{% endif %}
......@@ -12,3 +12,6 @@ h1 {
.content {
margin: 14px;
}
.progress-cell {
width: 200px;
}
......@@ -477,7 +477,7 @@ def get_advertisement_html_mail():
@register.inclusion_tag('progress.html')
def translation_progress(translation):
def translation_progress(translation, show_percents=True):
translated = translation.get_translated_percent()
fuzzy = translation.get_fuzzy_percent()
checks = translation.get_failing_checks_percent()
......@@ -487,6 +487,7 @@ def translation_progress(translation):
'checks': int(checks),
'fuzzy': int(fuzzy),
'percent': translated,
'show_percents': show_percents,
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment