{% load i18n wagtailadmin_tags %}
<button
    type="submit"
    name="action-publish"
    value="action-publish"
    class="button button-longrunning"
    data-controller="w-progress"
    data-action="w-progress#activate"
    data-w-progress-active-value="{% if is_scheduled %}{% trans 'Scheduling…' %}{% else %}{% trans 'Publishing…' %}{% endif %}"
>
    {% if icon_name %}{% icon name=icon_name classname="button-longrunning__icon" %}{% endif %}
    {% icon name="spinner" %}
    <em data-w-progress-target="label">{% if is_scheduled %}{% trans "Schedule to publish" %}{% elif is_revision %}{% trans 'Publish this version' %}{% else %}{{ label }}{% endif %}</em>
</button>
