Commit 37f608a0 authored by Michal Čihař's avatar Michal Čihař

Consistent naming for status properties

Signed-off-by: default avatarMichal Čihař <michal@cihar.com>
parent ab1bec39
......@@ -29,7 +29,7 @@
</tr>
<tbody>
{% for trans in translations %}
{% with trans.get_untranslated_percent as untranslated and trans.get_translated_percent as percent and trans.get_fuzzy_percent as fuzzy and trans.failing_checks as checks and trans.get_non_translated as count and trans.get_failing_checks_percent as check_percent and trans.have_suggestion as suggestions %}
{% with trans.get_untranslated_percent as untranslated and trans.get_translated_percent as percent and trans.get_fuzzy_percent as fuzzy and trans.failing_checks as checks and trans.untranslated as count and trans.get_failing_checks_percent as check_percent and trans.have_suggestion as suggestions %}
{% if not hide_completed or count > 0 %}
<tr>
<th><a href="{{ trans.get_absolute_url }}">{% if show_language == 1 %}{{ trans.language }}{% else %}{% if show_only_component %}{{ trans.subproject.name }}{% else %}{{ trans.subproject }}{% endif %}{% if show_language == 2 %} ({{ trans.language }}){% endif %}{% endif %}</a>
......@@ -69,7 +69,7 @@
</td>
<td>
{% if count > 0 %}
<a href="{{ trans.get_translate_url }}?type=untranslated" title="{% blocktrans count trans.get_non_translated as count %}There is {{ count }} not translated string.{% plural %}There are {{ count }} not translated strings.{% endblocktrans %}" class="btn btn-default btn-xs"><i class="fa fa-pencil"></i> {% trans "Translate" %}</a>
<a href="{{ trans.get_translate_url }}?type=untranslated" title="{% blocktrans count trans.untranslated as count %}There is {{ count }} not translated string.{% plural %}There are {{ count }} not translated strings.{% endblocktrans %}" class="btn btn-default btn-xs"><i class="fa fa-pencil"></i> {% trans "Translate" %}</a>
{% endif %}
</td>
</tr>
......
......@@ -10,6 +10,9 @@
<td>{% trans "Translated strings:" %}</th><td>{{ translation.translated }} ({{ translation.get_translated_percent }}%)</td>
</tr>
<tr>
<td>{% trans "Untranslated strings:" %}</th><td>{{ translation.translated }} ({{ translation.get_untranslated_percent }}%)</td>
</tr>
<tr>
<td>{% trans "Fuzzy strings:" %}</th><td>{{ translation.fuzzy }} ({{ translation.get_fuzzy_percent }}%)</td>
</tr>
</table>
......
......@@ -263,6 +263,10 @@ class Translation(models.Model, URLMixin, PercentMixin, LoggerMixin):
def untranslated_words(self):
return self.total_words - self.translated_words
@property
def untraslated(self):
return self.total - self.translated
def get_lock_user_display(self):
'''
Returns formatted lock user.
......@@ -353,9 +357,6 @@ class Translation(models.Model, URLMixin, PercentMixin, LoggerMixin):
self.create_lock(request.user)
return
def get_non_translated(self):
return self.total - self.translated
def _reverse_url_name(self):
'''
Returns base name for URL reversing.
......
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