{% extends "vantage/base.html" %} {% load static vantage i18n %} {% block head %} {% endblock %} {% block content %}

{% if done %}{% translate "Import finished" %}{% else %}{% translate "Preview" %}{% endif %}

{% if done %} {{ result.summary }} · {{ stashed.filename }} {% else %} {% comment %} Said in full, every time. "Dry run" is jargon; "nothing has been written" is the sentence that decides whether someone reads the rest of this page calmly. {% endcomment %} {% blocktranslate trimmed %}Nothing has been written yet. Every row below was validated and saved inside a transaction that was then rolled back.{% endblocktranslate %} {% endif %}

{% if done %} {% blocktranslate with plural_label=panel.get_label_plural|lower %}Back to {{ plural_label }}{% endblocktranslate %} {% else %} {% translate "Change the mapping" %} {% endif %}
  1. 1 {% translate "Upload" %}
  2. 2 {% translate "Map columns" %}
  3. 3 {% translate "Preview" %}
{{ result.created }} {% if done %}{% translate "created" %}{% else %}{% translate "would be created" %}{% endif %}
{{ result.updated }} {% if done %}{% translate "updated" %}{% else %}{% translate "would be updated" %}{% endif %}
{{ result.unchanged }} {% translate "unchanged" %}
{{ result.failed }} {% if done %}{% translate "failed" %}{% else %}{% translate "would fail" %}{% endif %}
{% if mapping.missing_required %}

{% translate "Some required fields have no column." %}

{% for name, label in mapping.missing_required %}{{ label }}{% if not forloop.last %}, {% endif %}{% endfor %} {% blocktranslate trimmed %}must have a value, and nothing in this file supplies one. Rows that create a new record will fail; rows that update an existing one are unaffected.{% endblocktranslate %}

{% endif %} {% if mapping.ignored %}

{% translate "Columns not being written" %}

{% endif %} {% if result.errors %}

{% if done %} {% blocktranslate count counter=result.errors|length %}{{ counter }} problem{% plural %}{{ counter }} problems{% endblocktranslate %} {% else %} {% blocktranslate count counter=result.errors|length %}{{ counter }} problem to fix first{% plural %}{{ counter }} problems to fix first{% endblocktranslate %} {% endif %}

{% translate "Download as CSV" %}
{% for error in errors_shown %} {% endfor %}
{% translate "Row" %} {% translate "Column" %} {% translate "Problem" %}
{{ error.row }} {{ error.column|default:"—" }} {{ error.message }}
{% if errors_hidden %}

{% blocktranslate trimmed %}{{ errors_hidden }} more not shown. The CSV above has every one, with its row number and column.{% endblocktranslate %}

{% endif %}
{% endif %} {% if result.diffs %}

{% if done %}{% translate "What changed" %}{% else %}{% translate "What would change" %}{% endif %}

{% blocktranslate count counter=result.diffs|length %}The first {{ counter }} updated record.{% plural %}The first {{ counter }} updated records.{% endblocktranslate %}

{% for diff in result.diffs %}

{{ diff.label }} {% blocktranslate with pk=diff.pk row=diff.row %}#{{ pk }} · row {{ row }}{% endblocktranslate %}

{% for change in diff.changes %}
{{ change.label }}
{{ change.before|default:"—" }} {{ change.after|default:"—" }}
{% endfor %}
{% endfor %}
{% endif %} {% if not done %}
{% csrf_token %} {% for field in hidden %} {% endfor %}
{{ mapping.mode_label }} {% if result.failed %} {% comment %} Stated on the control itself. The counts are at the top of a long page, and the last thing a person reads before clicking is the button. {% endcomment %} {% comment %} The `pluralize` filter only ever appends an English "s"; a plural sentence has to go through blocktranslate count so a language with three plural forms — or none — gets all of them. {% endcomment %} · {% blocktranslate count counter=result.failed %}{{ counter }} row will be skipped{% plural %}{{ counter }} rows will be skipped{% endblocktranslate %} {% endif %} {% translate "Back" %}
{% endif %} {% endblock %}