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

<tr>
<td{% if item.translated and item.translation.component != unit.translation.component and item.target != unit.target %} rowspan="2"{% endif %} class="vertical-badge">
{% if item.pk == unit.pk %}
<span class="badge pull-right flip">{% trans "This translation" %}</span>
{% endif %}
{% get_state_badge item %}
<a href="{{ item.get_absolute_url }}">{{ item.translation.component }}</a>
</td>
<td>
{% format_translation item.target item.translation.language item.translation.plural %}
</td>
<td{% if item.translated and item.translation.component != unit.translation.component and item.target != unit.target %}  rowspan="2"{% endif %}>
{% if user_can_translate and item.translated %}
<a class="mergebutton btn btn-primary" 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" %}">{% trans "Use this translation" %}</a>
{% endif %}
</td>
</tr>
{% if item.translated and item.translation.component != unit.translation.component 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 %}
