{% load i18n %}
{% load translations %}
{% load url from future %}
{% if dictionary %}
<table>
    <thead>
    <tr>
    <th>{% trans "Source" %}</th>
    <th>{% trans "Translation" %}</th>
    <th></th>
    </tr>
    </thead>
    <tbody>
{% for item in dictionary %}
    <tr>
    <td class="translatetext">{{ item.source }}</td>
    <td class="translatetext target">{{ item.target }}</td>
    <td>
    {% if perms.trans.save_translation %}
    <a class="copydict small-button" title="{% trans "Copy word to translation" %}">{% trans "Copy" %}</a>
    {% endif %}
    </td>
    </tr>
{% endfor %}
    </tbody>
</table>
{% else %}
<p>{% trans "No related strings found in dictionary." %}</p>
{% endif %}

<p><a href="{% url 'show_dictionary' project=translation.subproject.project.slug lang=translation.language.code %}" class="button">{% trans "Manage glossary" %}</a></p>
