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

<table class="table table-condensed">
<thead>
<tr>
    <th>{{ unit.translation.component.context_label }}</th>
    {% if not unit.translation.is_source %}
    <th>{{ unit.translation.component.project.source_language }}</th>
    {% endif %}
    <th>{{ unit.translation.language }}</th>
    <th>{% trans "State" %}</th>
</tr>
</thead>
<tbody>
{% for unit in units %}
<tr {% if current_unit.id == unit.id %}class="current_translation"{% endif %}>
<td>{% if unit.context %}<a href="{{ unit.get_absolute_url }}">{% format_translation unit.context unit.translation.component.project.source_language %}</a>{% endif %}</td>
{% if not unit.translation.is_source %}
<td><a href="{{ unit.get_absolute_url }}">{% format_translation unit.source unit.translation.component.project.source_language %}</a></td>
{% endif %}
<td><a href="{{ unit.get_absolute_url }}">{% format_translation unit.target unit.translation.language unit.translation.plural %}</a></td>
<td>{% get_state_flags unit True %}</td>
</tr>
{% endfor %}
</tbody>
</table>
