{% extends "_base.html" %}
{% load i18n %}
{% load static %}
{% load content_filters %}
{% load page_filters %}
{% load rules %}
{% block content %}
    <div>
        <div class="mb-4">
            <h1 class="heading">
                {% translate "Review XLIFF Import" %}
            </h1>
            <p class="pb-4">
                {% translate "Please review the changes that will be applied to the page translations below." %}
            </p>
            <form method="post">
                {% csrf_token %}
                <input id="machine_translated" type="checkbox" name="machine_translated" />
                <label for="machine_translated">
                    {% translate "Machine translated" %}
                </label>
            </br>
            <input type="submit"
                   value='{% translate "Confirm" %}'
                   class="inline-block cursor-pointer bg-blue-500 hover:bg-blue-600 text-white h-full font-bold py-3 px-4 rounded mr-2" />
            <a href="{% url 'pages' region_slug=request.region.slug language_slug=language.slug %}"
               class="inline-block bg-red-500 hover:bg-red-600 text-white h-full font-bold py-3 px-4 rounded">
                {% translate "Abort" %}
            </a>
            <input type="hidden" value={{ upload_dir }} name="upload_dir" />
        </form>
    </div>
    {% for diff in translation_diffs %}
        {% if translation_diffs.count > 1 %}
            {% include "pages/_page_xliff_import_diff.html" with collapsed=True %}
        {% else %}
            {% include "pages/_page_xliff_import_diff.html" %}
        {% endif %}
    {% endfor %}
</div>
{% endblock content %}
