{% extends "wagtailadmin/base.html" %} {% load common_filters %} {% load common_tags %} {% load i18n %} {% block extra_css %} {% endblock %} {% block extra_js %} {% endblock %} {% block content %}

{% trans "Translations" %}

{% trans "Export" %}

{% blocktrans %}Export XML with texts for {{ default_lang_name }}.{% endblocktrans %}

{% csrf_token %} {{ language_export_form.as_p }}

{% trans "Import" %}

{% with import_count=import_job_names|length %}
{% if import_count == 1 %} {% dict lang=import_job_names.0 as lang_text %} {{ text.single_job|format_named:lang_text }} {% elif import_count > 1 %} {% dict lang=import_job_names|join:", " count=import_count as lang_text %} {{ text.multi_job|format_named:lang_text }} {% endif %}
{% endwith %}

{% blocktrans %}Import XML with translations for {{ default_lang_name }}.{% endblocktrans %}

{% csrf_token %} {% for field in import_language_import_form %}

{{ field.errors }} {{ field.label_tag }} {{ field }} {% comment %} TODO: Shouldn't need get filter, use dot notation {% endcomment %} {% with job=import_status|get:field.field.language_code %}

{% if job.is_failed %} {{ text.job_failed }} {% elif job.is_finished %} {% if job.has_warning %} ⚠️ {{ text.job_finished_warning }} {% else %} {{ text.job_finished }} {% endif %} {% endif %} {{ job.ended_at|date:"Y-m-d H:i:s" }}

{% comment %} Don't add whitespace, it will show due to white-space: pre; {% endcomment %}
{% if job.exc_info %}{{ job.exc_info }}{% else %}{{ job.result }}{% endif %}
{% endwith %}

{% endfor %}
{% endblock %}