{% extends "base.html" %}
{% load i18n %}
{% load translations %}
{% load url from future %}

{% block breadcrumbs %}
<li><a href="{% url 'weblate.trans.views.show_checks' %}">{% trans "checks" %}</a></li>
<li><a href="{% url 'weblate.trans.views.show_check' name=check.check_id %}">{{ check.name }}</a></li>
<li><a href="{% url 'weblate.trans.views.show_check_project' name=check.check_id project=subproject.project.slug %}">{{ subproject.project }}</a></li>
<li><a href="{% url 'weblate.trans.views.show_check_subproject' name=check.check_id project=subproject.project.slug subproject=subproject.slug %}">{{ subproject.name }}</a></li>
{% endblock %}

{% block content %}

<p>
{{ check.description }}
</p>

<p>
{% blocktrans with check.get_doc_url as link %}More information about this check is available in the <a href="{{ link }}">documentation</a>.{% endblocktrans %}
</p>

{% if anychecks %}
<table class="sort simple">
<thead>
<tr>
<th>{% trans "Translation" %}</th>
<th>{% trans "Failures" %}</th>
</tr>
<tbody>
{% for obj in checks %}
<tr>
<th><a href="{% url 'weblate.trans.views.show_translation' project=subproject.project.slug subproject=subproject.slug lang=obj.translation__language__code %}">{% language_name obj.translation__language__code %}</a></th>
<td><a href="{% url 'weblate.trans.views.translate' project=subproject.project.slug subproject=subproject.slug lang=obj.translation__language__code %}?type={{ check.check_id }}">{{ obj.count }}</a></td>
</tr>
{% endfor %}
{% for count in source_checks %}
<tr>
<th><a href="{% url 'weblate.trans.views.show_source' project=subproject.project.slug subproject=subproject.slug %}">{% trans "Source" %}</a></th>
<td><a href="{% url 'weblate.trans.views.review_source' project=subproject.project.slug subproject=subproject.slug %}?type={{ check.check_id }}">{{ count }}</a></td>
</tr>
{% endfor %}
</tbody>
</table>
{% else %}
<p>
{% trans "There are no matching failed checks!" %}
</p>
{% endif %}

{% endblock %}



