From 9bad9e807b96c80e00d79c07466bfcc55e3ce8f5 Mon Sep 17 00:00:00 2001 From: Marcel Date: Sat, 18 Apr 2026 14:54:06 +0200 Subject: [PATCH] fix(i18n): replace hardcoded strings with Paraglide message keys - error_file_upload_failed key used in enrich upload handler - label_optional key added (de/en/es) and used in DescriptionSection divider Co-Authored-By: Claude Sonnet 4.6 --- frontend/messages/de.json | 1 + frontend/messages/en.json | 1 + frontend/messages/es.json | 1 + .../src/lib/components/document/DescriptionSection.svelte | 4 +++- frontend/src/routes/enrich/[id]/+page.svelte | 2 +- 5 files changed, 7 insertions(+), 2 deletions(-) diff --git a/frontend/messages/de.json b/frontend/messages/de.json index 5417f747..e3a7d610 100644 --- a/frontend/messages/de.json +++ b/frontend/messages/de.json @@ -52,6 +52,7 @@ "form_label_archive_location": "Aufbewahrungsort", "form_placeholder_archive_location": "z.B. Schrank 3, Mappe B", "form_helper_archive_location": "Wo befindet sich das Originaldokument?", + "label_optional": "Optional", "login_heading": "Anmelden", "login_label_username": "Benutzername", "login_label_password": "Passwort", diff --git a/frontend/messages/en.json b/frontend/messages/en.json index b2e76304..3f98a61e 100644 --- a/frontend/messages/en.json +++ b/frontend/messages/en.json @@ -52,6 +52,7 @@ "form_label_archive_location": "Storage location", "form_placeholder_archive_location": "e.g. Cabinet 3, Folder B", "form_helper_archive_location": "Where is the original document stored?", + "label_optional": "Optional", "login_heading": "Sign in", "login_label_username": "Username", "login_label_password": "Password", diff --git a/frontend/messages/es.json b/frontend/messages/es.json index 96f9efc8..68ff5a7d 100644 --- a/frontend/messages/es.json +++ b/frontend/messages/es.json @@ -52,6 +52,7 @@ "form_label_archive_location": "Ubicación de almacenamiento", "form_placeholder_archive_location": "p.ej. Armario 3, Carpeta B", "form_helper_archive_location": "¿Dónde se encuentra el documento original?", + "label_optional": "Opcional", "login_heading": "Iniciar sesión", "login_label_username": "Usuario", "login_label_password": "Contraseña", diff --git a/frontend/src/lib/components/document/DescriptionSection.svelte b/frontend/src/lib/components/document/DescriptionSection.svelte index f629923b..f26c96fb 100644 --- a/frontend/src/lib/components/document/DescriptionSection.svelte +++ b/frontend/src/lib/components/document/DescriptionSection.svelte @@ -81,7 +81,9 @@ const titleValue = $derived(titleDirty ? currentTitle : suggestedTitle || curren
- Optional + {m.label_optional()}
diff --git a/frontend/src/routes/enrich/[id]/+page.svelte b/frontend/src/routes/enrich/[id]/+page.svelte index 08578094..2bd05b74 100644 --- a/frontend/src/routes/enrich/[id]/+page.svelte +++ b/frontend/src/routes/enrich/[id]/+page.svelte @@ -70,7 +70,7 @@ async function handleFile(file: File) { await invalidate('app:document'); } catch (e) { if ((e as Error).name === 'AbortError') return; - uploadError = 'Upload fehlgeschlagen. Bitte erneut versuchen.'; + uploadError = m.error_file_upload_failed(); } finally { isUploading = false; abortController = null;