{% load i18n %}

{% if task.is_pending %}
    <span>{% trans "Sync pending!" %}</span>
{% elif task.is_in_progress %}
    <span>{% trans "Sync in progress!" %}</span>
{% elif task.is_successful %}
    <span>{% trans "Sync successful!" %}</span>
{% elif task.is_failed %}
    <span>{% trans "Sync failed!" %}</span>
{% elif task.is_cancelled %}
    <span>{% trans "Sync cancelled!" %}</span>
{% endif %}

<a href="{{ task.get_absolute_url }}" class="btn btn-warning" target="_blank">{% trans "View details" %}</a>
