{% load i18n store_tags cleanhtml %}
{% get_current_language as LANGUAGE_CODE %}
{% get_current_language_bidi as LANGUAGE_BIDI %}
<!--! Cell with original -->
<td colspan="1" rowspan="1" class="translate-original" dir="{{ souce_language.get_direction }}">
  <div id="orig{{ unit.index }}" class="translate-original translate-view">
    {% for i, source, title in unit|pluralize_source %}
    {% if title %}<span class="translation-text-headers" lang="{{ LANGUAGE_CODE }}">{{ title }}</span><br />{% endif %}
    <div class="translation-text" lang="{{ source_language.code }}" dir="{{ source_language.get_direction }}">{{ source|fancy_highlight }}</div>
    {% endfor %}
  </div>
  {% if show_comments %}
  {% if unit.getcontext %}
  <div class="translate-context">
    {{ unit.getcontext }}
  </div>
  {% endif %}
  <div class="translate-original comments">
    {% if unit.developer_comment %}
    <div title="{% trans "Developer Comments"}" class="developer-comments" lang="{{ source_language.code }}" dir="{{ source_language.get_direction }}">{{ unit.developer_comment|linebreaks }}</div>
    {% endif %}
    {% if unit.locations %}
    <div class="translate-locations" lang="en" dir="ltr">{{ unit.locations }}</div>
    {% endif %}
  </div>
  {% endif %}
</td>
<td colspan="1" rowspan="1" class="translate-translation" dir="{% if LANGUAGE_BIDI %}rtl{% else %}ltr{% endif %}">
  <div id="trans{{ unit.index }}" class="translate-translation translate-view {% if unit.isfuzzy %}translate-translation-fuzzy{% endif %}" dir="{% if LANGUAGE_BIDI %}rtl{% else %}ltr{% endif %}">
    <!--! Normal view mode -->
    {% for i, target, title in unit|pluralize_target %}
    {% if title %}<span class="translation-text-headers" lang="{{ LANGUAGE_CODE }}">{{ title }}</span><br />{% endif %}
    <div dir="{{ language.get_direction }}" lang="{{ language.code }}" class="translation-text">{{ target|fancy_highlight }}</div>
    {% endfor %}
  </div>
  {% if show_comments and unit.translator_comment %}
  <div class="translate-translation comments" lang="{{ LANGUAGE_CODE }}">
    <div title="{% trans "Translator Comments" %}" class="translator-comments" dir="{{ language.dir }}" lang="{{ language.code }}">{{ unit.translator_comment|linebreaks }}</div>
  </div>
  {% endif %}
</td>
