{% load i18n %} {% load statistics_resources %} {% load truncate %} {% load permissions %} {% load team_tags %} {% load locks_tags %} {% load upload_manager_tags %} {% load watches_tags %} {% load txcommontags %} {% load addons %} {% get_permission "project_perm.maintain" for request.user and resource.project as "is_maintainer" %}
{% watch_toggle resource target_language %}
{% blocktrans with stats.total as total_entities %} Total: {{ total_entities }} strings, {{ wordcount }} words{% endblocktrans %}
{% blocktrans with stats.translated as trans_count and stats.translated_wordcount as trans_wordcount %} Translated: {{ trans_count }} strings, {{ trans_wordcount }} words {% endblocktrans %}
{% if team %} {% comment %} This permission is provided only if team is available{% endcomment %} {% get_permission "project_perm.submit_translations" for request.user and team as "can_submit_translation" %} {% else %} {% comment %} This permission is provided if team is not available and then only the maintainers can access lotte via "Translate now" {% endcomment %} {% get_permission "project_perm.submit_translations" for request.user and project as "can_submit_translation" %} {% endif %} {% get_permission "project_perm.maintain" for request.user and project as "is_maintainer" %} {% ifequal resource.source_language target_language %} {% blocktrans %}This is the Source Language{% endblocktrans %} {% else %} {% if can_submit_translation and resource.accept_translations or is_maintainer %} {% url translate_resource project.slug resource.slug target_language.code as translate_resource %} {% if stats.lock.valid %} {% with stats.lock.owner as lock_owner %} {% if lock_owner != request.user %} {% trans "Translate now" %} {% else %} {% trans "Translate now" %} {% endif %} {% endwith %} {% else %} {% trans "Translate now" %} {% endif %} {% else %} {% if not resource.accept_translations %} {% trans "Translate now" %} {% else %} {% trans "Translate now" %} {% endif %} {% endif %} {% endifequal %}
{% with 400 as barwidth %}
{{ stats.translated|percentage:stats.total }}
{% stats_bar_actions stats barwidth %}
{% endwith %}
{% blocktrans with stats.untranslated as trans_count and stats.untranslated_wordcount as trans_wordcount %} {{ trans_count }} remaining strings ({{ trans_wordcount }} words) {% endblocktrans %}
{% hook 'matches_overview.html' %}
{% ifnotequal resource.source_language target_language %} {% if perms.projects.delete_resource or is_maintainer or request.user.is_superuser %}