From ce1b4c748e1118689cfa0ba99019163a2802cb98 Mon Sep 17 00:00:00 2001 From: Marcel Date: Sat, 13 Jun 2026 21:30:02 +0200 Subject: [PATCH] test(i18n): pin localized timeline layer/derived labels per locale REQ-024 was updated (issue #779) to require localized sr-only/aria labels instead of German-only. Pin the de/en/es values so they cannot silently drift back to the German source strings. Co-Authored-By: Claude Opus 4.8 --- frontend/src/lib/messages.spec.ts | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/frontend/src/lib/messages.spec.ts b/frontend/src/lib/messages.spec.ts index e6d0b96c..95338e43 100644 --- a/frontend/src/lib/messages.spec.ts +++ b/frontend/src/lib/messages.spec.ts @@ -40,4 +40,32 @@ describe('message key parity', () => { expect(es).toHaveProperty('layout_menu_open'); expect(es).toHaveProperty('layout_menu_close'); }); + + // REQ-024: the timeline layer/life-event labels feed sr-only / aria text, so + // they are localized per locale (the original German-only MVP decision was + // reversed for accessibility). Pin the values so en/es can never silently + // drift back to the German source strings. + it('timeline layer/derived labels are localized per locale (REQ-024)', () => { + expect(de).toMatchObject({ + timeline_layer_world: 'Weltgeschehen', + timeline_layer_family: 'Familie', + timeline_derived_birth: 'Geburt', + timeline_derived_death: 'Tod', + timeline_derived_marriage: 'Heirat' + }); + expect(en).toMatchObject({ + timeline_layer_world: 'World events', + timeline_layer_family: 'Family', + timeline_derived_birth: 'Birth', + timeline_derived_death: 'Death', + timeline_derived_marriage: 'Marriage' + }); + expect(es).toMatchObject({ + timeline_layer_world: 'Acontecimientos mundiales', + timeline_layer_family: 'Familia', + timeline_derived_birth: 'Nacimiento', + timeline_derived_death: 'Fallecimiento', + timeline_derived_marriage: 'Matrimonio' + }); + }); });