{% asset 'ai_metadata/ai-metadata-review' %} {% asset 'ai_metadata/ai-metadata-review-css' %} {#- The script's texts in the page's language (2026-10-01). Same keys and English source texts as STRINGS in assets/js/review.js; test_i18n.py checks that the two lists match. -#} {%- set i18n = { 'severity_error': _('Error'), 'severity_warning': _('Needs review'), 'severity_info': _('Information'), 'rules_no_findings': _('The rule-based review found no problems.'), 'field_title': _('Title'), 'field_notes': _('Description'), 'field_tag_string': _('Keywords'), 'field_theme': _('Theme'), 'landing_page_notice': _('The landing page could not be read this time, so the review is based only on what is in the form. Run the review again if you want the page to be taken into account.'), 'use_suggestion': _('Use suggestion'), 'unused_message': _('You have AI suggestions that are not used. What should happen to them?'), 'unused_save': _('Use them as they are in the panel, and save'), 'unused_discard': _('Discard the suggestions and save'), 'unused_back': _('Back to the form'), 'compare_current': _("Current value"), 'compare_empty': _("(empty)"), 'compare_proposal': _("Suggestion – you can edit it before you use it"), 'compare_proposal_add': _("Suggestion, added to the current keywords – you can edit it before you use it"), 'compare_proposal_fixed': _('Suggestion'), 'compare_choice_note': _('After you use it, you can change it in the list in the form.'), 'compare_period_note': _('After you use it, you can change the dates in the date boxes in the form.'), 'edit_kept': _("You have edited a suggestion, so the suggestions were not refreshed. Use it, or run the review again when you are done."), 'ai_nothing': _("The AI has no suggestions for this dataset this time. Asking again can give other suggestions."), 'set_ai': _("AI suggestions"), 'set_top': _("Move to top"), 'choice_new': _("Get new suggestions"), 'diff_edit': _("Edit"), 'diff_preview': _("Preview"), 'diff_summary': _("{added} words added, {removed} removed"), 'changes_heading': _("Changes from the current text: {count}"), 'show_removed': _("Show removed text"), 'keep_original': _("Keep the original"), 'use_whole': _("Use the whole suggestion again"), 'diff_none': _("No changes from the current text."), 'preview_loading': _("Preparing the preview…"), 'preview_failed': _("The preview could not be made."), 'set_replaced': _("New suggestions from {time} replaced the ones from {old}."), 'replace_edited': _("You have edited a suggestion. Replace the suggestions anyway?"), 'md_toolbar': _("Format the text"), 'md_bold': _("Bold"), 'md_italic': _("Italic"), 'md_heading': _("Heading"), 'md_bullets': _("Bulleted list"), 'md_numbers': _("Numbered list"), 'md_quote': _("Quote"), 'md_link': _("Link"), 'compare_blank': _("The suggestion is empty. Write a value, or leave the field as it is."), 'suggestion_used': _('Suggestion used'), 'toast_not_saved': _('Added to the form, but not saved yet. Save the dataset to keep the change.'), 'suggestion_applied': _('The suggestion for {field} has been added to the form. Check the content before you save.'), 'suggestion_field_missing': _('The field could not be found in the form. The suggestion has not been used.'), 'pending_suggestions': _('{count} AI suggestions to review'), 'questions_heading': _('Questions from the AI, for you to consider'), 'rules_running': _('Checking completeness…'), 'rules_status_ok': _('Completeness: nothing to remark on.'), 'rules_status': _('Completeness: {summary}'), 'rules_fix': _('{count} to fix or review'), 'rules_tips': _('{count} tips'), 'rules_failed': _('The completeness check could not be run.'), 'rules_failed_contact': _('The completeness check could not be run. Try again or contact an administrator.'), 'address_hint_forwards': _('This address forwards to {address}.'), 'address_hint_https': _('This address also works over https: {address}'), 'address_hint_why_forwards': _('The quality check of the European data portal only counts links that answer directly, so the address it forwards to is the safer choice.'), 'address_hint_why_https': _('Plain http is not secure, and the link may stop working when the site only allows https. https also avoids a forward, which the quality check of the European data portal does not count.'), 'address_change_heading': _('What changes:'), 'address_change_https': _('http becomes https'), 'address_change_slash_added': _('a slash is added at the end'), 'address_change_slash_removed': _('the slash at the end is removed'), 'address_change_www_added': _('www is added'), 'address_change_www_removed': _('www is removed'), 'address_change_other': _('the address leads to another place, so check that it is the right page'), 'address_hint_use': _('Use this address'), 'address_hint_used': _('The address in the form has been changed. Check it before you save.'), 'reading_landing_page': _('Reading the landing page… the review starts when it is done.'), 'busy_landing_page': _('AI is reading the landing page…'), 'busy_reviewing': _('AI is reviewing the metadata…'), 'ai_updating': _('AI is generating suggestions…'), 'ai_running': _('AI is reviewing the metadata…'), 'ai_failed': _('The AI review could not be completed.'), 'ai_failed_detail': _('The AI review could not be completed: {error}'), 'ai_heading': _('AI suggestions'), 'ai_done': _('The AI review is complete. Read and assess the suggestions before you change anything.'), 'landing_age': _('Landing page downloaded {age}.'), 'flow_landing_reading': _('Downloading the landing page…'), 'flow_landing_needs_https': _('The landing page is only read over https, and this address starts with http://. Change it to the https address to let the AI read the page.'), 'flow_landing_use_https': _('Use the https address and read the page'), 'flow_landing_failed': _('The landing page could not be downloaded. The AI uses only the texts in the form.'), 'landing_notice_failed': _('The landing page was not used: {reason} The AI uses only the texts in the form.'), 'landing_notice_failed_plain': _('The landing page could not be read. The AI uses only the texts in the form.'), 'landing_retry': _('Try again'), 'flow_landing_none': _('No landing page address: the AI uses only the texts in the form.'), 'flow_ai_running': _('AI is analysing…'), 'flow_ai_done': _('The AI has answered.'), 'flow_ai_failed': _('The AI analysis did not succeed.'), 'flow_review': _('Read the suggestions and use the ones you want. Nothing is saved until you save the dataset.'), 'flow_review_none': _('No suggestions to use this time.'), 'reread_no_url': _('There is no landing page address in the form.'), 'job_queued': _('Waiting for its turn with the AI…'), 'job_queued_position': _('Waiting in line: {count} before you…'), 'job_timeout': _('The AI did not answer in time. Try again.'), 'job_lost': _('The connection was lost. Try again.'), 'prepared_at': _('Suggestions prepared {time}. Press the button for new ones.') } -%}

{{ _('Review metadata') }}

{%- set further = h.ai_metadata_suggestion_fields() | selectattr('label') | map(attribute='label') | list -%}

{% if further %}{{ _('Ask the AI for suggestions for the title, description, keywords and theme, and for: {fields}.').format(fields=further | join(', ')) }} {% else %}{{ _('Ask the AI for suggestions for the title, description, keywords and theme.') }}{% endif %} {{ _('Only these fields are sent to the AI service. No suggestion is saved or used by itself: you read and approve each one.') }}

{{ _('How it works') }} {{ _('Read more about how the assistant works') }}
{#- Every run is kept as its own box, the newest on top (see review.js, createResultStack). -#}
{#- The automatic completeness check comes after the AI suggestions, open by default, under a heading of its own: it is the portal's rules, without AI, and it follows the form as it is now (a suggestion used above is checked again). -#}

{{ _('Rule check') }}

{{ _('The catalogue\'s rules, checked without AI against the form as it is now: what is missing or needs looking at. It updates when you change a field or use a suggestion.') }}