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

{% block breadcrumbs %}
<li><a href="{% url 'checks' %}">{% trans "checks" %}</a></li>
<li><a href="{% url 'show_check' name=check.check_id %}">{{ check.name }}</a></li>
<li><a href="{% url 'show_check_project' name=check.check_id project=subproject.project.slug %}">{{ subproject.project }}</a></li>
<li><a href="{% url '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 '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 'translate' project=subproject.project.slug subproject=subproject.slug lang=obj.translation__language__code %}{{ ignore_string }}{% if ignore_string %}&amp;{% else %}?{% endif %}type={{ check.check_id }}">{{ obj.count }}</a></td>
</tr>
{% endfor %}
{% for count in source_checks %}
<tr>
<th><a href="{% url 'show_source' project=subproject.project.slug subproject=subproject.slug %}">{% trans "Source" %}</a></th>
<td><a href="{% url 'review_source' project=subproject.project.slug subproject=subproject.slug %}{{ ignore_string }}{% if ignore_string %}&amp;{% else %}?{% endif %}type={{ check.check_id }}">{{ count }}</a></td>
</tr>
{% endfor %}
</tbody>
</table>
{% else %}
<p>
{% trans "There are no matching failed checks!" %}
</p>
{% endif %}

{% endblock %}



