From d27fed3c35e17970a3a6cb1b3e7a4a32eb10e75b Mon Sep 17 00:00:00 2001 From: Marcel Date: Tue, 28 Apr 2026 10:23:49 +0200 Subject: [PATCH] fix(stammbaum): i18n for year-range labels in StammbaumCard Replaces hardcoded German strings "ab {from}" / "bis {to}" in yearRange() with parameterized Paraglide keys relation_year_from / relation_year_to, added to all three message files (de/en/es). Co-Authored-By: Claude Sonnet 4.6 --- frontend/messages/de.json | 2 ++ frontend/messages/en.json | 2 ++ frontend/messages/es.json | 2 ++ frontend/src/lib/components/StammbaumCard.svelte | 4 ++-- 4 files changed, 8 insertions(+), 2 deletions(-) diff --git a/frontend/messages/de.json b/frontend/messages/de.json index 1cde5715..0bf27df3 100644 --- a/frontend/messages/de.json +++ b/frontend/messages/de.json @@ -960,6 +960,8 @@ "relation_error_duplicate": "Diese Beziehung gibt es bereits.", "relation_error_circular": "Diese Beziehung würde einen Kreis erzeugen.", "relation_error_self": "Eine Person kann nicht mit sich selbst verbunden werden.", + "relation_year_from": "ab {year}", + "relation_year_to": "bis {year}", "relation_year_error_bis_before_von": "Bis-Jahr darf nicht vor Von-Jahr liegen.", "relation_label_family_member": "Als Familienmitglied", "relation_label_in_tree": "Erscheint im Stammbaum", diff --git a/frontend/messages/en.json b/frontend/messages/en.json index e7c23070..8df2850b 100644 --- a/frontend/messages/en.json +++ b/frontend/messages/en.json @@ -960,6 +960,8 @@ "relation_error_duplicate": "This relationship already exists.", "relation_error_circular": "This relationship would form a cycle.", "relation_error_self": "A person cannot be related to themselves.", + "relation_year_from": "from {year}", + "relation_year_to": "until {year}", "relation_year_error_bis_before_von": "End year must not precede start year.", "relation_label_family_member": "Family member", "relation_label_in_tree": "Appears in the family tree", diff --git a/frontend/messages/es.json b/frontend/messages/es.json index 93d7c57d..8f37e5e2 100644 --- a/frontend/messages/es.json +++ b/frontend/messages/es.json @@ -960,6 +960,8 @@ "relation_error_duplicate": "Esta relación ya existe.", "relation_error_circular": "Esta relación crearía un ciclo.", "relation_error_self": "Una persona no puede estar relacionada consigo misma.", + "relation_year_from": "desde {year}", + "relation_year_to": "hasta {year}", "relation_year_error_bis_before_von": "El año final no puede ser anterior al año inicial.", "relation_label_family_member": "Miembro de la familia", "relation_label_in_tree": "Aparece en el árbol genealógico", diff --git a/frontend/src/lib/components/StammbaumCard.svelte b/frontend/src/lib/components/StammbaumCard.svelte index d188d510..ccfdabe9 100644 --- a/frontend/src/lib/components/StammbaumCard.svelte +++ b/frontend/src/lib/components/StammbaumCard.svelte @@ -109,8 +109,8 @@ function yearRange(rel: RelationshipDTO): string { const from = rel.fromYear; const to = rel.toYear; if (from && to) return `${from}–${to}`; - if (from) return `ab ${from}`; - if (to) return `bis ${to}`; + if (from) return m.relation_year_from({ year: from }); + if (to) return m.relation_year_to({ year: to }); return ''; }