{% load i18n wagtailadmin_tags %}
<button
    type="submit"
    class="button action-save button-longrunning"
    data-controller="w-progress w-kbd"
    data-action="w-progress#activate"
    data-w-kbd-key-value="mod+s"
    data-w-kbd-scope-value="global"
    data-w-progress-active-value="{% trans 'Saving…' %}"
>
    {% if draftstate_enabled %}
        {% icon name="draft" classname="button-longrunning__icon" %}
    {% else %}
        {% icon name=icon_name classname="button-longrunning__icon" %}
    {% endif %}
    {% icon name="spinner" %}
    <em data-w-progress-target="label">
        {% if is_revision %}
            {% if draftstate_enabled %}
                {% trans 'Replace current draft' %}
            {% else %}
                {% trans 'Replace current revision' %}
            {% endif %}
        {% elif draftstate_enabled %}
            {% trans 'Save draft' %}
        {% else %}
            {% trans 'Save' %}
        {% endif %}
    </em>
</button>
