added translations

This commit is contained in:
Joren de Graaf
2026-10-01 22:43:45 +02:00
parent 2e36f26089
commit 3b864f001d
78 changed files with 1787 additions and 291 deletions
+10 -10
View File
@@ -1,29 +1,29 @@
{% load vite %}
{% load i18n vite %}
<!DOCTYPE html>
<html lang="en" data-theme="dark">
<html lang="{{ request.LANGUAGE_CODE|default:'en' }}" data-theme="dark">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Hello</title>
<title>{% trans "Hello" %}</title>
{% vite_asset "frontend/src/entries/member-form.js" %}
</head>
{% include "js_translations.html" %}</head>
<body>
<main class="card">
<p class="eyebrow"><span class="sparkle">✦</span> A warm welcome</p>
<h1>What’s your name?</h1>
<p class="intro">Enter your name below and we’ll say hello.</p>
<p class="eyebrow"><span class="sparkle">✦</span> {% trans "A warm welcome" %}</p>
<h1>{% trans "What’s your name?" %}</h1>
<p class="intro">{% trans "Enter your name below and we’ll say hello." %}</p>
<form method="post" novalidate>
{% csrf_token %}
{{ form.as_p }}
<button type="submit">Save</button>
<button type="submit">{% trans "Save" %}</button>
</form>
{% if message %}
<p class="result" role="status">{{ message }}</p>
{% endif %}
<br/>
<a href="{% url 'member_list' %}" class="button">Toon leden <span aria-hidden="true">→</span></a>
<a href="{% url 'member_list' %}" class="button">{% trans "Show members" %} <span aria-hidden="true">→</span></a>
</main>
</body>
</html>
</html>
+15 -15
View File
@@ -1,12 +1,12 @@
{% load vite %}
{% load i18n vite %}
<!DOCTYPE html>
<html lang="en" data-theme="dark">
<html lang="{{ request.LANGUAGE_CODE|default:'en' }}" data-theme="dark">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Members</title>
<title>{% trans "Members" %}</title>
{% vite_asset "frontend/src/entries/member-list.js" %}
</head>
{% include "js_translations.html" %}</head>
<body>
<main class="page">
<section class="card">
@@ -14,13 +14,13 @@
<div>
<p class="eyebrow">
<span class="sparkle">✦</span>
Member directory
{% trans "Member directory" %}
</p>
<h1>All members</h1>
<p class="intro">A complete overview of everyone currently registered in the database.</p>
<h1>{% trans "All members" %}</h1>
<p class="intro">{% trans "A complete overview of everyone currently registered in the database." %}</p>
</div>
<p class="count">{{ members|length }} member{{ members|length|pluralize }}</p>
<p class="count">{% blocktrans count count=members|length %}{{ count }} member{% plural %}{{ count }} members{% endblocktrans %}</p>
</header>
@@ -30,9 +30,9 @@
<table>
<thead>
<tr>
<th scope="col">Member</th>
<th scope="col">Phone number</th>
<th scope="col">Joined</th>
<th scope="col">{% trans "Member" %}</th>
<th scope="col">{% trans "Phone number" %}</th>
<th scope="col">{% trans "Joined" %}</th>
</tr>
</thead>
<tbody>
@@ -56,15 +56,15 @@
{% else %}
<div class="empty">
<div class="empty-icon">◎</div>
<h2>No members yet</h2>
<p>Add the first member to see them here.</p>
<h2>{% trans "No members yet" %}</h2>
<p>{% trans "Add the first member to see them here." %}</p>
</div>
{% endif %}
</section>
<br/>
<a href="{% url 'member_create' %}" class="button">Open nog een formulier <span aria-hidden="true">→</span></a>
<a href="{% url 'member_create' %}" class="button">{% trans "Open another form" %} <span aria-hidden="true">→</span></a>
</main>
</body>
</html>
</html>
+11 -11
View File
@@ -1,30 +1,30 @@
{% load vite %}
{% load i18n vite %}
<!doctype html>
<html lang="en" data-theme="dark">
<html lang="{{ request.LANGUAGE_CODE|default:'en' }}" data-theme="dark">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Sign in · Sound Signal</title>
<title>{% trans "Sign in · Sound Signal" %}</title>
{% vite_asset "frontend/src/entries/login.js" %}
</head>
{% include "js_translations.html" %}</head>
<body>
<main class="card">
<p>✦ Sound Signal</p>
<h1>Sign in</h1>
<p class="intro">Sign in to manage your notification settings.</p>
<h1>{% trans "Sign in" %}</h1>
<p class="intro">{% trans "Sign in to manage your notification settings." %}</p>
{% if form.errors %}
<div class="error">Your username and password did not match. Please try again.</div>
<div class="error">{% trans "Your username and password did not match. Please try again." %}</div>
{% endif %}
<form method="post">
{% csrf_token %}
<label for="{{ form.username.id_for_label }}">Username</label>
<label for="{{ form.username.id_for_label }}">{% trans "Username" %}</label>
{{ form.username }}
<label for="{{ form.password.id_for_label }}">Password</label>
<label for="{{ form.password.id_for_label }}">{% trans "Password" %}</label>
{{ form.password }}
{% if next %}<input type="hidden" name="next" value="{{ next }}">{% endif %}
<button type="submit">Sign in</button>
<button type="submit">{% trans "Sign in" %}</button>
</form>
<p class="intro">You will return to the page you requested.</p>
<p class="intro">{% trans "You will return to the page you requested." %}</p>
</main>
</body>
</html>
@@ -1 +1,2 @@
{% if success %}<div class="alert alert--success">✓ Test notification sent successfully.</div>{% else %}<div class="alert alert--error">Could not send the test notification: {{ error }}</div>{% endif %}
{% load i18n %}
{% if success %}<div class="alert alert--success">✓ {% trans "Test notification sent successfully." %}</div>{% else %}<div class="alert alert--error">{% blocktrans %}Could not send the test notification:{% endblocktrans %} {{ error }}</div>{% endif %}
+22 -12
View File
@@ -1,31 +1,41 @@
{% load vite %}
{% load i18n vite %}
<!doctype html>
<html lang="en" data-theme="dark">
<html lang="{{ request.LANGUAGE_CODE }}" data-theme="dark">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Settings · Sound Signal</title>
<title>{% trans "Settings · Sound Signal" %}</title>
<script src="https://cdn.jsdelivr.net/npm/htmx.org@2.0.4/dist/htmx.min.js"></script>
{% vite_asset "frontend/src/entries/settings.js" %}
</head>
{% include "js_translations.html" %}</head>
<body>
<main class="card">
<h1>Settings</h1>
<p class="intro">Manage personal notification preferences.</p>
<h1>{% trans "Settings" %}</h1>
<p class="intro">{% trans "Manage your personal preferences." %}</p>
{% if messages %}<ul class="messages">{% for message in messages %}<li class="alert alert--success">{{ message }}</li>{% endfor %}</ul>{% endif %}
<form method="post" action="{% url 'user_settings' %}">
{% csrf_token %}
<section class="section" aria-labelledby="language-title">
<h2 id="language-title">{% trans "Language" %}</h2>
<label for="{{ language_form.preferred_language.id_for_label }}">{% trans "Preferred language" %}</label>
{{ language_form.preferred_language }}
{{ language_form.preferred_language.errors }}
</section>
<button class="button" type="submit" name="save_language" value="1">{% trans "Save language" %}</button>
</form>
<form method="post" action="{% url 'user_settings' %}">
{% csrf_token %}
<section class="section" aria-labelledby="ntfy-title">
<h2 id="ntfy-title">Notifications / ntfy</h2>
<p class="help">Use a topic URL from your ntfy server. Test the current URL before saving it.</p>
<label for="ntfy-url">Topic URL</label>
<h2 id="ntfy-title">{% trans "Notifications / ntfy" %}</h2>
<p class="help">{% trans "Use a topic URL from your ntfy server. Test the current URL before saving it." %}</p>
<label for="ntfy-url">{% trans "Topic URL" %}</label>
{{ form.ntfy_url }}
{{ form.ntfy_url.errors }}
<div class="check">{{ form.ntfy_enabled }}<label for="{{ form.ntfy_enabled.id_for_label }}">Enable ntfy notifications</label></div>
<button class="button button--secondary" type="button" hx-post="{% url 'ntfy_test_notification' %}" hx-include="#ntfy-url, [name='csrfmiddlewaretoken']" hx-target="#ntfy-test-result" hx-swap="innerHTML">Test notification</button>
<div class="check">{{ form.ntfy_enabled }}<label for="{{ form.ntfy_enabled.id_for_label }}">{% trans "Enable ntfy notifications" %}</label></div>
<button class="button button--secondary" type="button" hx-post="{% url 'ntfy_test_notification' %}" hx-include="#ntfy-url, [name='csrfmiddlewaretoken']" hx-target="#ntfy-test-result" hx-swap="innerHTML">{% trans "Test notification" %}</button>
<div id="ntfy-test-result" aria-live="polite"></div>
</section>
<button class="button" type="submit">Save settings</button>
<button class="button" type="submit">{% trans "Save settings" %}</button>
</form>
</main>
</body>
+10 -10
View File
@@ -1,25 +1,25 @@
{% load vite %}
{% load i18n vite %}
<!DOCTYPE html>
<html lang="en" data-theme="dark">
<html lang="{{ request.LANGUAGE_CODE|default:'en' }}" data-theme="dark">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Hello</title>
<title>{% trans "Hello" %}</title>
{% vite_asset "frontend/src/entries/member-success.js" %}
</head>
{% include "js_translations.html" %}</head>
<body>
<main class="card">
<p class="eyebrow"><span class="sparkle">✦</span> A warm welcome</p>
<h1>What’s your name?</h1>
<p class="intro">Toegevoegt aan de database.</p>
<p class="eyebrow"><span class="sparkle">✦</span> {% trans "A warm welcome" %}</p>
<h1>{% trans "What’s your name?" %}</h1>
<p class="intro">{% trans "Added to the database." %}</p>
{% if message %}
<p class="result" role="status">{{ message }}</p>
{% endif %}
<a href="{% url 'member_create' %}" class="button">Open nog een formulier <span aria-hidden="true">→</span></a>
<a href="{% url 'member_list' %}" class="button">Toon leden <span aria-hidden="true">→</span></a>
<a href="{% url 'member_create' %}" class="button">{% trans "Open another form" %} <span aria-hidden="true">→</span></a>
<a href="{% url 'member_list' %}" class="button">{% trans "Show members" %} <span aria-hidden="true">→</span></a>
</main>
</body>
</html>
</html>