{% extends "po_projects/base.html" %}
{% load i18n crispy_forms_tags %}{% load url from future %}
{% block title %}{% trans "Manage Catalog" %}{% endblock %}

{% block content %}
    {% if perms.po_projects.change_catalog %}<hr>
    <h3>{% trans "Edit infos" %}</h3>
    {% crispy form %}{% endif %}
    
    <hr>
    <h3>{% trans "Messages" %}</h3>
    <p>There is {{ catalog.translationmsg_set.count }} messages in the catalog, {{ catalog.count_empty_translations }} are empty and {{ catalog.count_fuzzy_translations }} are fuzzy.</p> 
    
    <p class="text-right">
        <a href="{% url 'po_projects:catalog-messages-download' slug=project.slug locale=catalog.locale %}" class="button">{% trans "Download PO" %}</a>
        {% if perms.po_projects.edit_messages %}<a href="{% url 'po_projects:catalog-messages-edit' slug=project.slug locale=catalog.locale %}" class="button">{% trans "Edit messages" %}</a>{% endif %}
    </p>
{% endblock %}
