From e5b76b735a649e76a191381923783bb6eed5d78d Mon Sep 17 00:00:00 2001 From: Schalli Date: Wed, 1 Jul 2026 12:05:52 +0200 Subject: [PATCH] fix(i18n): add missing marketplace.accessDenied and translate calendar form - Add marketplace.accessDenied to de.json and en.json - Add 12 calendar form field/action keys to widgets.calendar in both locales - Replace all hardcoded English strings in calendar-source-form.tsx with t() calls - Remove locale-detection hack on Cancel button (was comparing t() result to English string) Co-Authored-By: Claude Sonnet 4.6 --- .../settings/calendar-source-form.tsx | 24 +++++++-------- apps/web/src/messages/de.json | 30 +++++++++++++++++-- apps/web/src/messages/en.json | 30 +++++++++++++++++-- 3 files changed, 66 insertions(+), 18 deletions(-) diff --git a/apps/web/src/components/settings/calendar-source-form.tsx b/apps/web/src/components/settings/calendar-source-form.tsx index 339e320..234324c 100644 --- a/apps/web/src/components/settings/calendar-source-form.tsx +++ b/apps/web/src/components/settings/calendar-source-form.tsx @@ -83,16 +83,16 @@ export function CalendarSourceForm({ try { const parsed = new URL(value); if (parsed.protocol !== 'https:') { - setUrlError('URL must use HTTPS protocol'); + setUrlError(t('calendar.formUrlErrorHttps')); return false; } setUrlError(''); return true; } catch { - setUrlError('Invalid URL format'); + setUrlError(t('calendar.formUrlErrorInvalid')); return false; } - }, []); + }, [t]); // Form is valid when name, type, and url are filled and url is https const isFormValid = @@ -136,7 +136,7 @@ export function CalendarSourceForm({ {/* Name */}
- Username + {t('calendar.formFieldUsername')} - Password + {t('calendar.formFieldPassword')} - +
{SOURCE_COLOR_PALETTE.map((c) => (
diff --git a/apps/web/src/messages/de.json b/apps/web/src/messages/de.json index 337b8aa..7176b36 100644 --- a/apps/web/src/messages/de.json +++ b/apps/web/src/messages/de.json @@ -124,6 +124,15 @@ "uploadCta": "Bild hochladen", "uploadSuccess": "Profilbild wurde erfolgreich aktualisiert.", "uploadError": "Hochladen fehlgeschlagen. Bitte pruefen Sie das Dateiformat und die Dateigröße.", + "deleteAvatarCta": "Bild löschen", + "deleteAvatarSuccess": "Profilbild wurde gelöscht.", + "deleteAvatarError": "Löschen fehlgeschlagen.", + "accentColorLabel": "Akzentfarbe", + "accentColorHelp": "Wird für Buttons, Highlights und aktive Elemente verwendet. Standard: #ffed00.", + "accentColorSave": "Farbe speichern", + "accentColorReset": "Zurücksetzen", + "accentColorSuccess": "Akzentfarbe wurde gespeichert.", + "accentColorError": "Speichern fehlgeschlagen.", "ldapManagedNotice": "Ihr Passwort wird ueber das Verzeichnis (LDAP) verwaltet. Eine Aenderung ist hier nicht moeglich.", "passwordSectionTitle": "Passwort aendern" }, @@ -185,13 +194,27 @@ "connectionSuccess": "Verbindung erfolgreich", "connectionError": "Verbindung fehlgeschlagen. Bitte ueberpruefen Sie die URL und Zugangsdaten.", "addSource": "Quelle hinzufuegen", - "sourceEmpty": "Keine Kalenderquellen eingerichtet. Fuegen Sie eine Quelle hinzu, um Termine anzuzeigen." + "sourceEmpty": "Keine Kalenderquellen eingerichtet. Fuegen Sie eine Quelle hinzu, um Termine anzuzeigen.", + "formFieldName": "Name", + "formFieldType": "Typ", + "formFieldUrl": "URL", + "formFieldUsername": "Benutzername", + "formFieldPassword": "Passwort", + "formFieldColor": "Farbe", + "formFieldExchangeMode": "Exchange-Modus", + "formSave": "Speichern", + "formSaving": "Wird gespeichert...", + "formCancel": "Abbrechen", + "formUrlErrorHttps": "URL muss HTTPS verwenden", + "formUrlErrorInvalid": "Ungültiges URL-Format" }, "note": { "name": "Notizen", "description": "Freitext-Notizen mit Markdown", "defaultTitle": "Notiz", - "autosaveError": "Speichern fehlgeschlagen" + "autosaveError": "Speichern fehlgeschlagen", + "editMode": "Bearbeiten", + "viewMode": "Vorschau" }, "calculator": { "name": "Taschenrechner", @@ -434,6 +457,7 @@ "backToMarketplace": "Zurueck zum Marktplatz", "detailVersion": "Version {version}", "detailStatusActive": "Aktiviert fuer diesen Mandanten", - "detailStatusInactive": "Nicht aktiviert" + "detailStatusInactive": "Nicht aktiviert", + "accessDenied": "Zugriff verweigert" } } diff --git a/apps/web/src/messages/en.json b/apps/web/src/messages/en.json index afb9163..cb33b3c 100644 --- a/apps/web/src/messages/en.json +++ b/apps/web/src/messages/en.json @@ -124,6 +124,15 @@ "uploadCta": "Upload picture", "uploadSuccess": "Profile picture updated successfully.", "uploadError": "Upload failed. Please check the file format and size.", + "deleteAvatarCta": "Delete picture", + "deleteAvatarSuccess": "Profile picture deleted.", + "deleteAvatarError": "Delete failed.", + "accentColorLabel": "Accent Color", + "accentColorHelp": "Used for buttons, highlights and active elements. Default: #ffed00.", + "accentColorSave": "Save color", + "accentColorReset": "Reset", + "accentColorSuccess": "Accent color saved.", + "accentColorError": "Save failed.", "ldapManagedNotice": "Your password is managed via the directory (LDAP) and cannot be changed here.", "passwordSectionTitle": "Change Password" }, @@ -185,13 +194,27 @@ "connectionSuccess": "Connection successful", "connectionError": "Connection failed. Please check the URL and credentials.", "addSource": "Add source", - "sourceEmpty": "No calendar sources configured. Add a source to display events." + "sourceEmpty": "No calendar sources configured. Add a source to display events.", + "formFieldName": "Name", + "formFieldType": "Type", + "formFieldUrl": "URL", + "formFieldUsername": "Username", + "formFieldPassword": "Password", + "formFieldColor": "Color", + "formFieldExchangeMode": "Exchange Mode", + "formSave": "Save", + "formSaving": "Saving...", + "formCancel": "Cancel", + "formUrlErrorHttps": "URL must use HTTPS protocol", + "formUrlErrorInvalid": "Invalid URL format" }, "note": { "name": "Notes", "description": "Free-text notes with Markdown", "defaultTitle": "Note", - "autosaveError": "Save failed" + "autosaveError": "Save failed", + "editMode": "Edit", + "viewMode": "Preview" }, "calculator": { "name": "Calculator", @@ -434,6 +457,7 @@ "backToMarketplace": "Back to Marketplace", "detailVersion": "Version {version}", "detailStatusActive": "Activated for this tenant", - "detailStatusInactive": "Not activated" + "detailStatusInactive": "Not activated", + "accessDenied": "Access denied" } }