{# vim: set ts=2 et sts=2 sw=2: #} {% extends "wiki/base.html" %} {% from "layout/errorlist.html" import errorlist %} {% 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'))] %} {% block bodyclass%}translate{% endblock %} {% block content %} {% set language = settings.LANGUAGES[locale.lower()] %}
{{ csrf() }}

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

{{ _('Translating article to {locale}' )|f(locale=language) }}. {{ _('Change') }}
{% include 'wiki/includes/page_buttons.html' %} {% if not based_on.reviewed or not based_on.is_approved %}

{{ _('You are translating an unreviewed or rejected English document.') }}

{% endif %}
{% if document_form %}
{{ _('Translate Description') }} {{ errorlist(document_form) }}
  • {{ _('Title:') }}
    {{ parent.title }}
    {{ document_form.title|safe }}
  • {{ _('Slug:') }}
    {{ specific_slug }}
    {{ document_form.slug|safe }}
  • {% if parent_slug %}
  • {{ _('Parent:') }}
    {{ parent_slug }}
     
  • {% endif %} {% if not document.is_template %}
  •  
     
    {{ revision_form.show_toc | safe }}
  • {% endif %}
{% endif %} {% if revision_form %}
{{ _('Translate Content') }} {{ errorlist(revision_form) }} {# TODO: restore keywords and summary when we restore search app
  • {{ _('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()]) }}

{{ based_on.content|safe }}

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

{{ content_editor(revision_form.content) }}
{{ revision_form.hidden_fields()|join|safe }}
{% endif %}
{% endblock %} {% block js %} {% endblock %}