{% load i18n %}
{% load translations %}

<tr>
<td{% if item.translated and item.translation.subproject != unit.translation.subproject and item.target != unit.target %} rowspan="2"{% endif %} class="vertical-badge">
{% if item.translation.subproject == unit.translation.subproject %}
<span class="badge pull-right flip">{% trans "This translation" %}</span>
{% endif %}
{% get_state_badge item %}
<a href="{{ item.get_absolute_url }}">{{ item.translation.subproject }}</a>
</td>
<td>
{% format_translation item.target item.translation.language item.translation.plural %}
</td>
<td{% if item.translated and item.translation.subproject != unit.translation.subproject and item.target != unit.target %}  rowspan="2"{% endif %}>
{% if user_can_translate and item.translated %}
<a class="mergebutton btn btn-success" href="{{ unit.translation.get_translate_url}}?{{ search_url }}&amp;offset={{ offset }}&amp;checksum={{ unit.checksum }}&amp;merge={{ item.id }}" title="{% trans "Use this translation for all components" %}"><i class="fa fa-check"></i> {% trans "Use this translation" %}</a>
{% endif %}
</td>
</tr>
{% if item.translated and item.translation.subproject != unit.translation.subproject and item.target != unit.target %}
<tr>
<td>
<p class="help-block">{% trans "Change compared to this translation:" %}</p>
{% format_translation item.target item.translation.language item.translation.plural unit.target %}
</td>
</tr>
{% endif %}

