{% load i18n locale staticpages %}
{% with unit.get_critical_qualitychecks as checks_critical %}
{% if checks_critical %}
<div class="unit-checks">
  <span class="sidetitle" lang="{{ LANGUAGE_CODE }}" title="{% trans 'Critical issues with the translation' %}">{% trans "Critical errors:" %}</span>
  <ul class="checks checks-critical">
    {% for check in checks_critical %}
    <li class="check{% if check.false_positive %} false-positive{% endif %} js-check-{{ check.id }}">
      <a href="{% url 'pootle-checks-descriptions' %}#{{ check.name }}" target="_blank">{{ check.display_name }}</a>
      {% if canreview %}
      <a class="js-toggle-check toggle-check" data-check-id="{{ check.id }}">
        <i title="{% trans 'Mute quality check' %}" class="mute-check icon-block"></i>
        <i title="{% trans 'Unmute quality check' %}" class="unmute-check icon-block-muted"></i>
      </a>
      {% endif %}
    </li>
    {% endfor %}
  </ul>
</div>
{% endif %}
{% endwith %}
{% with unit.get_warning_qualitychecks as checks_warning %}
{% if checks_warning %}
<div class="unit-checks">
  <span class="sidetitle" lang="{{ LANGUAGE_CODE }}" title="{% trans 'Possible issues with the translation' %}">{% trans "Watch out for:" %}</span>
  <ul class="checks checks-warning">
    {% for check in checks_warning %}
    <li class="check-warning{% if check.false_positive %} false-positive{% endif %} js-check-{{ check.id }}">
      <a href="{% url 'pootle-checks-descriptions' %}#{{ check.name }}" target="_blank">{{ check.display_name }}</a>
      {% if canreview %}
      <a class="js-toggle-check toggle-check" data-check-id="{{ check.id }}">
        <i title="{% trans 'Mute quality check' %}" class="mute-check icon-block"></i>
        <i title="{% trans 'Unmute quality check' %}" class="unmute-check icon-block-muted"></i>
      </a>
      {% endif %}
    </li>
    {% endfor %}
  </ul>
</div>
{% endif %}
{% endwith %}
