feat(timeline): add layer-filter i18n keys (de/en/es)
Eight Paraglide keys for the /zeitstrahl layer filter — layer labels, the
fieldset legend, the sticky trigger (distinct timeline_filter_trigger and
timeline_filter_trigger_active({count}) so it never reads "Filter (0 aktiv)"),
the reset button, and the filtered-empty message — added to all three locales.
messages.spec asserts their presence and the {count} signature.
Refs #780
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -98,4 +98,29 @@ describe('message key parity', () => {
|
||||
expect(en).toMatchObject({ timeline_tag_chip_label: 'Topic' });
|
||||
expect(es).toMatchObject({ timeline_tag_chip_label: 'Tema' });
|
||||
});
|
||||
|
||||
// #780 REQ-010: the layer-filter strings are Paraglide keys in every locale.
|
||||
// timeline_filter_trigger (0 active) and timeline_filter_trigger_active ({count},
|
||||
// ≥1 active) are distinct keys so the trigger never reads "Filter (0 aktiv)".
|
||||
it('zeitstrahl layer-filter keys are present in all locales (#780 REQ-010)', () => {
|
||||
const requiredKeys = [
|
||||
'timeline_filter_label_layers',
|
||||
'timeline_filter_layer_personal',
|
||||
'timeline_filter_layer_historical',
|
||||
'timeline_filter_layer_letters',
|
||||
'timeline_filter_trigger',
|
||||
'timeline_filter_trigger_active',
|
||||
'timeline_filter_reset',
|
||||
'timeline_filter_empty_state'
|
||||
];
|
||||
for (const key of requiredKeys) {
|
||||
expect(de, `missing key in de: ${key}`).toHaveProperty(key);
|
||||
expect(en, `missing key in en: ${key}`).toHaveProperty(key);
|
||||
expect(es, `missing key in es: ${key}`).toHaveProperty(key);
|
||||
}
|
||||
// the active-count key carries the established {count} placeholder
|
||||
expect(de.timeline_filter_trigger_active).toContain('{count}');
|
||||
expect(en.timeline_filter_trigger_active).toContain('{count}');
|
||||
expect(es.timeline_filter_trigger_active).toContain('{count}');
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user