{% extends "wagtailadmin/generic/inspect.html" %} {% load wagtailadmin_tags i18n %} {% block main_content %}
{% translate "Project metadata" as metadata_heading %} {% panel id="project-metadata" heading=metadata_heading %} {% if project %} {# Project metadata #}
{% translate "Project ID" %}
{{ project.project_id }}
{% translate "Project name" %}
{{ project.name }}
{% translate "Source locale" %}
{{ project.source_locale_description }}
{% translate "Target locales" %}
    {% for tl in target_locales %}
  • {{ tl.description }}{% if not tl.enabled %} (disabled}{% endif %}
  • {% endfor %}

{% translate "View project in Smartling" %} {% else %} {# Error message if we can't get the project metadata for any reason #}

{% blocktranslate %}

Could not load the Smartling project. Check your WAGTAIL_LOCALIZE_SMARTLING settings. The server's error logs may contain more information.

Translations will not be submitted to Smartling until this is resolved.

{% endblocktranslate %}
{% endif %} {% endpanel %} {% if project %} {% translate "Compatibility" as compatibility_heading %} {% panel id="configuration" heading=compatibility_heading %}

Locales

Source locale

{% if wagtail_source_locale %} {# Information about the source locale #}

{% url "wagtaillocales:edit" pk=wagtail_source_locale.pk as locale_url %} {% blocktranslate with locale_url=locale_url wagtail_language_code=wagtail_source_locale.language_code smartling_language_code=project.source_locale_id %} The source locale is compatible with Smartling. The Wagtail {{ wagtail_language_code }} locale will be mapped to the Smartling {{ smartling_language_code }} language. {% endblocktranslate %}

{% else %} {# Error messages about source locale #}
{% blocktranslate with smartling_language_code=project.source_locale_id %}

The source locale is not compatible with the Smartling project's source locale ({{ smartling_language_code }}).

Translations will not be submitted to Smartling until this is resolved.

{% endblocktranslate %} {% if suggested_source_locale %} {% if suggested_source_locale_exists %} {# Source locale exists, but is misconfigured #}

{% blocktranslate with url=suggested_source_locale.url label=suggested_source_locale.label %}The existing {{ label }} locale is suitable, but is currently set to sync from another locale.{% endblocktranslate%}

{% else %} {# Source locale doesn't exist, but can be created #} {% url "wagtaillocales:add" as add_locale_url %}

{% blocktranslate with url=add_locale_url label=suggested_source_locale.label %}Create a new locale with the {{ label }} language to resolve this.{% endblocktranslate%}

{% endif %} {% else %} {# Source locale doesn't exist, can't be created because it needs adding to WAGTAIL_CONTENT_LANGUAGES first #}

{% translate "No suitable language code was found in WAGTAIL_CONTENT_LANGUAGES."%}

{% endif %}
{% endif %} {# TODO target locales #} {% endpanel %} {% endif %}
{% endblock main_content %}