{# vim: set ts=2 et sts=2 sw=2: #} {% extends "wiki/base.html" %} {% from "layout/errorlist.html" import errorlist %} {% from "wiki/includes/sidebar_modules.html" import document_tabs %} {% from "includes/common_macros.html" import content_editor %} {% set title = _('Translate Article | {document}')|f(document=parent.title) %} {% block title %}{{ page_title(title) }}{% endblock %} {% set crumbs = [(url('wiki.category', parent.category), parent.get_category_display()), (parent.get_absolute_url(), parent.title), (None, _('Translate Article'))] %} {% set classes = 'translate' %} {% block content %} {% set language = settings.LANGUAGES[locale.lower()] %}

{{ _('Translating {title}')|f(title=parent.title) }}

{{ _('Translating article to {locale}' )|f(locale=language) }}. {{ _('Change') }}

{% if not based_on.reviewed or not based_on.is_approved %}
{{ _('You are translating an unreviewed or rejected English document.') }}
{% endif %}
    {% for lcl in settings.LANGUAGE_CHOICES %} {% if lcl[0] not in [settings.WIKI_DEFAULT_LANGUAGE, locale] %}
  • {{ lcl[0] }}
  • {% endif %} {% endfor %}
{% if not document %} {# If this is the first translation to this locale, we use 1 big form. #}
{{ csrf() }} {% endif %} {% if document_form %}
{{ _('Translate Description') }} {{ errorlist(document_form) }} {% if document %} {# If there are existing translations in this locale, we use 2 separate forms. #} {{ csrf() }} {% endif %}
  • {{ _('Title:') }}

    {{ parent.title }}

    {{ document_form.title|safe }}
  • {{ _('Slug:') }}

    {{ parent.slug }}

    {{ document_form.slug|safe }}
{% if document %}
{% endif %}
{% endif %} {% if revision_form %}
{{ _('Translate Content') }} {{ errorlist(revision_form) }} {% if document %} {# If there are existing translations in this locale, we use 2 separate forms. #}
{{ csrf() }} {% endif %}
  • {{ _('Keywords:') }}

    {{ based_on.keywords }}

    {{ revision_form.keywords|safe }}
  • {{ _('Search result summary:') }}

    {{ based_on.summary }}

    {{ revision_form.summary|safe }}
{% if document.current_revision and document.current_revision.based_on %} {# Diff between the English version the current translation is based on and the current English version. #} {% set revision_from = document.current_revision.based_on %} {% set revision_to = parent.current_revision %} {% include 'wiki/includes/revision_diff.html' %} {# TODO: 'change revisions' link and modal selector #} {% else %}

{{ _('Note: There are no approved translations for this article.') }} {% endif %}

    {{ _('Approved {default_locale} version:')|f(default_locale=settings.LANGUAGES[settings.WIKI_DEFAULT_LANGUAGE.lower()]) }}

    {{ _('{locale} translation:')|f(locale=language) }}

    {{ content_editor(revision_form.content) }}
{{ revision_form.hidden_fields()|join|safe }} {% include 'wiki/includes/submit_revision_for_review.html' %} {% if document %}
{% endif %}
{% endif %} {% if not document %} {% endif %}
{% endblock %} {% block side_top %} {{ document_tabs(document, parent, user, 'localize', settings) }} {% endblock %}