{% extends "projects/project_detail_childs.html" %}
{% load i18n %}
{% load statistics %}

{% block extra_head %}
  <link rel="alternate" type="application/rss+xml" title="RSS" href="{% url release_language_feed release.project.slug release.slug language.code %}" />
  <script type="text/javascript" src="{{ MEDIA_URL }}js/file_submit.js"></script>
  <script type="text/javascript" src="{{ MEDIA_URL }}js/watch_toggle.js"></script>
  <script type="text/javascript" src="{{ MEDIA_URL }}js/tablesorted.js"></script> 
  <link media="screen" href="{{ MEDIA_URL }}css/tablesorter.css" type="text/css" rel="stylesheet" />
  
  <script type="text/javascript" src="{{ MEDIA_URL }}js/houdini.js"></script>
  <link media="screen" href="{{ MEDIA_URL }}css/houdini.css" type="text/css" rel="stylesheet" />

  <style type="text/css">
    form.submit_form { display: none; }
    form.submit_form fieldset { border: 2px dotted #ddd; }
  </style>
  {% include "translations/stats_table_filter_header.html" %}

{% endblock %}

{% block body_class %}{{ block.super }} release_detail{% endblock %}

{% block title %}{{ block.super }} | {{ release.name }} | {{ language.name }}{% endblock %}

{% block breadcrumb %}{{ block.super }} &raquo; <a href="{% url release_detail release.project.slug release.slug %}">{% blocktrans with release.name as release_name %}Release '{{ release_name }}{% endblocktrans %}'</a> &raquo; {{ language.name }}{% endblock %}

{% block content_sec %}
  <a class="simlink" href="{% url release_language_feed release.project.slug release.slug language.code %}" title="Statistics feed for this language and release"><img border="0" src="{{ MEDIA_URL }}/images/icons/feed.png" /></a>
{% endblock %}

{% block content_title %}<h2 class="pagetitle">{{ release.name }}<sup class="entry_metalink">{{ language.name }}</sup></h2>{% endblock %}

{% block content_main %}

{% if pofile_list %}

<h3>{% trans "Project/Component statistics" %} </h3>

{% include "translations/stats_table_filter_box.html" %}

{% lang_stats_table pofile_list %}

{% url release_language_download release.project.slug release.slug language.code "zip" as zip_download_url %}
{% url release_language_download release.project.slug release.slug language.code "targz" as targz_download_url %}

 {% if zip_download_url %}
 <h4>Download</h4>

 Receive all the translation files in a compressed archive.
 <a class="i16 compress buttonized" href="{{ zip_download_url }}">Get <code>.zip</code></a>
 <a class="i16 compress buttonized" href="{{ targz_download_url }}">Get <code>.tar.gz</code></a>
 {% endif %}
 
{% endif %}

{% if not pofile_list %}
{% url contact_form as contact_form %}
  <p>{% blocktrans %}Transifex searched for projects containing translation files for this language and release, but couldn't find any. Try submitting such a file and check again.{% endblocktrans %}</p>
  <p class="i16 tip">{% blocktrans %}If you think this shouldn't happen, please <a href="{{ contact_form }}">let us know</a>.{% endblocktrans %}</span></p>
{% endif %}

{% if untrans_comps %}
  <h3>{% blocktrans %}Untranslated Components{% endblocktrans %}</h3>
  <p class="explanation">
  {% blocktrans with release.name as release_name and language.name as language_name %}The following components will be included in {{ release_name }}, but there are no translations sent for {{language_name}} yet.{% endblocktrans %}</p>
  <div class="component_list">
  <ul class="simple">
  {% for comp in untrans_comps %}
    <li><p class="i16 component"><a href="{{ comp.get_absolute_url }}">{{ comp.project.name }} &raquo; {{ comp.name }}</a></p></li>
  {% endfor %}
  </ul>
  </div>

{% endif %}

{% endblock %}
