{% load i18n %}
{% if unit.readonly %}
    {% if not unit.source_unit.translated %}
        <span class="badge">{% trans "Source in review" %}</span>
    {% elif unit.is_source and unit.translation.component.template and not unit.translation.component.edit_template %}
        <span class="badge" title="{% trans "Source string editing is disabled." %}">{% trans "Source string" %}</span>
    {% elif unit.is_source and not unit.translation.component.template and unit.translation.component.manage_units %}
        <span class="badge" title="{% trans "Source strings can’t be edited. You can delete them and add new ones." %}">{% trans "Source string" %}</span>
    {% elif unit.is_source %}
        <span class="badge" title="{% trans "The source string cannot be edited." %}">{% trans "Source string" %}</span>
    {% else %}
        <span class="badge">{% trans "Read only" %}</span>
    {% endif %}
{% endif %}
