From a8bb7b439f6f57af9653ce283c951070bd52f3c2 Mon Sep 17 00:00:00 2001 From: Paul Nothaft Date: Fri, 19 Jun 2026 08:42:22 +0200 Subject: [PATCH] fix(i18n): wrap WhatsApp token show/hide aria-label through t() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit i18n audit caught one straggler — the eye-icon toggle on the access-token input had a bare `aria-label={showToken ? 'Hide' : 'Show'}` that wouldn't translate for screen readers on non-English locales. Switched to `t('common.hide')` / `t('common.show')`; added the matching `common.show` key in EN + DE (common.hide already existed). The two remaining `placeholder=` literals in the WhatsApp tab are sample ID strings (`123456789012345`, `gallery_ready`, `+49123456789`) — those are identifier/value examples, not translatable English. Other PR-touched UI surfaces passed the audit clean: 30 new i18n keys across categories (5), settings.whatsapp (16), settings.features.whatsapp (2), feedback (3), and the activity-log + bell entries (4) all exist in both EN and DE. --- frontend/src/features/settings/tabs/WhatsAppTab.tsx | 2 +- frontend/src/i18n/locales/de.json | 3 ++- frontend/src/i18n/locales/en.json | 3 ++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/frontend/src/features/settings/tabs/WhatsAppTab.tsx b/frontend/src/features/settings/tabs/WhatsAppTab.tsx index e5642783..97f17ad5 100644 --- a/frontend/src/features/settings/tabs/WhatsAppTab.tsx +++ b/frontend/src/features/settings/tabs/WhatsAppTab.tsx @@ -144,7 +144,7 @@ export const WhatsAppTab: React.FC = () => { type="button" onClick={() => setShowToken((v) => !v)} className="p-1" - aria-label={showToken ? 'Hide' : 'Show'} + aria-label={showToken ? t('common.hide', 'Hide') : t('common.show', 'Show')} > {showToken ? : } diff --git a/frontend/src/i18n/locales/de.json b/frontend/src/i18n/locales/de.json index a5c7e19b..a317244f 100644 --- a/frontend/src/i18n/locales/de.json +++ b/frontend/src/i18n/locales/de.json @@ -151,7 +151,8 @@ "preview": "Vorschau", "duplicate": "Duplizieren", "showAll": "Alle anzeigen", - "confirm": "Bestätigen" + "confirm": "Bestätigen", + "show": "Einblenden" }, "upload": { "photoCategory": "Fotokategorie", diff --git a/frontend/src/i18n/locales/en.json b/frontend/src/i18n/locales/en.json index 389c4b2b..06092183 100644 --- a/frontend/src/i18n/locales/en.json +++ b/frontend/src/i18n/locales/en.json @@ -151,7 +151,8 @@ "preview": "Preview", "duplicate": "Duplicate", "showAll": "Show all", - "confirm": "Confirm" + "confirm": "Confirm", + "show": "Show" }, "upload": { "photoCategory": "Photo Category",