{% extends "wiki/base.html" %}
{% from "layout/errorlist.html" import errorlist %}
{% from "wiki/includes/sidebar_modules.html" import document_tools with context %}
{% from "includes/common_macros.html" import content_editor with context %}
{% from "wiki/includes/document_macros.html" import revision_diff, submit_revision, edit_messages with context %}
{% from "wiki/includes/document_macros.html" import document_lock_warning with context %}
{% set title = _('Translate Article | {document}')|f(document=parent.title) %}
{% set crumbs = [(parent.get_absolute_url(), parent.title),
(None, _('Translate Article'))] %}
{% set classes = 'translate' %}
{% set scripts = ('wiki', 'wiki.diff', 'wiki.editor') %}
{% if document.is_switching_devices_document %}
{% set scripts = scripts + ('switching-devices',) %}
{% endif %}
{% set ga_content_group = "kb-cms" %}
{% block content %}
{% set language = settings.LANGUAGES_DICT[locale.lower()] %}
{% if not based_on.is_ready_for_localization %}
{{ _('You are translating an English document which is not yet ready for localization.') }}
{% endif %}
{% if draft_revision %}
{{ _('You have a draft revision for this article saved on {date_time}')|f(date_time=draft_revision.created) }}
{% endif %}
{% if more_updated_rev %}
{{ _('This version is outdated, but there is a new version {revision} available.')|fe(link=url('wiki.revision', document.slug, more_updated_rev.id, locale=locale), revision=more_updated_rev.id) }}
{{ _('Translating article to {locale}.' )|f(locale=language) }}
{% if not document %}
{# If this is the first translation to this locale, we use 1 big form. #}
{% endif %}
{% endblock %}
{% block side %}
{{ document_tools(document, parent, user, 'edit', settings) }}
{% endblock %}