{% extends "dashboard/base.html" %} {% block title %}Dashboard - Translator{% endblock %} {% block extra_css %} {% if is_privileged %} {% endif %} {% endblock %} {% block content %}
Total entries: {{ total_entries }}
{% for lang in languages %}
{{ lang.name }} {{ lang.lang }}
{{ lang.verified }} verified {{ lang.unverified }} unverified
{% if lang.translated > 0 %}
{% endif %}
{{ lang.translated }}/{{ lang.total }} translated {% if lang.missing > 0 %} ({{ lang.missing }} missing){% endif %}
{% empty %}

No translations found

{% endfor %}
{% if is_privileged %} {% endif %} function filterBySource(source) { const url = new URL(window.location.href); if (source) { url.searchParams.set('source', source); } else { url.searchParams.delete('source'); } window.location.href = url.toString(); } stapelDom.register({filterBySource: (node) => filterBySource(node.value)}); {% if is_privileged %} function getCookie(name) { const value = `; ${document.cookie}`; const parts = value.split(`; ${name}=`); if (parts.length === 2) return parts.pop().split(';').shift(); return null; } function refreshCsrfToken() { const csrfToken = getCookie('csrftoken'); if (csrfToken) { const input = document.querySelector('#export-modal input[name="csrfmiddlewaretoken"]'); if (input) input.value = csrfToken; } } function openExportModal() { refreshCsrfToken(); document.getElementById('export-modal').classList.add('active'); } function closeExportModal() { document.getElementById('export-modal').classList.remove('active'); } function handleExportSubmit() { setTimeout(function() { closeExportModal(); refreshCsrfToken(); }, 100); } function openImportModal() { refreshCsrfToken(); document.getElementById('import-modal').classList.add('active'); } function closeImportModal() { document.getElementById('import-modal').classList.remove('active'); } stapelDom.register({ openExportModal: openExportModal, closeExportModal: closeExportModal, handleExportSubmit: handleExportSubmit, openImportModal: openImportModal, closeImportModal: closeImportModal, }); // Close modals on Escape document.addEventListener('keydown', function(e) { if (e.key === 'Escape') { closeExportModal(); closeImportModal(); } }); // Close modals on overlay click document.getElementById('export-modal').addEventListener('click', function(e) { if (e.target === this) closeExportModal(); }); document.getElementById('import-modal').addEventListener('click', function(e) { if (e.target === this) closeImportModal(); }); {% endif %} {% endblock %}