{% extends "base.html" %} {% load compress crispy_forms_tags i18n icons permissions static translations %} {% block extra_script %} {% compress js %} {% endcompress %} {% endblock extra_script %} {% block extra_meta %}{% endblock %} {% block breadcrumbs %} {% path_object_breadcrumbs path_object %}
  • {% translate "Translate" %}
  • {% endblock breadcrumbs %} {% block content_class %}js-editor{% endblock %} {% block content %} {% include "snippets/component/state.html" with object=unit.translation.component %} {% perm 'unit.edit' unit as user_can_translate %} {% perm 'unit.delete' unit as user_can_delete %} {% perm 'unit.review' unit as user_can_review %} {% perm 'suggestion.add' unit as user_can_suggest %} {% perm 'suggestion.accept' unit as user_can_accept_suggestion %} {% perm 'suggestion.vote' unit.translation as user_can_vote_suggestion %} {% perm 'machinery.view' unit.translation as user_can_use_machinery %} {% perm 'source.edit' unit.translation as user_can_edit_source %} {% perm 'unit.flag' unit.translation as user_can_edit_flags %} {% perm 'screenshot.add' unit.translation as user_can_add_screenshot %} {% perm 'comment.add' unit.translation as user_can_add_comment %} {% perm 'glossary.add' project as user_can_add_glossary %} {% perm 'unit.add' unit.translation as user_can_add_unit %}
    {% icon "flash.svg" %} {% translate "Zen" %} {% icon "settings.svg" %}
    {% with variants=unit.variants %}
    {% crispy search_form %}
    {% icon "link.svg" %}

    {% if unit.translation.component.is_glossary %} {% if "forbidden" in item.all_flags %} {% translate "Forbidden glossary term" %} {% else %} {% translate "Glossary term" %} {% endif %} {% else %} {% if unit.is_source %} {% translate "Source string" %} {% else %} {% translate "Translation" %} {% endif %} {% endif %} {% include "snippets/unit-readonly-badge.html" %}

    {% csrf_token %} {% if secondary %} {% for secondary_unit in secondary %}
    {{ secondary_unit.translation.language }} {% if user.profile.hide_source_secondary %} {% include "snippets/note-badge.html" with unit=unit %} {% endif %} {% format_unit_target secondary_unit search_match=search_query show_copy=True %}
    {% endfor %} {% endif %} {% if unit.previous_source and unit.fuzzy %}
    {% format_unit_source unit diff=unit.previous_source %}
    {% endif %} {% if unit.is_source %} {% if unit.context %}
    {% format_source_string unit.context unit search_match=search_query wrap=True %}
    {% endif %} {% if unit.translation.component.intermediate %}
    {% format_unit_source unit search_match=search_query show_copy=True %}
    {% endif %} {% endif %} {% if unit.source_unit.explanation %} {% if not unit.translation.component.is_glossary or not unit.is_source %}
    {{ unit.source_unit.explanation|markdown }}
    {% endif %} {% endif %} {% if not unit.is_source %} {% if not user.profile.hide_source_secondary or not secondary %}
    {% if unit.context %}
    {% format_source_string unit.context unit simple=True wrap=True search_match=search_query whitespace=False %}
    {% endif %} {{ unit.translation.component.source_language }} {% if not unit.source_unit.translated %} {% translate "The source string needs review." %} {% endif %} {% if unit.translation.component.project.source_review %} {% icon "bug.svg" %} {% endif %} {% include "snippets/note-badge.html" with unit=unit %}
    {% format_unit_source unit search_match=search_query glossary=glossary show_copy=True %}
    {% endif %} {% endif %} {% crispy form %}
    {% include "snippets/embed-units.html" with current_unit=unit units=nearby translation=unit.translation component=unit.translation.component actions_template="snippets/embed-units-clone.html" %}
    {% if nearby_keys %}
    {% include "snippets/embed-units.html" with current_unit=unit units=nearby_keys translation=unit.translation component=unit.translation.component actions_template="snippets/embed-units-clone.html" %}
    {% endif %} {% if variants|length > 1 %}
    {% include "snippets/embed-units.html" with current_unit=unit units=variants translation=unit.translation component=unit.translation.component actions_template="snippets/embed-units-clone.html" %}
    {% endif %} {% if unit.suggestions %}
    {% csrf_token %} {% include "snippets/suggestions.html" with suggestions=unit.suggestions %}
    {% endif %} {% if others.total %}
    {% if others.skipped %}

    {% translate "Showing only subset of the strings as there were too many matches." %}

    {% endif %}
    {% csrf_token %} {% if others.same %} {% for item in others.same %} {% include "trans/other-row.html" %} {% endfor %} {% endif %} {% if others.matching %} {% for item in others.matching %} {% include "trans/other-row.html" %} {% endfor %} {% endif %} {% if others.source %} {% for item in others.source %} {% include "trans/other-row.html" %} {% endfor %} {% endif %} {% if others.context %} {% for item in others.context %} {% include "trans/other-row.html" %} {% endfor %} {% endif %} {% if others.other %} {% for item in others.other %} {% include "trans/other-row.html" %} {% endfor %} {% endif %}
    {% translate "Component" %} {{ unit.translation.component.context_label }} {% translate "Source" %} {% translate "Translation" %} {% translate "Difference to current string" %}
    {% blocktranslate count count=others.matching|length %}This string has the same context and source.{% plural %}These strings have the same context and source.{% endblocktranslate %}
    {% blocktranslate count count=others.source|length %}This string has a different context, but the same source.{% plural %}These strings have differing context, but the same source.{% endblocktranslate %}
    {% blocktranslate count count=others.context|length %}This string has a different source, but the same context.{% plural %}These strings have differing sources, but the same context.{% endblocktranslate %}
    {% blocktranslate count count=others.other|length %}This string has a different source and context.{% plural %}These strings have differing sources and context.{% endblocktranslate %}
    {% if user_can_translate and others.allow_merge %} {% if object.component.allow_translation_propagation %} {% else %} {% endif %} {% endif %}
    {% endif %}

    {% translate "Loading…" %}

    {% include "last-changes-content.html" %} {% translate "Browse all string changes" %}
    {% if user_can_use_machinery %}
    {% translate "Translation" %} {% translate "Suggested change" %} {% translate "Source" %} {% translate "Origin" %} {% translate "Similarity" %} {% loading_icon "machinery" %}
    {% csrf_token %}
    {% endif %} {% if unit.all_comments or user_can_add_comment %}
    {% if unit.all_comments %} {% include "list-comments.html" with object=unit.translation comments=unit.all_comments next_url=this_unit_url %} {% endif %} {% if user_can_add_comment %}
    {% csrf_token %}

    {% documentation_icon 'user/translating' 'comments' right=True %} {% translate "New comment" %}

    {% translate "Comment on this string for fellow translators and developers to read." %}

    {{ comment_form|crispy }}
    {% endif %}
    {% endif %}
    {% if unit.all_checks or comments_to_check or unit.suggestions or variants|length > 1 or display_checks %}

    {% translate "Things to check" %}

    {% if unit.suggestions %}
    {% documentation_icon 'user/translating' 'suggestions' right=True %} {% icon "suggest.svg" %} {% translate "Suggestions" %}

    {% blocktranslate count count=unit.suggestions|length %}There is {{ count }} suggestion for this string.{% plural %}There are {{ count }} suggestions for this string.{% endblocktranslate %}

    {% translate "View" %}

    {% endif %} {% for check in unit.all_checks %}
    {% documentation_icon 'user/checks' check.check_obj.doc_id right=True %} {% icon "alert.svg" %} {{ check.get_name }} {% if check.is_enforced %} {% translate "Enforced" %} {% else %} {% endif %}

    {{ check.get_description }}

    {% with fixup=check.get_fixup_json %} {% if fixup %}

    {% translate "Fix string" %}

    {% endif %} {% endwith %} {% if not check.is_enforced %}

    {% perm 'unit.check' check as user_can_ignore_check %} {% if user_can_ignore_check %} {% translate "Dismiss" %} {% if user_can_edit_source %} {% icon "info.svg" %} {% endif %} {% endif %} {% translate "Reset" %}

    {% endif %}
    {% endfor %} {% comment %}Display only checks{% endcomment %} {% for check in display_checks %}
    {% documentation_icon 'user/checks' check.check_obj.doc_id right=True %} {% icon "check.svg" %} {{ check.get_name }}

    {{ check.get_description }}

    {% endfor %} {% if comments_to_check %}
    {% documentation_icon 'user/translating' 'comments' right=True %} {% icon "comment.svg" %} {% translate "Comments" %}

    {% blocktranslate count count=comments_to_check|length %}There is {{ count }} unresolved comment for this string.{% plural %}There are {{ count }} unresolved comments for this string.{% endblocktranslate %}

    {% translate "View" %}

    {% endif %} {% if variants|length > 1 %}
    {% documentation_icon 'user/translating' 'variants' right=True %} {% icon "variant.svg" %} {% translate "Variants" %}

    {% blocktranslate count count=variants|length %}There is {{ count }} variant of this string.{% plural %}There are {{ count }} variants of this string.{% endblocktranslate %}

    {% translate "View" %}

    {% endif %}
    {% endif %}

    {% for glossary in unit.translation.get_glossaries %} {% icon "folder-search-outline.svg" %} {% endfor %} {% loading_icon "glossary-add" %} {% translate "Glossary" %}

    {% include "snippets/glossary.html" %}
    {{ unit.translation.component.source_language }} {{ unit.translation.language }}
    {% if user_can_add_glossary and addterm_form.fields.translation.queryset %} {% endif %}

    {% documentation_icon 'user/translating' 'source-context' right=True %} {{ unit.id }} {% translate "String information" %}

    {% if path_object != unit.translation %}
    {% translate "Component" %}
    {{ unit.translation.component }} {% endif %}
    {% if screenshots or user_can_add_screenshot %}
    {% if user_can_add_screenshot %} {% icon "pencil.svg" %} {% endif %} {% translate "Screenshot context" %}
    {% for screenshot in screenshots %} {% include "screenshots/screenshot_show.html" %} {% empty %} {% translate "No screenshot currently associated." %} {% endfor %} {% if user_can_add_screenshot %}
    {% icon "plus-circle.svg" %} {% translate "Add screenshot" %} {% endif %}
    {% endif %} {% if unit.source_unit.explanation or user_can_edit_source %}
    {% if user_can_edit_source %} {% icon "pencil.svg" %} {% endif %} {% translate "Explanation" %}
    {% if unit.source_unit.explanation %}

    {{ unit.source_unit.explanation|markdown }}

    {% else %} {% translate "No explanation currently provided." %} {% endif %}
    {% endif %} {% if unit.context %}
    {{ unit.translation.component.context_label }}
    {% format_source_string unit.context unit search_match=search_query simple=True wrap=True %}
    {% endif %} {% if unit.note %}
    {% translate "Source string description" %}
    {{ unit.note|urlize_ugc }}
    {% endif %} {% if unit.all_labels or user_can_edit_source %}
    {% if user_can_edit_source %} {% icon "pencil.svg" %} {% endif %} {% translate "Labels" %}
    {% for label in unit.all_labels %} {% translate label.name %} {% empty %} {% translate "No labels currently set." %} {% endfor %}
    {% endif %} {% if unit.all_flags or user_can_edit_source %}
    {% if user_can_edit_source %} {% icon "pencil.svg" %} {% endif %} {% translate "Flags" %}
    {% if unit.all_flags %} {{ unit.all_flags.format }} {% else %} {% translate "No flags currently set." %} {% endif %}
    {% endif %} {% if unit.location %}
    {% translate "Source string location" %}
    {% get_location_links user unit %}
    {% endif %}
    {% translate "String age" %}
    {{ unit.timestamp|naturaltime }}
    {% translate "Last updated" %}
    {{ unit.last_updated|naturaltime }}
    {% translate "Source string age" %}
    {{ unit.source_unit.timestamp|naturaltime }}
    {% if unit.position %}
    {% translate "Translation file" %}
    {% if unit.translation.filename %} {% blocktranslate with filename=translation_file_link position=unit.position %}{{ filename }}, string {{ position }}{% endblocktranslate %} {% else %} {% blocktranslate with position=unit.position %}string {{ position }}{% endblocktranslate %} {% endif %} {% if unit.pending %} {% translate "pending" %} {% endif %}
    {% endif %}
    {% csrf_token %}
    {% endwith %} {% if user_can_add_unit %}
    {% csrf_token %}
    {% endif %} {% if screenshot_form %}
    {% csrf_token %}
    {% endif %} {% if user_can_add_glossary and addterm_form.fields.translation.queryset %}
    {% csrf_token %}
    {% endif %} {% endblock content %}