{% extends "base.html" %} {% load compress %} {% load i18n %} {% load icons %} {% load translations %} {% load crispy_forms_tags %} {% load permissions %} {% load static %} {% block extra_script %} {% compress js %} {% endcompress %} {% endblock %} {% block extra_meta %} {% endblock %} {% block breadcrumbs %}
  • {{ project }}
  • {% if object.component.slug != "-" %} {% include "snippets/component-breadcrumb.html" with object=object.component %} {% endif %} {% include "snippets/translation-breadcrumb.html" %} {% if object.component.slug == "-" %}
  • {{ unit.translation.component.name }}
  • {% endif %}
  • {% trans "Translate" %}
  • {% endblock %} {% 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 '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 %}
    {% if user_can_translate %} {% icon "flash.svg" %} {% trans "Zen" %} {% endif %} {% 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 %} {% trans "Forbidden glossary term" %} {% else %} {% trans "Glossary term" %} {% endif %} {% else %} {% if unit.is_source %} {% trans "Source string" %} {% else %} {% trans "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_translation secondary_unit.target secondary_unit.translation.language secondary_unit.translation.plural search_match=search_query num_plurals=unit.translation.plural.number unit=secondary_unit %}
    {% endfor %} {% endif %} {% if unit.previous_source and unit.fuzzy %}
    {% format_translation unit.source unit.translation.component.source_language diff=unit.previous_source num_plurals=unit.translation.plural.number %}
    {% endif %} {% if unit.is_source %} {% if unit.context %}
    {% format_translation unit.context unit.translation.component.source_language search_match=search_query num_plurals=unit.translation.plural.number wrap=True %}
    {% endif %} {% if unit.translation.component.intermediate %}
    {% format_translation unit.source unit.translation.component.source_language search_match=search_query num_plurals=unit.translation.plural.number unit=unit %}
    {% endif %} {% endif %} {% if unit.source_unit.explanation %}
    {{ unit.source_unit.explanation|markdown }}
    {% endif %} {% if not unit.is_source %} {% if not user.profile.hide_source_secondary or not secondary %}
    {% if unit.context %}
    {% format_translation unit.context unit.translation.component.source_language simple=True noformat=True %}
    {% endif %} {{ unit.translation.component.source_language }} {% if unit.translation.component.project.source_review %} {% icon "bug.svg" %} {% endif %} {% include "snippets/note-badge.html" with unit=unit %} {% format_translation unit.source unit.translation.component.source_language search_match=search_query num_plurals=unit.translation.plural.number unit=unit glossary=glossary %}
    {% 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 %}

    {% trans "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 %}
    {% trans "Component" %} {% trans "Translation" %} {% trans "Difference to current string" %}
    {% blocktrans count count=others.matching|length %}The following string has the same context and source.{% plural %}The following strings have the same context and source.{% endblocktrans %}
    {% blocktrans count count=others.source|length %}The following string has different context, but the same source.{% plural %}The following strings have different contexts, but the same source.{% endblocktrans %}
    {% blocktrans count count=others.context|length %}The following string has a different source, but the same context.{% plural %}The following strings have different sources, but the same context.{% endblocktrans %}
    {% if user_can_translate and others.allow_merge %} {% if object.component.allow_translation_propagation %} {% else %} {% endif %} {% endif %}
    {% endif %}

    {% trans "Loading…" %}

    {% include "last-changes-content.html" %} {% trans "Browse all component changes" %}
    {% if user_can_use_machinery %}
    {% trans "Translation" %} {% trans "Source" %} {% trans "Origin" %} {% trans "Similarity" %} {% loading_icon "machinery" %}
    {% 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 %}

    {% trans "New comment" %}

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

    {{ comment_form|crispy }}
    {% endif %}
    {% endif %}
    {% if unit.all_checks or unit.all_comments or unit.suggestions or variants or display_checks %}

    {% trans "Things to check" %}

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

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

    {% trans "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 %} {% trans "Enforced" %} {% else %} {% endif %}

    {{ check.get_description }}

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

    {% trans "Fix string" %}

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

    {% perm 'unit.check' check as user_can_ignore_check %} {% if user_can_ignore_check %} {% trans "Dismiss" %} {% if user_can_edit_source %} {% icon "info.svg" %} {% endif %} {% endif %} {% trans "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 unit.all_comments %}
    {% documentation_icon 'user/translating' 'comments' right=True %} {% icon "comment.svg" %} {% trans "Comments" %}

    {% blocktrans count count=unit.all_comments|length %}There is {{ count }} comment for this string.{% plural %}There are {{ count }} comments for this string.{% endblocktrans %}

    {% trans "View" %}

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

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

    {% trans "View" %}

    {% endif %}
    {% endif %}

    {% with glossaries=unit.translation.component.project.glossaries %} {% for glossary in glossaries %} {% icon "folder-search-outline.svg" %} {% endfor %} {% endwith %} {% loading_icon "glossary-add" %} {% trans "Glossary" %}

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

    {% documentation_icon 'user/translating' 'source-context' right=True %} {% trans "String information" %}

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

    {{ unit.source_unit.explanation|markdown }}

    {% else %} {% trans "No explanation currently provided." %} {% endif %}
    {% endif %} {% if unit.context %}
    {{ unit.translation.component.context_label }}
    {% format_translation unit.context unit.translation.component.source_language search_match=search_query simple=True wrap=True %}
    {% endif %} {% if unit.note %}
    {% trans "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 %} {% trans "Labels" %}
    {% for label in unit.all_labels %} {{ label.name }} {% empty %} {% trans "No labels currently set." %} {% endfor %}
    {% endif %} {% if unit.all_flags or user_can_edit_source %}
    {% if user_can_edit_source %} {% icon "pencil.svg" %}{% endif %} {% trans "Flags" %}
    {% if unit.all_flags %} {{ unit.all_flags.format }} {% else %} {% trans "No flags currently set." %} {% endif %}
    {% endif %} {% if unit.location %}
    {% trans "Source string location" %}
    {% get_location_links user.profile unit %}
    {% endif %}
    {% trans "String age" %}
    {{ unit.timestamp|naturaltime }}
    {% trans "Source string age" %}
    {{ unit.source_unit.timestamp|naturaltime }}
    {% if unit.position %}
    {% trans "Translation file" %}
    {% if unit.translation.filename %} {% blocktrans with filename=unit.translation.filename position=unit.position %}{{ filename }}, string {{ position }}{% endblocktrans %} {% else %} {% blocktrans with filename=unit.translation.filename %}string {{ position }}{% endblocktrans %} {% endif %} {% if unit.pending %} {% trans "pending" %} {% endif %}
    {% endif %}
    {% csrf_token %}
    {% endwith %} {% if user_can_add_unit %}
    {% csrf_token %}
    {% endif %} {% if screenshot_form %}
    {% csrf_token %}
    {% endif %} {% endblock %}