{% load i18n icons permissions translations %} {% if unit.is_blocked_by_commit_policy %} {% get_review_workflow unit.translation as review_workflow %}
{% documentation_icon 'admin/projects' 'project-commit-policy' right=True %} {% icon "file-sync-outline.svg" %} {% translate "Translation quality filter" %}

{% if review_workflow.approved_only %} {% translate "Approval is required before this translation can be written to the translation file." %} {% else %} {% translate "Resolve this translation’s needs-editing state before it can be written to the translation file." %} {% endif %}

{% documentation 'admin/projects' 'project-commit-policy' as policy_url %} {% blocktranslate %}Learn how the translation quality filter controls which translations are written to files.{% endblocktranslate %}

{% perm review_workflow.project_language.settings_permission review_workflow.project_language as can_configure_workflow %} {% if can_configure_workflow %}

{% if review_workflow.approved_only %} {% translate "Configure language workflow" %} {% else %} {% translate "Configure translation quality filter" %} {% endif %}

{% endif %}
{% endif %}