{% load i18n %}
{% load django_tables2 %}

<p>
{% with name=product.title parent_name=product.parent.title %}
    {% if product.is_child %}

        {% if creating %}
            {% if product.title %}
                {% blocktrans %}
                    Created product variant '{{ name }}'.
                {% endblocktrans %}
            {% else %}
                {% blocktrans %}
                    Created variant of '{{ parent_name }}'.
                {% endblocktrans %}
            {% endif %}
        {% else %}
            {% if product.title %}
                {% blocktrans %}
                    Updated product variant '{{ name }}'.
                {% endblocktrans %}
            {% else %}
                {% blocktrans %}
                    Updated a variant of '{{ parent_name }}'.
                {% endblocktrans %}
            {% endif %}
        {% endif %}

    {% else %}

        {% if creating %}
            {% blocktrans %}
                Created product '{{ name }}'.
            {% endblocktrans %}
        {% else %}
            {% blocktrans %}
                Updated product '{{ name }}'.
            {% endblocktrans %}
        {% endif %}

    {% endif %}
{% endwith %}

</p>

<p>
    <a href="{% url 'dashboard:catalogue-product' pk=product.pk %}{% querystring %}" class="btn btn-success">{% trans "Edit again" %}</a>
</p>
