{% extends "admin/base.html" %} {#- Further multilingual fields for the AI to translate (extra_fields.py, 2026-11-23): only what the portal ticks. -#} {% block primary_content_inner %}

{{ _('AI translation') }}

{% snippet 'ai_translation/admin/_nav.html', active='fields', ai_settings_url=ai_settings_url %}

{{ _('The AI always translates the title, the description and the keywords. Here the portal can let it translate further multilingual fields of the metadata schema as well, one at a time. For each such field the AI service gets its name, its label, whether it is Markdown, and its text in the source language. Tick only fields whose texts the portal may send to the AI service. At most {count} fields; a text longer than {length} characters is not sent.').format(count=max_fields, length=max_length) }}

{{ _('Whether a field is ticked or not, the rule check points out a translation that is missing or out of date in the fields it checks.') }}

{% if over_limit %}
{{ _('Only {count} fields are translated. Left out:').format(count=max_fields) }} {{ over_limit | join(', ') }}
{% endif %} {% if unknown %}
{{ _('The setting names fields that are not multilingual text fields of the schema, and they are left out:') }} {{ unknown | join(', ') }}
{% endif %}
{{ h.csrf_input() }} {% if rows %}
{% for row in rows %} {% endfor %}
{{ _('Field') }}{{ _('Text') }}{{ _('Note') }}
{% if row.markdown %}{{ _('Markdown') }}{% else %}{{ _('Plain text') }}{% endif %} {% if not row.usable %}{{ _('Cannot be used:') }} {{ row.reason }}{% endif %} {% if row.marked %}{{ _('Turned on in the metadata schema (ai_translate), so ticked unless this page says otherwise.') }}{% endif %}
{% else %}

{{ _('The schema has no further multilingual fields.') }}

{% endif %} {% for e in errors.translate_fields or [] %}{{ e }}{% endfor %} {% if saved %} {{ _('set on this page') }} {% if server_default %}{{ _("Without the setting on this page, the server's setting applies: {value}").format(value=server_default) }}{% else %}{{ _('Without the choice on this page, the fields the metadata schema marks with ai_translate are translated (none, if it marks none).') }}{% endif %} {% endif %} {% if rows %}
{% endif %}
{% if saved %}
{{ h.csrf_input() }}
{% endif %} {% endblock %}