{#- The translation proposals, shared by the editors' page from their dashboard (ai_translation/proposals.html) and the sysadmins' page (ai_translation/admin/proposals.html). The AI's suggestions for datasets that lack a translation are shown next to the source text; nothing is saved until an editor applies one. Plain forms; with scripts (assets/js/proposals.js) one proposal is decided without reloading the page. Only the datasets the user may edit. -#}

{{ _('These are machine translations that nobody has read yet. Compare each one with the source text, correct it if needed, and then apply it. Nothing changes in a dataset until you apply a proposal. You only see the datasets you may edit.') }}

{% if not cards %}

{{ _('There are no proposals to review.') }}

{% else %} {% asset 'ai_translation/ai-translation-proposals' %}
{{ h.csrf_input() }} {% for card in cards %} {% set pid = card.item.id %}

{{ card.dataset.title or card.dataset.name }}

{% if card.dataset.organization %}{{ card.dataset.organization.title }} · {% endif %}{{ _('Proposed') }} {{ card.item.created.strftime('%Y-%m-%d') }} · {{ _('Machine-translated: check before applying') }}

{% for s in card.suggestions %}
{{ s.source_value if s.source_value is string else (s.source_value or []) | join(', ') }}
{% if s.suggested_value is string %} {% else %}
{{ _('Keywords, separated by commas. They are added to the ones already there.') }}
{% endif %}
{% endfor %}
{#- Where assets/js/proposals.js answers a decision; in the page from the start, so screen readers announce it. -#}
{% endfor %}
{% if pager.item_count > pager.items_per_page %}
{{ pager.pager() }}
{% endif %} {% endif %}