{% load i18n %}
{% load statistics %}
{% if stats %}
<table id="stats_comp" class="stats_comp tablesorter">
   <thead>
    <tr>
      <th>{% trans "Language" %}</th>
      <th class="alcenter">{% trans "Translations" %}</th>
    </tr>
   </thead>
   <tbody>
   {% for stat in stats %} 
      <tr class="{% number_range stat.trans_perc %}">
        <td class="left name" id="{{stat.language.code}}">
          {% if stat.language %}
              <a href="{% url release_language_detail release.project.slug release.slug stat.language.code %}" title="{% trans "See the detailed statistics for this language" %}"> 
              {{stat.language.name}} <span class="stat_message" >({{stat.language.code}})</span>
          {% else %}
              <span class="stat_message" title="{% trans "There are no languages registered matching this file" %}" >{{stat.filename}}</span>
          {% endif %}
          {% if stat.error %}
              <span class="i16 notice" title="{% trans "There is at least one file with problems for this language." %}"></span>
          {% endif %}
        </td>
        {% with 160 as barwidth %}
        <td class="stats" style="width: {{ barwidth|add:"2" }}px;">
          <div class="stats_string_comp" title="{% trans "Trans:" %}{{stat.trans}} {% trans "Fuzzy:" %}{{stat.fuzzy}} {% trans "Untrans:" %}{{stat.untrans}}" >{{stat.trans_perc}}% <span class='trans_detail'>({{stat.trans}}/{{stat.fuzzy}}/{{stat.untrans}})</span></div> 
          {% stats_bar_full stat barwidth %}
        </td>
        {% endwith %}
      </tr>
   {% endfor %}
   </tbody>
</table>
{%  endif %}
