From 4fc3212e2c6d02853031e3ec73a5ffcda8b31637 Mon Sep 17 00:00:00 2001 From: Claude Code Date: Wed, 13 May 2026 22:09:06 +0000 Subject: [PATCH] fix(i18n): Notify-Summary-Toggle wird beim Lage-Edit ueberschrieben app.js:1037-1043 setzte den Text der notify-summary-Checkbox dynamisch auf Neues Lagebild / Neuer Recherchebericht und damit das data-i18n- Attribut zurueck. Jetzt ueber T() mit Forschungs-/Lagebild-Varianten. Neuer Key modal.notify.summary_research. --- src/static/dashboard.html | 2 +- src/static/i18n/de.json | 1 + src/static/i18n/en.json | 1 + src/static/js/app.js | 17 +++++++++++++++-- 4 files changed, 18 insertions(+), 3 deletions(-) diff --git a/src/static/dashboard.html b/src/static/dashboard.html index e997aaa..de5ae29 100644 --- a/src/static/dashboard.html +++ b/src/static/dashboard.html @@ -729,7 +729,7 @@ - + diff --git a/src/static/i18n/de.json b/src/static/i18n/de.json index c27c930..d79ddf8 100644 --- a/src/static/i18n/de.json +++ b/src/static/i18n/de.json @@ -80,6 +80,7 @@ "modal.field.notifications": "E-Mail-Benachrichtigungen", "modal.hint.notifications": "Per E-Mail benachrichtigen bei:", "modal.notify.summary": "Neues Lagebild", + "modal.notify.summary_research": "Neuer Recherchebericht", "modal.notify.new_articles": "Neue Artikel", "modal.notify.status_change": "Statusänderung Faktencheck", "aria.close": "Schließen", diff --git a/src/static/i18n/en.json b/src/static/i18n/en.json index bd920e0..ecacf95 100644 --- a/src/static/i18n/en.json +++ b/src/static/i18n/en.json @@ -80,6 +80,7 @@ "modal.field.notifications": "Email notifications", "modal.hint.notifications": "Notify me by email about:", "modal.notify.summary": "New briefing", + "modal.notify.summary_research": "New research report", "modal.notify.new_articles": "New articles", "modal.notify.status_change": "Fact-check status change", "aria.close": "Close", diff --git a/src/static/js/app.js b/src/static/js/app.js index d48b869..3a2f84e 100644 --- a/src/static/js/app.js +++ b/src/static/js/app.js @@ -1034,13 +1034,26 @@ const App = { typeBadge.textContent = incident.type === 'research' ? 'Analyse' : 'Live'; // Kachel-Label: 'Recherchebericht' fuer Recherche-Lagen, 'Lagebild' fuer Live-Monitoring - const _lbLabel = incident.type === 'research' ? 'Recherchebericht' : 'Lagebild'; + const _tI18n = (k, fb) => (typeof T === 'function') ? T(k, fb) : fb; + const _lbLabel = incident.type === 'research' + ? _tI18n('tab.summary_report', 'Recherchebericht') + : _tI18n('card.summary', 'Lagebild'); const _cardTitle = document.querySelector('#panel-lagebild .card-title'); if (_cardTitle) _cardTitle.textContent = _lbLabel; if (typeof LayoutManager !== 'undefined' && typeof LayoutManager.applyTypeLabels === 'function') { LayoutManager.applyTypeLabels(incident.type); } - { const _nt = document.querySelector("#inc-notify-summary"); if (_nt) { const _ns = _nt.closest("label")?.querySelector(".toggle-text"); if (_ns) _ns.textContent = "Neues " + _lbLabel; } } + { + const _nt = document.querySelector("#inc-notify-summary"); + if (_nt) { + const _ns = _nt.closest("label")?.querySelector(".toggle-text"); + if (_ns) { + _ns.textContent = incident.type === 'research' + ? _tI18n('modal.notify.summary_research', 'Neuer Recherchebericht') + : _tI18n('modal.notify.summary', 'Neues Lagebild'); + } + } + } // Archiv-Button Text this._updateArchiveButton(incident.status);