Community reporting
-Report what you heard.
-Quickly log fireworks when they happen. Your optional location is represented as an H3 cell on the map, rather than as precise coordinates.
+{% trans "Community reporting" %}
+{% trans "Report what you heard." %}
+{% trans "Quickly log fireworks when they happen. Your optional location is represented as an H3 cell on the map, rather than as precise coordinates." %}
Recent reports
Activity map
{% trans "Recent reports" %}
{% trans "Activity map" %}
Audio analysis
Classify a recording
{% trans "Audio analysis" %}
{% trans "Classify a recording" %}
Manual fireworks report
- -Report details
-This was a manual report; there is no audio classification attached.
+{% trans "Manual fireworks report" %}
+ +{% trans "Report details" %}
+{% trans "This was a manual report; there is no audio classification attached." %}
{% else %}{{ event.original_filename }}
- -Top sound classes
+ +{% trans "Top sound classes" %}
{% for prediction in predictions %}No predictions returned.
+{% trans "No predictions returned." %}
{% endfor %} -Notable moments
+{% trans "Notable moments" %}
{% for prediction in peak_predictions %}No peak events returned.
+{% trans "No peak events returned." %}
{% endfor %} {% endif %} diff --git a/fireworks_detect/templates/fireworks_detect/events.html b/fireworks_detect/templates/fireworks_detect/events.html index f832d0c..7afee08 100644 --- a/fireworks_detect/templates/fireworks_detect/events.html +++ b/fireworks_detect/templates/fireworks_detect/events.html @@ -1,2 +1,2 @@ -{% load vite %} -Reviewed signal archive
Approved events.
This feed refreshes automatically every three seconds after a pending sample is approved in admin.
Latest events
Loading events…
Select an event
Choose an approved event to inspect its classification details.
{% trans "Reviewed signal archive" %}
{% trans "Approved events." %}
{% trans "This feed refreshes automatically every three seconds after a pending sample is approved in admin." %}
{% trans "Latest events" %}
{% trans "Loading events…" %}
{% trans "Select an event" %}
{% trans "Choose an approved event to inspect its classification details." %}
No approved events yet. Submit a classification, then approve it from the Pending page in admin.
+{% trans "No approved events yet. Submit a classification, then approve it from the Pending page in admin." %}
{% endif %} diff --git a/fireworks_detect/templates/fireworks_detect/home.html b/fireworks_detect/templates/fireworks_detect/home.html index c0f8aa7..ac798b8 100644 --- a/fireworks_detect/templates/fireworks_detect/home.html +++ b/fireworks_detect/templates/fireworks_detect/home.html @@ -1,13 +1,14 @@ -{% load vite %} +{% load i18n vite %} - + -Audio event analysis
-See what your audio heard.
-Drop a recording to identify its most likely sounds. Firework-related signals are - highlighted in amber; speech-related signals are marked in red for future privacy filtering.
- Here's some - samples to test with +{% trans "Audio event analysis" %}
+{% trans "See what your audio heard." %}
+{% blocktrans trimmed %}Drop a recording to identify its most likely sounds. Firework-related signals are highlighted in amber; speech-related signals are marked in red for future privacy filtering.{% endblocktrans %}
+ {% trans "Here are some samples to test with" %}No recording needed
-Report fireworks now
-Choose how many times you heard fireworks, then send it straight to Pending. The report is timestamped now.
+{% trans "No recording needed" %}
+{% trans "Report fireworks now" %}
+{% trans "Choose how many times you heard fireworks, then send it straight to Pending. The report is timestamped now." %}
{{ error }}
+ {% trans "Could not report fireworks" %}{{ error }}
{% else %} - Report sent to Pending{{ pending.occurrences }} occurrence{{ pending.occurrences|pluralize }} reported at {{ pending.created_at|date:"H:i" }}.
+ {% trans "Report sent to Pending" %}{% blocktrans count count=pending.occurrences with time=pending.created_at|date:"H:i" %}{{ count }} occurrence reported at {{ time }}.{% plural %}{{ count }} occurrences reported at {{ time }}.{% endblocktrans %}
{% endif %}Manual report intelligence
Sound activity map.
Reviewed manual reports with a captured location appear as their H3 cell, not their precise coordinates. Saved phone compass readings show the reported direction of the sound.
+{% trans "Manual report intelligence" %}
{% trans "Sound activity map." %}
{% trans "Reviewed manual reports with a captured location appear as their H3 cell, not their precise coordinates. Saved phone compass readings show the reported direction of the sound." %}
{{ error }}
{{ pending.original_filename }} is ready for administrator review.
{{ error }}
{% blocktrans with filename=pending.original_filename %}{{ filename }} is ready for administrator review.{% endblocktrans %}
Audio event analysis
-See what your audio heard.
-Drop a recording to identify its most likely sounds. Firework-related signals are highlighted in amber; speech-related signals are marked in red for future privacy filtering.
+{% trans "Audio event analysis" %}
+{% trans "See what your audio heard." %}
+{% trans "Drop a recording to identify its most likely sounds. Firework-related signals are highlighted in amber; speech-related signals are marked in red for future privacy filtering." %}
Reported " + report.reported_on; + const visualStatus = report.visually_confirmed ? (t.visuallyConfirmed || "Visually confirmed") : (t.notVisuallyConfirmed || "Not visually confirmed"); + let detail = report.occurrences + " " + (report.occurrences === 1 ? (t.occurrence || "occurrence") : (t.occurrences || "occurrences")) + + " · " + visualStatus + "
" + (t.reported || "Reported") + " " + report.reported_on; if (report.direction_degrees !== null) { - detail += "
Compass direction " + Math.round(report.direction_degrees) + "° (" + cardinalDirection(report.direction_degrees) + ")"; + detail += "
" + (t.compassDirection || "Compass direction") + " " + Math.round(report.direction_degrees) + "° (" + cardinalDirection(report.direction_degrees) + ")"; if (report.direction_accuracy_degrees !== null) { detail += " (±" + Math.round(report.direction_accuracy_degrees) + "°)"; } } L.marker(report.center, { icon: reportIcon }).addTo(map).bindPopup( - "Manual report · H3 " + report.cell + "" + + "" + (t.manualReport || "Manual report") + " · H3 " + report.cell + "" + "" ); diff --git a/frontend/src/scripts/manual-report.js b/frontend/src/scripts/manual-report.js index e2964be..45abdaa 100644 --- a/frontend/src/scripts/manual-report.js +++ b/frontend/src/scripts/manual-report.js @@ -1,3 +1,4 @@ + const t = window.BOOMCAST_I18N || {}; const manualForm = document.querySelector("#manual-report-form"); const manualSubmit = document.querySelector("#manual-submit"); @@ -27,14 +28,14 @@ }; const showCapturedDirection = (heading, accuracy) => { - const accuracyText = accuracy === null ? "Accuracy unavailable" : "Accuracy: ±" + displayDegrees(accuracy) + "°"; + const accuracyText = accuracy === null ? (t.accuracyUnavailable || "Accuracy unavailable") : (t.accuracy || "Accuracy") + ": ±" + displayDegrees(accuracy) + "°"; directionStatus.innerHTML = "" + displayDegrees(heading) + "° · " + cardinalDirection(heading) + "
" + accuracyText; - captureDirectionButton.textContent = "Stop direction capture"; + captureDirectionButton.textContent = (t.stopCapture || "Stop direction capture"); }; const listenForCompassReading = () => { stopCompassReading(); - directionStatus.textContent = "Point the top of your phone toward the sound — direction will update live."; + directionStatus.textContent = (t.pointPhone || "Point the top of your phone toward the sound — direction will update live."); orientationListener = (event) => { const isWebKitCompass = "webkitCompassHeading" in event; const heading = isUsableNumber(event.webkitCompassHeading) @@ -55,34 +56,34 @@ window.addEventListener("deviceorientation", orientationListener); compassUnavailableTimeout = window.setTimeout(() => { stopCompassReading(); - captureDirectionButton.textContent = "Capture direction"; - directionStatus.textContent = "Compass unavailable on this device."; + captureDirectionButton.textContent = (t.captureDirection || "Capture direction"); + directionStatus.textContent = (t.compassUnavailable || "Compass unavailable on this device."); }, 15000); }; const captureDirection = async () => { if (orientationListener) { stopCompassReading(); - captureDirectionButton.textContent = "Capture again"; + captureDirectionButton.textContent = (t.captureAgain || "Capture again"); return; } if (!window.isSecureContext) { - directionStatus.textContent = "Compass capture requires a secure HTTPS connection."; + directionStatus.textContent = (t.secureCompass || "Compass capture requires a secure HTTPS connection."); return; } if (typeof window.DeviceOrientationEvent === "undefined") { - directionStatus.textContent = "Compass unavailable on this device."; + directionStatus.textContent = (t.compassUnavailable || "Compass unavailable on this device."); return; } if (typeof DeviceOrientationEvent.requestPermission === "function") { - directionStatus.textContent = "Requesting compass permission…"; + directionStatus.textContent = (t.compassPermission || "Requesting compass permission…"); try { if (await DeviceOrientationEvent.requestPermission(true) !== "granted") { - directionStatus.textContent = "Compass permission denied."; + directionStatus.textContent = (t.compassDenied || "Compass permission denied."); return; } } catch (error) { - directionStatus.textContent = "Compass permission denied."; + directionStatus.textContent = (t.compassDenied || "Compass permission denied."); return; } } @@ -109,7 +110,7 @@ submitManualReport(); return; } - manualStatus.textContent = "Requesting your optional location…"; + manualStatus.textContent = (t.requestingLocation || "Requesting your optional location…"); navigator.geolocation.getCurrentPosition( (position) => { latitude.value = position.coords.latitude; diff --git a/frontend/src/scripts/theme.js b/frontend/src/scripts/theme.js index b7f2460..fee68fa 100644 --- a/frontend/src/scripts/theme.js +++ b/frontend/src/scripts/theme.js @@ -14,8 +14,9 @@ function applyTheme(theme, button) { document.documentElement.dataset.theme = theme; if (!button) return; const nextTheme = theme === "dark" ? "light" : "dark"; - button.textContent = nextTheme === "light" ? "☀ Light mode" : "☾ Dark mode"; - button.setAttribute("aria-label", "Switch to " + nextTheme + " mode"); + const t = window.BOOMCAST_I18N || {}; + button.textContent = nextTheme === "light" ? "☀ " + (t.lightMode || "Light mode") : "☾ " + (t.darkMode || "Dark mode"); + button.setAttribute("aria-label", nextTheme === "light" ? (t.switchToLight || "Switch to light mode") : (t.switchToDark || "Switch to dark mode")); button.setAttribute("aria-pressed", String(theme === "light")); } diff --git a/hello/templates/home.html b/hello/templates/home.html index f77ddf8..c9ca859 100644 --- a/hello/templates/home.html +++ b/hello/templates/home.html @@ -1,27 +1,27 @@ -{% load vite %} +{% load i18n vite %} - + -
Control room
-Welkom {{ naam }}
-✦ Je leert {{ vak }}. Explore the prototype for live audio classification and future sensor mapping.
+{% trans "Control room" %}
+{% blocktrans %}Welcome {{ naam }}{% endblocktrans %}
+✦ {% blocktrans %}You are learning {{ vak }}. Explore the prototype for live audio classification and future sensor mapping.{% endblocktrans %}
{}"
+"code>"
+msgstr "Kopieer dit token nu; het wordt niet opgeslagen en niet opnieuw getoond: {}"
+
+#: fireworks_detect/models.py:15
+msgid "A recognisable device name, e.g. Garden ESP32."
+msgstr "Een herkenbare apparaatnaam, bijvoorbeeld Tuin ESP32."
+
+#: fireworks_detect/models.py:54
+msgid "Whitelist"
+msgstr "Toestaan"
+
+#: fireworks_detect/models.py:55
+msgid "Blacklist"
+msgstr "Blokkeren"
+
+#: fireworks_detect/models.py:76
+#: fireworks_detect/templates/fireworks_detect/events_list.html:7
+#: templates/js_translations.html:42
+msgid "Manual report"
+msgstr "Handmatige melding"
+
+#: fireworks_detect/models.py:107
+msgid ""
+"Direction must be a finite value from 0 up to, but not including, 360 "
+"degrees."
+msgstr "De richting moet een eindige waarde van 0 tot, maar niet inclusief, 360 graden zijn."
+
+#: fireworks_detect/models.py:111
+msgid "Compass accuracy must be a finite, non-negative value."
+msgstr "De kompasnauwkeurigheid moet een eindige waarde van nul of hoger zijn."
+
+#: fireworks_detect/models.py:142
+msgid "No prediction"
+msgstr "Geen voorspelling"
+
+#: fireworks_detect/models.py:181
+msgid "Pending event"
+msgstr "Gebeurtenis in afwachting"
+
+#: fireworks_detect/models.py:182
+msgid "Pending"
+msgstr "In afwachting"
+
+#: fireworks_detect/models.py:218
+msgid "Event"
+msgstr "Gebeurtenis"
+
+#: fireworks_detect/models.py:219
+#: fireworks_detect/templates/fireworks_detect/includes/navigation.html:8
+msgid "Events"
+msgstr "Gebeurtenissen"
+
+#: fireworks_detect/templates/fireworks_detect/classification_result.html:4
+msgid "Analysis unavailable"
+msgstr "Analyse niet beschikbaar"
+
+#: fireworks_detect/templates/fireworks_detect/classification_result.html:11
+msgid "Analysis complete"
+msgstr "Analyse voltooid"
+
+#: fireworks_detect/templates/fireworks_detect/classification_result.html:14
+msgid "Ready"
+msgstr "Gereed"
+
+#: fireworks_detect/templates/fireworks_detect/classification_result.html:18
+#, python-format
+msgid "%(duration)s seconds"
+msgstr "%(duration)s seconden"
+
+#: fireworks_detect/templates/fireworks_detect/classification_result.html:19
+#, python-format
+msgid "%(frames)s frames analysed"
+msgstr "%(frames)s frames geanalyseerd"
+
+#: fireworks_detect/templates/fireworks_detect/classification_result.html:20
+#, python-format
+msgid "%(rate)s Hz model rate"
+msgstr "Modelsnelheid: %(rate)s Hz"
+
+#: fireworks_detect/templates/fireworks_detect/classification_result.html:23
+msgid "Result legend"
+msgstr "Legenda van de resultaten"
+
+#: fireworks_detect/templates/fireworks_detect/classification_result.html:24
+#, python-format
+msgid "%(count)s firework-related signal"
+msgid_plural "%(count)s firework-related signals"
+msgstr[0] "%(count)s vuurwerkgerelateerd signaal"
+msgstr[1] "%(count)s vuurwerkgerelateerde signalen"
+
+#: fireworks_detect/templates/fireworks_detect/classification_result.html:25
+#, python-format
+msgid "%(count)s speech/privacy signal"
+msgid_plural "%(count)s speech/privacy signals"
+msgstr[0] "%(count)s spraak- of privacysignaal"
+msgstr[1] "%(count)s spraak- of privacysignalen"
+
+#: fireworks_detect/templates/fireworks_detect/classification_result.html:30
+#: fireworks_detect/templates/fireworks_detect/event_detail.html:16
+#: templates/admin/fireworks_detect/classification_change_form.html:2
+msgid "Top sound classes"
+msgstr "Meest waarschijnlijke geluiden"
+
+#: fireworks_detect/templates/fireworks_detect/classification_result.html:41
+msgid "No overall predictions were returned."
+msgstr "Er zijn geen algemene voorspellingen ontvangen."
+
+#: fireworks_detect/templates/fireworks_detect/classification_result.html:45
+#: fireworks_detect/templates/fireworks_detect/event_detail.html:22
+#: templates/admin/fireworks_detect/classification_change_form.html:2
+msgid "Notable moments"
+msgstr "Opvallende momenten"
+
+#: fireworks_detect/templates/fireworks_detect/classification_result.html:59
+msgid "No peak events were returned."
+msgstr "Er zijn geen piekmomenten gevonden."
+
+#: fireworks_detect/templates/fireworks_detect/classification_result.html:65
+msgid "Submit this sample for review"
+msgstr "Deze opname ter beoordeling indienen"
+
+#: fireworks_detect/templates/fireworks_detect/classification_result.html:65
+msgid "The audio and signed classifier response will be added to Pending."
+msgstr "De audio en de ondertekende classificatierespons worden toegevoegd aan In afwachting."
+
+#: fireworks_detect/templates/fireworks_detect/classification_result.html:66
+msgid "Send to Pending →"
+msgstr "Naar In afwachting sturen →"
+
+#: fireworks_detect/templates/fireworks_detect/dashboard.html:7
+msgid "Report fireworks · Sound Signal"
+msgstr "Vuurwerk melden · Sound Signal"
+
+#: fireworks_detect/templates/fireworks_detect/dashboard.html:14
+#: hello/templates/home.html:12
+#, fuzzy, python-format
+#| msgid "Settings for %(user)s"
+msgid "Open settings for %(username)s"
+msgstr "Instellingen openen voor %(username)s"
+
+#: fireworks_detect/templates/fireworks_detect/dashboard.html:14
+#: hello/templates/home.html:12 members/templates/members/user_settings.html:13
+msgid "Settings"
+msgstr "Instellingen"
+
+#: fireworks_detect/templates/fireworks_detect/dashboard.html:19
+msgid "Community reporting"
+msgstr "Meldingen uit de buurt"
+
+#: fireworks_detect/templates/fireworks_detect/dashboard.html:20
+msgid "Report what you heard."
+msgstr "Meld wat je hebt gehoord."
+
+#: fireworks_detect/templates/fireworks_detect/dashboard.html:21
+msgid ""
+"Quickly log fireworks when they happen. Your optional location is "
+"represented as an H3 cell on the map, rather than as precise coordinates."
+msgstr "Meld vuurwerk zodra je het hoort. Je optionele locatie verschijnt op de kaart als H3-cel in plaats van als exacte coördinaten."
+
+#: fireworks_detect/templates/fireworks_detect/dashboard.html:24
+msgid "Quick fireworks report"
+msgstr "Snel vuurwerk melden"
+
+#: fireworks_detect/templates/fireworks_detect/dashboard.html:32
+msgid "Recent reports"
+msgstr "Recente meldingen"
+
+#: fireworks_detect/templates/fireworks_detect/dashboard.html:32
+msgid "Activity map"
+msgstr "Activiteitenkaart"
+
+#: fireworks_detect/templates/fireworks_detect/dashboard.html:33
+msgid "Open map controls"
+msgstr "Kaartinstellingen openen"
+
+#: fireworks_detect/templates/fireworks_detect/dashboard.html:40
+msgid "Audio analysis"
+msgstr "Audioanalyse"
+
+#: fireworks_detect/templates/fireworks_detect/dashboard.html:40
+msgid "Classify a recording"
+msgstr "Opname analyseren"
+
+#: fireworks_detect/templates/fireworks_detect/event_detail.html:3
+#: fireworks_detect/templates/fireworks_detect/events_list.html:8
+msgid "Manual fireworks report"
+msgstr "Handmatige vuurwerkmelding"
+
+#: fireworks_detect/templates/fireworks_detect/event_detail.html:4
+#, python-format
+msgid "Approved %(date)s · Reported manually"
+msgstr "Goedgekeurd op %(date)s · Handmatig gemeld"
+
+#: fireworks_detect/templates/fireworks_detect/event_detail.html:5
+msgid "Report details"
+msgstr "Details van de melding"
+
+#: fireworks_detect/templates/fireworks_detect/event_detail.html:6
+msgid "Occurrences"
+msgstr "Aantal keren"
+
+#: fireworks_detect/templates/fireworks_detect/event_detail.html:7
+msgid "Location"
+msgstr "Locatie"
+
+#: fireworks_detect/templates/fireworks_detect/event_detail.html:8
+msgid "Captured location"
+msgstr "Vastgelegde locatie"
+
+#: fireworks_detect/templates/fireworks_detect/event_detail.html:10
+msgid "Compass accuracy"
+msgstr "Kompasnauwkeurigheid"
+
+#: fireworks_detect/templates/fireworks_detect/event_detail.html:11
+#: fireworks_detect/templates/fireworks_detect/map.html:26
+#: templates/js_translations.html:22
+msgid "Visually confirmed"
+msgstr "Visueel bevestigd"
+
+#: fireworks_detect/templates/fireworks_detect/event_detail.html:11
+msgid "Yes"
+msgstr "Ja"
+
+#: fireworks_detect/templates/fireworks_detect/event_detail.html:11
+msgid "No"
+msgstr "Nee"
+
+#: fireworks_detect/templates/fireworks_detect/event_detail.html:12
+msgid "This was a manual report; there is no audio classification attached."
+msgstr "Dit is een handmatige melding zonder audioclassificatie."
+
+#: fireworks_detect/templates/fireworks_detect/event_detail.html:15
+#, python-format
+msgid "Approved %(date)s · %(duration)s seconds · %(frames)s frames"
+msgstr "Goedgekeurd op %(date)s · %(duration)s seconden · %(frames)s frames"
+
+#: fireworks_detect/templates/fireworks_detect/event_detail.html:20
+#: templates/admin/fireworks_detect/classification_change_form.html:2
+msgid "No predictions returned."
+msgstr "Er zijn geen voorspellingen ontvangen."
+
+#: fireworks_detect/templates/fireworks_detect/event_detail.html:26
+#: templates/admin/fireworks_detect/classification_change_form.html:2
+msgid "No peak events returned."
+msgstr "Er zijn geen piekmomenten gevonden."
+
+#: fireworks_detect/templates/fireworks_detect/events.html:2
+msgid "Events · Sound Signal"
+msgstr "Gebeurtenissen · Sound Signal"
+
+#: fireworks_detect/templates/fireworks_detect/events.html:2
+msgid "Reviewed signal archive"
+msgstr "Archief van beoordeelde signalen"
+
+#: fireworks_detect/templates/fireworks_detect/events.html:2
+msgid "Approved events."
+msgstr "Goedgekeurde gebeurtenissen."
+
+#: fireworks_detect/templates/fireworks_detect/events.html:2
+msgid ""
+"This feed refreshes automatically every three seconds after a pending sample "
+"is approved in admin."
+msgstr "Deze lijst wordt elke drie seconden bijgewerkt nadat een opname in het beheer is goedgekeurd."
+
+#: fireworks_detect/templates/fireworks_detect/events.html:2
+msgid "Latest events"
+msgstr "Nieuwste gebeurtenissen"
+
+#: fireworks_detect/templates/fireworks_detect/events.html:2
+msgid "Loading events…"
+msgstr "Gebeurtenissen laden…"
+
+#: fireworks_detect/templates/fireworks_detect/events.html:2
+msgid "Select an event"
+msgstr "Selecteer een gebeurtenis"
+
+#: fireworks_detect/templates/fireworks_detect/events.html:2
+msgid "Choose an approved event to inspect its classification details."
+msgstr "Kies een goedgekeurde gebeurtenis om de classificatiegegevens te bekijken."
+
+#: fireworks_detect/templates/fireworks_detect/events_list.html:9
+#, python-format
+msgid "%(count)s occurrence"
+msgid_plural "%(count)s occurrences"
+msgstr[0] "%(count)s keer"
+msgstr[1] "%(count)s keer"
+
+#: fireworks_detect/templates/fireworks_detect/events_list.html:11
+msgid "Sensor classification"
+msgstr "Sensorclassificatie"
+
+#: fireworks_detect/templates/fireworks_detect/events_list.html:16
+msgid "Manual"
+msgstr "Handmatig"
+
+#: fireworks_detect/templates/fireworks_detect/events_list.html:20
+msgid ""
+"No approved events yet. Submit a classification, then approve it from the "
+"Pending page in admin."
+msgstr "Er zijn nog geen goedgekeurde gebeurtenissen. Dien een classificatie in en keur die goed via In afwachting in het beheer."
+
+#: fireworks_detect/templates/fireworks_detect/home.html:8
+#: fireworks_detect/templates/home.html:7
+msgid "Sound Signal · Fireworks detection"
+msgstr "Sound Signal · Vuurwerkdetectie"
+
+#: fireworks_detect/templates/fireworks_detect/home.html:20
+#: fireworks_detect/templates/home.html:15
+msgid "Audio event analysis"
+msgstr "Analyse van geluidsgebeurtenissen"
+
+#: fireworks_detect/templates/fireworks_detect/home.html:21
+#: fireworks_detect/templates/home.html:16
+msgid "See what your audio heard."
+msgstr "Ontdek wat je opname heeft vastgelegd."
+
+#: fireworks_detect/templates/fireworks_detect/home.html:22
+#: fireworks_detect/templates/home.html:17
+msgid ""
+"Drop a recording to identify its most likely sounds. Firework-related "
+"signals are highlighted in amber; speech-related signals are marked in red "
+"for future privacy filtering."
+msgstr "Sleep een opname hierheen om de meest waarschijnlijke geluiden te herkennen. Vuurwerkgerelateerde signalen zijn oranje gemarkeerd; spraak is rood gemarkeerd voor toekomstige privacyfiltering."
+
+#: fireworks_detect/templates/fireworks_detect/home.html:23
+msgid "Here are some samples to test with"
+msgstr "Hier vind je voorbeeldgeluiden om te testen"
+
+#: fireworks_detect/templates/fireworks_detect/home.html:27
+#: fireworks_detect/templates/home.html:20
+msgid "Upload audio for classification"
+msgstr "Audio uploaden voor classificatie"
+
+#: fireworks_detect/templates/fireworks_detect/includes/audio_upload_form.html:8
+#: fireworks_detect/templates/home.html:27
+msgid "Drop an audio file here"
+msgstr "Sleep hier een audiobestand naartoe"
+
+#: fireworks_detect/templates/fireworks_detect/includes/audio_upload_form.html:9
+#: fireworks_detect/templates/home.html:28
+msgid "or click to browse your device"
+msgstr "of klik om een bestand te kiezen"
+
+#: fireworks_detect/templates/fireworks_detect/includes/audio_upload_form.html:11
+#: fireworks_detect/templates/home.html:30 templates/js_translations.html:4
+msgid "No file selected"
+msgstr "Geen bestand geselecteerd"
+
+#: fireworks_detect/templates/fireworks_detect/includes/audio_upload_form.html:14
+#: fireworks_detect/templates/home.html:33
+msgid "WAV, MP3, M4A, OGG and more · 25 MiB maximum"
+msgstr "WAV, MP3, M4A, OGG en meer · maximaal 25 MiB"
+
+#: fireworks_detect/templates/fireworks_detect/includes/audio_upload_form.html:15
+#: fireworks_detect/templates/home.html:34
+msgid "Analyse audio"
+msgstr "Audio analyseren"
+
+#: fireworks_detect/templates/fireworks_detect/includes/audio_upload_form.html:17
+#: fireworks_detect/templates/home.html:40
+msgid "Classification results"
+msgstr "Classificatieresultaten"
+
+#: fireworks_detect/templates/fireworks_detect/includes/manual_report_form.html:3
+msgid "No recording needed"
+msgstr "Geen opname nodig"
+
+#: fireworks_detect/templates/fireworks_detect/includes/manual_report_form.html:4
+msgid "Report fireworks now"
+msgstr "Nu vuurwerk melden"
+
+#: fireworks_detect/templates/fireworks_detect/includes/manual_report_form.html:5
+msgid ""
+"Choose how many times you heard fireworks, then send it straight to Pending. "
+"The report is timestamped now."
+msgstr "Geef aan hoe vaak je vuurwerk hoorde en dien de melding direct ter beoordeling in. Het tijdstip wordt nu vastgelegd."
+
+#: fireworks_detect/templates/fireworks_detect/includes/manual_report_form.html:8
+msgid "Number of occurrences"
+msgstr "Aantal keren gehoord"
+
+#: fireworks_detect/templates/fireworks_detect/includes/manual_report_form.html:15
+#| msgid "Location"
+msgid "optional"
+msgstr "optioneel"
+
+#: fireworks_detect/templates/fireworks_detect/includes/manual_report_form.html:16
+msgid ""
+"Point the top of your phone toward the fireworks, then capture a single "
+"compass reading."
+msgstr "Richt de bovenkant van je telefoon naar het vuurwerk en leg een kompasrichting vast."
+
+#: fireworks_detect/templates/fireworks_detect/includes/manual_report_form.html:17
+#: templates/js_translations.html:11
+msgid "Capture direction"
+msgstr "Richting vastleggen"
+
+#: fireworks_detect/templates/fireworks_detect/includes/manual_report_form.html:20
+msgid "I heard fireworks — send to Pending"
+msgstr "Ik hoorde vuurwerk — melding indienen"
+
+#: fireworks_detect/templates/fireworks_detect/includes/map_panel.html:2
+msgid "Manual fireworks report map"
+msgstr "Kaart met handmatige vuurwerkmeldingen"
+
+#: fireworks_detect/templates/fireworks_detect/includes/map_panel.html:3
+msgid "Manual reports · privacy-preserving H3 cells"
+msgstr "Handmatige meldingen · privacyvriendelijke H3-cellen"
+
+#: fireworks_detect/templates/fireworks_detect/includes/map_panel.html:3
+#, python-format
+msgid "H3 resolution %(resolution)s · sensor layer disabled"
+msgstr "H3-resolutie %(resolution)s · sensorlaag uitgeschakeld"
+
+#: fireworks_detect/templates/fireworks_detect/includes/map_panel.html:4
+msgid "Interactive map of manual fireworks reports"
+msgstr "Interactieve kaart met handmatige vuurwerkmeldingen"
+
+#: fireworks_detect/templates/fireworks_detect/includes/map_panel.html:5
+msgid "Map legend"
+msgstr "Kaartlegenda"
+
+#: fireworks_detect/templates/fireworks_detect/includes/map_panel.html:5
+#: fireworks_detect/templates/fireworks_detect/map.html:22
+msgid "Manual reports"
+msgstr "Handmatige meldingen"
+
+#: fireworks_detect/templates/fireworks_detect/includes/map_panel.html:5
+msgid "Report marker at H3-cell centre"
+msgstr "Meldingsmarkering in het midden van de H3-cel"
+
+#: fireworks_detect/templates/fireworks_detect/includes/map_panel.html:5
+#, python-format
+msgid "H3 cell (resolution %(resolution)s)"
+msgstr "H3-cel (resolutie %(resolution)s)"
+
+#: fireworks_detect/templates/fireworks_detect/includes/map_panel.html:5
+msgid "Saved compass direction"
+msgstr "Opgeslagen kompasrichting"
+
+#: fireworks_detect/templates/fireworks_detect/includes/navigation.html:5
+msgid "Fireworks navigation"
+msgstr "Vuurwerknavigatie"
+
+#: fireworks_detect/templates/fireworks_detect/includes/navigation.html:6
+msgid "Analyse"
+msgstr "Analyse"
+
+#: fireworks_detect/templates/fireworks_detect/includes/navigation.html:7
+msgid "Map"
+msgstr "Kaart"
+
+#: fireworks_detect/templates/fireworks_detect/includes/navigation.html:14
+#: members/templates/members/user_settings.html:19
+msgid "Language"
+msgstr "Taal"
+
+#: fireworks_detect/templates/fireworks_detect/includes/navigation.html:22
+#| msgid "Switch to light mode"
+msgid "Switch theme"
+msgstr "Thema wisselen"
+
+#: fireworks_detect/templates/fireworks_detect/manual_pending_submission.html:4
+msgid "Could not report fireworks"
+msgstr "Vuurwerk melden mislukt"
+
+#: fireworks_detect/templates/fireworks_detect/manual_pending_submission.html:6
+msgid "Report sent to Pending"
+msgstr "Melding ingediend ter beoordeling"
+
+#: fireworks_detect/templates/fireworks_detect/manual_pending_submission.html:6
+#, python-format
+msgid "%(count)s occurrence reported at %(time)s."
+msgid_plural "%(count)s occurrences reported at %(time)s."
+msgstr[0] "%(count)s keer gemeld om %(time)s."
+msgstr[1] "%(count)s keer gemeld om %(time)s."
+
+#: fireworks_detect/templates/fireworks_detect/map.html:7
+msgid "Signal map · Sound Signal"
+msgstr "Signaalkaart · Sound Signal"
+
+#: fireworks_detect/templates/fireworks_detect/map.html:17
+msgid "Manual report intelligence"
+msgstr "Inzicht in handmatige meldingen"
+
+#: fireworks_detect/templates/fireworks_detect/map.html:17
+msgid "Sound activity map."
+msgstr "Kaart met geluidsactiviteit."
+
+#: fireworks_detect/templates/fireworks_detect/map.html:18
+msgid ""
+"Reviewed manual reports with a captured location appear as their H3 cell, "
+"not their precise coordinates. Saved phone compass readings show the "
+"reported direction of the sound."
+msgstr "Beoordeelde handmatige meldingen met een locatie verschijnen als H3-cel, zonder exacte coördinaten. Opgeslagen kompasmetingen tonen de gemelde richting van het geluid."
+
+#: fireworks_detect/templates/fireworks_detect/map.html:21
+msgid "Map filters"
+msgstr "Kaartfilters"
+
+#: fireworks_detect/templates/fireworks_detect/map.html:22
+msgid "Source"
+msgstr "Bron"
+
+#: fireworks_detect/templates/fireworks_detect/map.html:22
+msgid "Sensor events — coming soon"
+msgstr "Sensorgebeurtenissen — binnenkort"
+
+#: fireworks_detect/templates/fireworks_detect/map.html:23
+msgid "Period"
+msgstr "Periode"
+
+#: fireworks_detect/templates/fireworks_detect/map.html:23
+msgid "Last 7 days"
+msgstr "Afgelopen 7 dagen"
+
+#: fireworks_detect/templates/fireworks_detect/map.html:23
+msgid "Last 2 weeks"
+msgstr "Afgelopen 2 weken"
+
+#: fireworks_detect/templates/fireworks_detect/map.html:23
+msgid "Last 30 days"
+msgstr "Afgelopen 30 dagen"
+
+#: fireworks_detect/templates/fireworks_detect/map.html:23
+msgid "All time"
+msgstr "Hele periode"
+
+#: fireworks_detect/templates/fireworks_detect/map.html:23
+msgid "Custom range"
+msgstr "Aangepaste periode"
+
+#: fireworks_detect/templates/fireworks_detect/map.html:24
+msgid "From"
+msgstr "Van"
+
+#: fireworks_detect/templates/fireworks_detect/map.html:25
+msgid "To"
+msgstr "Tot"
+
+#: fireworks_detect/templates/fireworks_detect/map.html:26
+msgid "Visual confirmation"
+msgstr "Visuele bevestiging"
+
+#: fireworks_detect/templates/fireworks_detect/map.html:26
+msgid "Any report"
+msgstr "Alle meldingen"
+
+#: fireworks_detect/templates/fireworks_detect/map.html:26
+#: templates/js_translations.html:23
+msgid "Not visually confirmed"
+msgstr "Niet visueel bevestigd"
+
+#: fireworks_detect/templates/fireworks_detect/map.html:27
+msgid "Apply filters"
+msgstr "Filters toepassen"
+
+#: fireworks_detect/templates/fireworks_detect/map.html:28
+#, python-format
+msgid "%(count)s report"
+msgid_plural "%(count)s reports"
+msgstr[0] "%(count)s melding"
+msgstr[1] "%(count)s meldingen"
+
+#: fireworks_detect/templates/fireworks_detect/pending_submission.html:3
+msgid "Could not submit this sample"
+msgstr "Opname indienen mislukt"
+
+#: fireworks_detect/templates/fireworks_detect/pending_submission.html:3
+msgid "Sent to Pending"
+msgstr "Ingediend ter beoordeling"
+
+#: fireworks_detect/templates/fireworks_detect/pending_submission.html:3
+#, python-format
+msgid "%(filename)s is ready for administrator review."
+msgstr "%(filename)s staat klaar voor beoordeling door een beheerder."
+
+#: fireworks_detect/templates/fireworks_detect/pending_submission.html:3
+msgid "View events"
+msgstr "Gebeurtenissen bekijken"
+
+#: fireworks_detect/views.py:243
+msgid "Choose an audio file before starting the analysis."
+msgstr "Kies een audiobestand voordat je de analyse start."
+
+#: fireworks_detect/views.py:247
+msgid "Please upload a supported audio file (such as WAV, MP3, M4A, or OGG)."
+msgstr "Upload een ondersteund audiobestand, zoals WAV, MP3, M4A of OGG."
+
+#: fireworks_detect/views.py:249
+msgid "This demo accepts audio files up to 25 MiB."
+msgstr "Deze demo accepteert audiobestanden tot 25 MiB."
+
+#: fireworks_detect/views.py:263
+#, python-format
+msgid "The classifier returned an error (HTTP %(code)s)."
+msgstr "De classifier gaf een foutmelding (HTTP %(code)s)."
+
+#: fireworks_detect/views.py:265
+msgid "The classifier could not be reached. Please try again shortly."
+msgstr "De classifier is niet bereikbaar. Probeer het binnenkort opnieuw."
+
+#: fireworks_detect/views.py:267
+msgid "The classifier returned an unreadable response."
+msgstr "De classifier gaf een onleesbaar antwoord."
+
+#: fireworks_detect/views.py:270
+msgid "The classifier returned an unexpected response."
+msgstr "De classifier gaf een onverwacht antwoord."
+
+#: fireworks_detect/views.py:285
+msgid "Keep the analysed audio file selected before submitting it for review."
+msgstr "Laat het geanalyseerde audiobestand geselecteerd voordat je het ter beoordeling indient."
+
+#: fireworks_detect/views.py:287
+msgid "Analyse the file before submitting it for review."
+msgstr "Analyseer het bestand voordat je het ter beoordeling indient."
+
+#: fireworks_detect/views.py:292
+msgid "This analysis has expired. Please analyse the audio again."
+msgstr "Deze analyse is verlopen. Analyseer het audiobestand opnieuw."
+
+#: fireworks_detect/views.py:295
+msgid "The saved analysis is not valid."
+msgstr "De opgeslagen analyse is ongeldig."
+
+#: fireworks_detect/views.py:345
+msgid "Choose between 1 and 1,000 occurrences."
+msgstr "Kies een aantal tussen 1 en 1.000."
+
+#: fireworks_detect/views.py:383
+msgid "No audio is attached to this record."
+msgstr "Aan dit item is geen audio gekoppeld."
+
+#: hello/templates/home.html:7
+#| msgid "Events · Sound Signal"
+msgid "Welcome · Sound Signal"
+msgstr "Welkom · Sound Signal"
+
+#: hello/templates/home.html:16
+msgid "Control room"
+msgstr "Controlekamer"
+
+#: hello/templates/home.html:17
+#, fuzzy, python-format
+#| msgid "Hello, %(name)s!"
+msgid "Welcome %(naam)s"
+msgstr "Welkom %(naam)s"
+
+#: hello/templates/home.html:18
+#, python-format
+msgid ""
+"You are learning %(vak)s. Explore the prototype for live audio "
+"classification and future sensor mapping."
+msgstr "Je leert %(vak)s. Ontdek het prototype voor live audioclassificatie en toekomstige sensorkaarten."
+
+#: hello/templates/home.html:20
+#| msgid "Fireworks Detector"
+msgid "Open fireworks detector"
+msgstr "Vuurwerkdetector openen"
+
+#: hello/templates/home.html:21
+#| msgid "Open map controls"
+msgid "Open map concept"
+msgstr "Kaartconcept openen"
+
+#: hello/templates/home.html:22
+msgid "Open form"
+msgstr "Formulier openen"
+
+#: hello/templates/home.html:23
+#| msgid "View events"
+msgid "Open events"
+msgstr "Gebeurtenissen openen"
+
+#: hello/templates/home.html:24
+#| msgid "Audio analysis"
+msgid "Audio analysis · Sensor map"
+msgstr "Audioanalyse · Sensorkaart"
+
+#: members/models.py:27 members/models.py:28
+msgid "User settings"
+msgstr "Gebruikersinstellingen"
+
+#: members/models.py:31
+#, python-format
+msgid "Settings for %(user)s"
+msgstr "Instellingen voor %(user)s"
+
+#: members/templates/hello-form.html:7 members/templates/success-form.html:7
+msgid "Hello"
+msgstr "Hallo"
+
+#: members/templates/hello-form.html:12 members/templates/success-form.html:12
+msgid "A warm welcome"
+msgstr "Hartelijk welkom"
+
+#: members/templates/hello-form.html:13 members/templates/success-form.html:13
+msgid "What’s your name?"
+msgstr "Hoe heet je?"
+
+#: members/templates/hello-form.html:14
+msgid "Enter your name below and we’ll say hello."
+msgstr "Vul hieronder je naam in, dan zeggen we hallo."
+
+#: members/templates/hello-form.html:19
+msgid "Save"
+msgstr "Opslaan"
+
+#: members/templates/hello-form.html:26 members/templates/success-form.html:21
+#| msgid "All members"
+msgid "Show members"
+msgstr "Leden tonen"
+
+#: members/templates/members-list.html:7
+#| msgid "Member"
+msgid "Members"
+msgstr "Leden"
+
+#: members/templates/members-list.html:17
+msgid "Member directory"
+msgstr "Ledenoverzicht"
+
+#: members/templates/members-list.html:19
+msgid "All members"
+msgstr "Alle leden"
+
+#: members/templates/members-list.html:20
+msgid "A complete overview of everyone currently registered in the database."
+msgstr "Een overzicht van iedereen die momenteel in de database staat."
+
+#: members/templates/members-list.html:23
+#, python-format
+msgid "%(count)s member"
+msgid_plural "%(count)s members"
+msgstr[0] "%(count)s lid"
+msgstr[1] "%(count)s leden"
+
+#: members/templates/members-list.html:33
+msgid "Member"
+msgstr "Lid"
+
+#: members/templates/members-list.html:34
+msgid "Phone number"
+msgstr "Telefoonnummer"
+
+#: members/templates/members-list.html:35
+msgid "Joined"
+msgstr "Aangemeld"
+
+#: members/templates/members-list.html:59
+msgid "No members yet"
+msgstr "Nog geen leden"
+
+#: members/templates/members-list.html:60
+msgid "Add the first member to see them here."
+msgstr "Voeg het eerste lid toe om het hier te zien."
+
+#: members/templates/members-list.html:66
+#: members/templates/success-form.html:20
+msgid "Open another form"
+msgstr "Nog een formulier openen"
+
+#: members/templates/members/login.html:7
+msgid "Sign in · Sound Signal"
+msgstr "Inloggen · Sound Signal"
+
+#: members/templates/members/login.html:13
+#: members/templates/members/login.html:25 templates/admin/login.html:1
+msgid "Sign in"
+msgstr "Inloggen"
+
+#: members/templates/members/login.html:14
+msgid "Sign in to manage your notification settings."
+msgstr "Log in om je meldingsinstellingen te beheren."
+
+#: members/templates/members/login.html:16 templates/admin/login.html:1
+msgid "Your username and password did not match. Please try again."
+msgstr "Je gebruikersnaam en wachtwoord komen niet overeen. Probeer het opnieuw."
+
+#: members/templates/members/login.html:20 templates/admin/login.html:1
+msgid "Username"
+msgstr "Gebruikersnaam"
+
+#: members/templates/members/login.html:22 templates/admin/login.html:1
+msgid "Password"
+msgstr "Wachtwoord"
+
+#: members/templates/members/login.html:27
+msgid "You will return to the page you requested."
+msgstr "Na het inloggen ga je terug naar de gevraagde pagina."
+
+#: members/templates/members/ntfy_test_result.html:2
+msgid "Test notification sent successfully."
+msgstr "Testmelding verzonden."
+
+#: members/templates/members/ntfy_test_result.html:2
+msgid "Could not send the test notification:"
+msgstr "Testmelding kon niet worden verzonden:"
+
+#: members/templates/members/user_settings.html:7
+msgid "Settings · Sound Signal"
+msgstr "Instellingen · Sound Signal"
+
+#: members/templates/members/user_settings.html:14
+msgid "Manage your personal preferences."
+msgstr "Beheer je persoonlijke voorkeuren."
+
+#: members/templates/members/user_settings.html:20
+msgid "Preferred language"
+msgstr "Voorkeurstaal"
+
+#: members/templates/members/user_settings.html:24
+msgid "Save language"
+msgstr "Taal opslaan"
+
+#: members/templates/members/user_settings.html:29
+msgid "Notifications / ntfy"
+msgstr "Meldingen / ntfy"
+
+#: members/templates/members/user_settings.html:30
+msgid ""
+"Use a topic URL from your ntfy server. Test the current URL before saving it."
+msgstr "Gebruik een onderwerp-URL van je ntfy-server. Test de URL voordat je hem opslaat."
+
+#: members/templates/members/user_settings.html:31
+msgid "Topic URL"
+msgstr "Onderwerp-URL"
+
+#: members/templates/members/user_settings.html:34
+msgid "Enable ntfy notifications"
+msgstr "ntfy-meldingen inschakelen"
+
+#: members/templates/members/user_settings.html:35
+msgid "Test notification"
+msgstr "Melding testen"
+
+#: members/templates/members/user_settings.html:38
+msgid "Save settings"
+msgstr "Instellingen opslaan"
+
+#: members/templates/success-form.html:14
+msgid "Added to the database."
+msgstr "Toegevoegd aan de database."
+
+#: members/views.py:42
+#, python-format
+msgid "Hello, %(name)s!"
+msgstr "Hallo, %(name)s!"
+
+#: members/views.py:44
+msgid "Please enter your name."
+msgstr "Vul je naam in."
+
+#: members/views.py:54
+msgid "Enter an ntfy topic URL."
+msgstr "Vul een ntfy-onderwerp-URL in."
+
+#: members/views.py:75
+msgid "Language preference saved."
+msgstr "Taalvoorkeur opgeslagen."
+
+#: members/views.py:87
+msgid "Test this URL successfully before saving notification settings."
+msgstr "Test deze URL voordat je de meldingsinstellingen opslaat."
+
+#: members/views.py:97
+msgid "Notification settings saved."
+msgstr "Meldingsinstellingen opgeslagen."
+
+#: members/views.py:113
+msgid "Enter a valid HTTP or HTTPS ntfy topic URL."
+msgstr "Vul een geldige HTTP- of HTTPS-URL voor een ntfy-onderwerp in."
+
+#: members/views.py:120
+msgid "Fireworks Detector"
+msgstr "Vuurwerkdetector"
+
+#: members/views.py:121
+msgid "ntfy notifications are configured correctly."
+msgstr "ntfy-meldingen zijn goed ingesteld."
+
+#: templates/404.html:7
+msgid "Page not found · Sound Signal"
+msgstr "Pagina niet gevonden · Sound Signal"
+
+#: templates/404.html:13
+msgid "Signal lost"
+msgstr "Signaal kwijt"
+
+#: templates/404.html:14
+msgid "This page wandered off."
+msgstr "Deze pagina is verdwenen."
+
+#: templates/404.html:15
+msgid ""
+"The address does not point to anything in this corner of Sound Signal. Try "
+"one of the routes below instead."
+msgstr "Dit adres verwijst niet naar een pagina van Sound Signal. Probeer een van de links hieronder."
+
+#: templates/404.html:18
+msgid "Go home"
+msgstr "Naar de startpagina"
+
+#: templates/404.html:19
+msgid "Open Sound Signal"
+msgstr "Sound Signal openen"
+
+#: templates/admin/base_site.html:1
+msgid "Administration"
+msgstr "Beheer"
+
+#: templates/admin/fireworks_detect/classification_audio_change_form.html:15
+msgid "Play recording"
+msgstr "Opname afspelen"
+
+#: templates/admin/fireworks_detect/classification_audio_change_form.html:17
+msgid "Loads only when played"
+msgstr "Wordt pas geladen bij afspelen"
+
+#: templates/admin/fireworks_detect/classification_change_form.html:2
+msgid "Classification preview"
+msgstr "Voorbeeld van de classificatie"
+
+#: templates/admin/fireworks_detect/classification_change_form.html:2
+msgid "Show raw classifier JSON"
+msgstr "Ruwe classifier-JSON tonen"
+
+#: templates/admin/login.html:1
+msgid "Log in"
+msgstr "Inloggen"
+
+#: templates/admin/login.html:1
+msgid "Secure access"
+msgstr "Beveiligde toegang"
+
+#: templates/admin/login.html:1
+msgid "Welcome back."
+msgstr "Welkom terug."
+
+#: templates/admin/login.html:1
+msgid "Sign in to review pending audio samples and manage approved events."
+msgstr "Log in om opnamen in afwachting te beoordelen en goedgekeurde gebeurtenissen te beheren."
+
+#: templates/admin/login.html:1
+#, python-format
+msgid ""
+"You are authenticated as %(username)s, but are not authorized to access this "
+"page. Would you like to log in to a different account?"
+msgstr "Je bent ingelogd als %(username)s, maar hebt geen toegang tot deze pagina. Wil je inloggen met een ander account?"
+
+#: templates/admin/login.html:1
+msgid "Sound Signal administration"
+msgstr "Sound Signal-beheer"
+
+#: templates/js_translations.html:5
+msgid "Analysing your recording…"
+msgstr "Je opname wordt geanalyseerd…"
+
+#: templates/js_translations.html:6
+msgid "Analysis could not be completed."
+msgstr "De analyse kon niet worden voltooid."
+
+#: templates/js_translations.html:7
+msgid "Accuracy unavailable"
+msgstr "Nauwkeurigheid niet beschikbaar"
+
+#: templates/js_translations.html:8
+msgid "Accuracy"
+msgstr "Nauwkeurigheid"
+
+#: templates/js_translations.html:9
+msgid "Stop direction capture"
+msgstr "Vastleggen van richting stoppen"
+
+#: templates/js_translations.html:10
+msgid ""
+"Point the top of your phone toward the sound — direction will update live."
+msgstr "Richt de bovenkant van je telefoon naar het geluid. De richting wordt live bijgewerkt."
+
+#: templates/js_translations.html:12
+msgid "Capture again"
+msgstr "Opnieuw vastleggen"
+
+#: templates/js_translations.html:13
+msgid "Compass unavailable on this device."
+msgstr "Kompas niet beschikbaar op dit apparaat."
+
+#: templates/js_translations.html:14
+msgid "Compass capture requires a secure HTTPS connection."
+msgstr "Voor het kompas is een beveiligde HTTPS-verbinding nodig."
+
+#: templates/js_translations.html:15
+msgid "Requesting compass permission…"
+msgstr "Toestemming voor het kompas aanvragen…"
+
+#: templates/js_translations.html:16
+msgid "Compass permission denied."
+msgstr "Toegang tot het kompas geweigerd."
+
+#: templates/js_translations.html:17
+msgid "Requesting your optional location…"
+msgstr "Je optionele locatie wordt opgevraagd…"
+
+#: templates/js_translations.html:18
+msgid "Map compass: north is up"
+msgstr "Kaartkompas: noord is boven"
+
+#: templates/js_translations.html:19
+msgid "reports"
+msgstr "meldingen"
+
+#: templates/js_translations.html:20
+msgid "occurrences"
+msgstr "gebeurtenissen"
+
+#: templates/js_translations.html:21
+msgid "resolution"
+msgstr "resolutie"
+
+#: templates/js_translations.html:24
+msgid "Reported"
+msgstr "Gemeld op"
+
+#: templates/js_translations.html:25
+msgid "Compass direction"
+msgstr "Kompasrichting"
+
+#: templates/js_translations.html:26
+msgid "report"
+msgstr "melding"
+
+#: templates/js_translations.html:27
+msgid "occurrence"
+msgstr "keer"
+
+#: templates/js_translations.html:28
+msgid "Light mode"
+msgstr "Lichte modus"
+
+#: templates/js_translations.html:29
+msgid "Dark mode"
+msgstr "Donkere modus"
+
+#: templates/js_translations.html:30
+msgid "Switch to light mode"
+msgstr "Overschakelen naar lichte modus"
+
+#: templates/js_translations.html:31
+msgid "Switch to dark mode"
+msgstr "Overschakelen naar donkere modus"
+
+#: templates/js_translations.html:32
+msgid "Loading recording…"
+msgstr "Opname laden…"
+
+#: templates/js_translations.html:33
+msgid "Could not play this recording."
+msgstr "Deze opname kan niet worden afgespeeld."
+
+#: templates/js_translations.html:34
+msgid "Pause recording"
+msgstr "Opname pauzeren"
+
+#: templates/js_translations.html:35
+msgid "Playing now"
+msgstr "Wordt afgespeeld"
+
+#: templates/js_translations.html:36
+msgid "Resume recording"
+msgstr "Opname hervatten"
+
+#: templates/js_translations.html:37
+msgid "Paused"
+msgstr "Gepauzeerd"
+
+#: templates/js_translations.html:38
+msgid "Replay recording"
+msgstr "Opname opnieuw afspelen"
+
+#: templates/js_translations.html:39
+msgid "Finished"
+msgstr "Afgelopen"
+
+#: templates/js_translations.html:40
+msgid "Buffering…"
+msgstr "Bufferen…"
+
+#: templates/js_translations.html:41
+msgid "Could not load this recording."
+msgstr "Deze opname kan niet worden geladen."
\ No newline at end of file
diff --git a/members/__pycache__/forms.cpython-313.pyc b/members/__pycache__/forms.cpython-313.pyc
index 08e52d5..fa8d96f 100644
Binary files a/members/__pycache__/forms.cpython-313.pyc and b/members/__pycache__/forms.cpython-313.pyc differ
diff --git a/members/__pycache__/language_views.cpython-313.pyc b/members/__pycache__/language_views.cpython-313.pyc
new file mode 100644
index 0000000..2f3dc7d
Binary files /dev/null and b/members/__pycache__/language_views.cpython-313.pyc differ
diff --git a/members/__pycache__/middleware.cpython-313.pyc b/members/__pycache__/middleware.cpython-313.pyc
new file mode 100644
index 0000000..8ef50fd
Binary files /dev/null and b/members/__pycache__/middleware.cpython-313.pyc differ
diff --git a/members/__pycache__/models.cpython-313.pyc b/members/__pycache__/models.cpython-313.pyc
index 1f26496..01dba99 100644
Binary files a/members/__pycache__/models.cpython-313.pyc and b/members/__pycache__/models.cpython-313.pyc differ
diff --git a/members/__pycache__/tests.cpython-313.pyc b/members/__pycache__/tests.cpython-313.pyc
index b04a912..6782362 100644
Binary files a/members/__pycache__/tests.cpython-313.pyc and b/members/__pycache__/tests.cpython-313.pyc differ
diff --git a/members/__pycache__/views.cpython-313.pyc b/members/__pycache__/views.cpython-313.pyc
index b960a6a..a767621 100644
Binary files a/members/__pycache__/views.cpython-313.pyc and b/members/__pycache__/views.cpython-313.pyc differ
diff --git a/members/forms.py b/members/forms.py
index ffa9ab3..6a9bee9 100644
--- a/members/forms.py
+++ b/members/forms.py
@@ -18,3 +18,9 @@ class UserSettingsForm(forms.ModelForm):
def clean_ntfy_url(self):
return self.cleaned_data["ntfy_url"].strip()
+
+
+class LanguageSettingsForm(forms.ModelForm):
+ class Meta:
+ model = UserSettings
+ fields = ["preferred_language"]
diff --git a/members/language_views.py b/members/language_views.py
new file mode 100644
index 0000000..6e024a4
--- /dev/null
+++ b/members/language_views.py
@@ -0,0 +1,11 @@
+from django.conf import settings
+from django.http import HttpResponseBadRequest, HttpResponseForbidden
+from django.views.i18n import set_language
+
+
+def set_anonymous_language(request):
+ if request.user.is_authenticated:
+ return HttpResponseForbidden()
+ if request.method != "POST" or request.POST.get("language") not in dict(settings.LANGUAGES):
+ return HttpResponseBadRequest()
+ return set_language(request)
diff --git a/members/middleware.py b/members/middleware.py
new file mode 100644
index 0000000..9b3b88d
--- /dev/null
+++ b/members/middleware.py
@@ -0,0 +1,24 @@
+from django.conf import settings
+from django.utils import translation
+
+from .models import UserSettings
+
+
+class UserLanguageMiddleware:
+ """Give an authenticated user's saved choice precedence over request negotiation."""
+
+ def __init__(self, get_response):
+ self.get_response = get_response
+
+ def __call__(self, request):
+ if request.user.is_authenticated:
+ language = UserSettings.objects.filter(user=request.user).values_list(
+ "preferred_language", flat=True
+ ).first()
+ language = language if language in dict(settings.LANGUAGES) else settings.LANGUAGE_CODE
+ else:
+ cookie_language = request.COOKIES.get(settings.LANGUAGE_COOKIE_NAME)
+ language = cookie_language if cookie_language in dict(settings.LANGUAGES) else settings.LANGUAGE_CODE
+ with translation.override(language):
+ request.LANGUAGE_CODE = language
+ return self.get_response(request)
diff --git a/members/migrations/0003_usersettings_preferred_language.py b/members/migrations/0003_usersettings_preferred_language.py
new file mode 100644
index 0000000..7086f2f
--- /dev/null
+++ b/members/migrations/0003_usersettings_preferred_language.py
@@ -0,0 +1,13 @@
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+ dependencies = [('members', '0002_usersettings')]
+
+ operations = [
+ migrations.AddField(
+ model_name='usersettings',
+ name='preferred_language',
+ field=models.CharField(choices=[('nl', 'Nederlands'), ('en', 'English')], default='nl', max_length=2),
+ ),
+ ]
diff --git a/members/migrations/__pycache__/0003_usersettings_preferred_language.cpython-313.pyc b/members/migrations/__pycache__/0003_usersettings_preferred_language.cpython-313.pyc
new file mode 100644
index 0000000..f0e1721
Binary files /dev/null and b/members/migrations/__pycache__/0003_usersettings_preferred_language.cpython-313.pyc differ
diff --git a/members/models.py b/members/models.py
index 951b3e6..702c26c 100644
--- a/members/models.py
+++ b/members/models.py
@@ -1,5 +1,6 @@
from django.conf import settings
from django.db import models
+from django.utils.translation import gettext_lazy as _
# Create your models here.
class Member(models.Model):
@@ -12,16 +13,19 @@ class Member(models.Model):
return f"{self.first_name} {self.last_name}"
class UserSettings(models.Model):
- """Per-user configuration for optional notification providers."""
+ """Per-user application preferences."""
+
+ LANGUAGE_CHOICES = [("nl", "Nederlands"), ("en", "English")]
user = models.OneToOneField(settings.AUTH_USER_MODEL, on_delete=models.CASCADE, related_name="notification_settings")
ntfy_url = models.URLField(blank=True)
ntfy_enabled = models.BooleanField(default=False)
ntfy_last_tested_at = models.DateTimeField(null=True, blank=True)
+ preferred_language = models.CharField(max_length=2, choices=LANGUAGE_CHOICES, default="nl")
class Meta:
- verbose_name = "User settings"
- verbose_name_plural = "User settings"
+ verbose_name = _("User settings")
+ verbose_name_plural = _("User settings")
def __str__(self):
- return f"Notification settings for {self.user}"
+ return _("Settings for %(user)s") % {"user": self.user}
diff --git a/members/templates/hello-form.html b/members/templates/hello-form.html
index 0b99997..efcfd58 100644
--- a/members/templates/hello-form.html
+++ b/members/templates/hello-form.html
@@ -1,29 +1,29 @@
-{% load vite %}
+{% load i18n vite %}
-
+
- Hello
+ {% trans "Hello" %}
{% vite_asset "frontend/src/entries/member-form.js" %}
-
+{% include "js_translations.html" %}
- ✦ A warm welcome
- What’s your name?
- Enter your name below and we’ll say hello.
+ ✦ {% trans "A warm welcome" %}
+ {% trans "What’s your name?" %}
+ {% trans "Enter your name below and we’ll say hello." %}
{% if message %}
{{ message }}
{% endif %}
- Toon leden
+ {% trans "Show members" %}
-
\ No newline at end of file
+
diff --git a/members/templates/members-list.html b/members/templates/members-list.html
index 21bd01d..703e739 100644
--- a/members/templates/members-list.html
+++ b/members/templates/members-list.html
@@ -1,12 +1,12 @@
-{% load vite %}
+{% load i18n vite %}
-
+
- Members
+ {% trans "Members" %}
{% vite_asset "frontend/src/entries/member-list.js" %}
-
+{% include "js_translations.html" %}
@@ -14,13 +14,13 @@
✦
- Member directory
+ {% trans "Member directory" %}
- All members
- A complete overview of everyone currently registered in the database.
+ {% trans "All members" %}
+ {% trans "A complete overview of everyone currently registered in the database." %}
- {{ members|length }} member{{ members|length|pluralize }}
+ {% blocktrans count count=members|length %}{{ count }} member{% plural %}{{ count }} members{% endblocktrans %}
@@ -30,9 +30,9 @@
- Member
- Phone number
- Joined
+ {% trans "Member" %}
+ {% trans "Phone number" %}
+ {% trans "Joined" %}
@@ -56,15 +56,15 @@
{% else %}
- No members yet
- Add the first member to see them here.
+ {% trans "No members yet" %}
+ {% trans "Add the first member to see them here." %}
{% endif %}
- Open nog een formulier
+ {% trans "Open another form" %}
-
\ No newline at end of file
+
diff --git a/members/templates/members/login.html b/members/templates/members/login.html
index fb00941..25249c6 100644
--- a/members/templates/members/login.html
+++ b/members/templates/members/login.html
@@ -1,30 +1,30 @@
-{% load vite %}
+{% load i18n vite %}
-
+
- Sign in · Sound Signal
+ {% trans "Sign in · Sound Signal" %}
{% vite_asset "frontend/src/entries/login.js" %}
-
+{% include "js_translations.html" %}
✦ Sound Signal
- Sign in
- Sign in to manage your notification settings.
+ {% trans "Sign in" %}
+ {% trans "Sign in to manage your notification settings." %}
{% if form.errors %}
- Your username and password did not match. Please try again.
+ {% trans "Your username and password did not match. Please try again." %}
{% endif %}
- You will return to the page you requested.
+ {% trans "You will return to the page you requested." %}
diff --git a/members/templates/members/ntfy_test_result.html b/members/templates/members/ntfy_test_result.html
index e098109..01c4db5 100644
--- a/members/templates/members/ntfy_test_result.html
+++ b/members/templates/members/ntfy_test_result.html
@@ -1 +1,2 @@
-{% if success %}✓ Test notification sent successfully.{% else %}Could not send the test notification: {{ error }}{% endif %}
+{% load i18n %}
+{% if success %}✓ {% trans "Test notification sent successfully." %}{% else %}{% blocktrans %}Could not send the test notification:{% endblocktrans %} {{ error }}{% endif %}
diff --git a/members/templates/members/user_settings.html b/members/templates/members/user_settings.html
index e0c1094..aec5e75 100644
--- a/members/templates/members/user_settings.html
+++ b/members/templates/members/user_settings.html
@@ -1,31 +1,41 @@
-{% load vite %}
+{% load i18n vite %}
-
+
- Settings · Sound Signal
+ {% trans "Settings · Sound Signal" %}
{% vite_asset "frontend/src/entries/settings.js" %}
-
+{% include "js_translations.html" %}
- Settings
- Manage personal notification preferences.
+ {% trans "Settings" %}
+ {% trans "Manage your personal preferences." %}
{% if messages %}{% endif %}
+
diff --git a/members/templates/success-form.html b/members/templates/success-form.html
index 532af00..acbc528 100644
--- a/members/templates/success-form.html
+++ b/members/templates/success-form.html
@@ -1,25 +1,25 @@
-{% load vite %}
+{% load i18n vite %}
-
+
- Hello
+ {% trans "Hello" %}
{% vite_asset "frontend/src/entries/member-success.js" %}
-
+{% include "js_translations.html" %}
- ✦ A warm welcome
- What’s your name?
- Toegevoegt aan de database.
+ ✦ {% trans "A warm welcome" %}
+ {% trans "What’s your name?" %}
+ {% trans "Added to the database." %}
{% if message %}
{{ message }}
{% endif %}
- Open nog een formulier
- Toon leden
+ {% trans "Open another form" %}
+ {% trans "Show members" %}
-
\ No newline at end of file
+
diff --git a/members/tests.py b/members/tests.py
index ed7b6f7..78d80b4 100644
--- a/members/tests.py
+++ b/members/tests.py
@@ -3,8 +3,10 @@ from unittest.mock import MagicMock, patch
from urllib.error import HTTPError, URLError
from django.contrib.auth import get_user_model
+from django.conf import settings
from django.test import SimpleTestCase, TestCase
from django.urls import reverse
+from django.utils import translation
from notifications.services import NotificationError, send_notification, send_ntfy_notification
@@ -57,7 +59,7 @@ class UserSettingsNtfyTests(TestCase):
response = self.client.post(reverse("ntfy_test_notification"), {"ntfy_url": "not a URL"})
self.assertEqual(response.status_code, 400)
- self.assertContains(response, "valid HTTP or HTTPS", status_code=400)
+ self.assertContains(response, "geldige HTTP- of HTTPS-URL", status_code=400)
mock_send.assert_not_called()
@patch("members.views.send_ntfy_notification")
@@ -65,11 +67,11 @@ class UserSettingsNtfyTests(TestCase):
response = self.client.post(reverse("ntfy_test_notification"), {"ntfy_url": self.url})
self.assertEqual(response.status_code, 200)
- self.assertContains(response, "Test notification sent successfully")
+ self.assertContains(response, "Testmelding verzonden")
mock_send.assert_called_once_with(
self.url,
- title="Fireworks Detector",
- message="ntfy notifications are configured correctly.",
+ title="Vuurwerkdetector",
+ message="ntfy-meldingen zijn goed ingesteld.",
)
@patch("members.views.send_ntfy_notification", side_effect=NotificationError("Connection to the ntfy server timed out."))
@@ -83,7 +85,7 @@ class UserSettingsNtfyTests(TestCase):
response = self.client.post(reverse("user_settings"), {"ntfy_url": self.url, "ntfy_enabled": "on"})
self.assertEqual(response.status_code, 200)
- self.assertContains(response, "Test this URL successfully")
+ self.assertContains(response, "Test deze URL")
settings = UserSettings.objects.get(user=self.user)
self.assertFalse(settings.ntfy_enabled)
self.assertEqual(settings.ntfy_url, "")
@@ -109,7 +111,7 @@ class UserSettingsNtfyTests(TestCase):
response = self.client.post(reverse("user_settings"), {"ntfy_url": changed_url, "ntfy_enabled": "on"})
self.assertEqual(response.status_code, 200)
- self.assertContains(response, "Test this URL successfully")
+ self.assertContains(response, "Test deze URL")
self.assertEqual(UserSettings.objects.get(user=self.user).ntfy_url, self.url)
@patch("members.views.send_ntfy_notification")
@@ -120,7 +122,7 @@ class UserSettingsNtfyTests(TestCase):
response = self.client.post(reverse("user_settings"), {"ntfy_url": self.url, "ntfy_enabled": "on"})
self.assertEqual(response.status_code, 200)
- self.assertContains(response, "Test this URL successfully")
+ self.assertContains(response, "Test deze URL")
settings = UserSettings.objects.get(user=self.other_user)
self.assertFalse(settings.ntfy_enabled)
@@ -135,6 +137,7 @@ class UserSettingsNtfyTests(TestCase):
class FrontendAuthenticationTests(TestCase):
def setUp(self):
+ self.client.cookies[settings.LANGUAGE_COOKIE_NAME] = "en"
self.user = get_user_model().objects.create_user(username="profile-user", password="secret")
def test_frontend_login_page_is_available(self):
@@ -162,3 +165,106 @@ class FrontendAuthenticationTests(TestCase):
authenticated_response = self.client.get(reverse("hello"))
self.assertContains(authenticated_response, "class=\"profile-circle\"")
self.assertContains(authenticated_response, reverse("user_settings"))
+
+
+class LanguageSettingsTests(TestCase):
+ def setUp(self):
+ self.user = get_user_model().objects.create_user(username="language-user", password="secret")
+ self.client.force_login(self.user)
+
+ def test_missing_settings_row_uses_dutch_and_page_displays_it(self):
+ response = self.client.get(reverse("user_settings"))
+ self.assertEqual(response.status_code, 200)
+ self.assertContains(response, '