diff --git a/frontend/src/routes/DocumentList.svelte b/frontend/src/routes/DocumentList.svelte index 825136b2..76f8195a 100644 --- a/frontend/src/routes/DocumentList.svelte +++ b/frontend/src/routes/DocumentList.svelte @@ -32,7 +32,7 @@ const groups = $derived.by(() => { function groupByYear(docItems: DocumentSearchItem[]) { const map = new SvelteMap(); for (const item of docItems) { - const label = item.document.documentDate?.substring(0, 4) ?? 'Ohne Datum'; + const label = item.document.documentDate?.substring(0, 4) ?? m.docs_group_undated(); const bucket = map.get(label); if (bucket) bucket.push(item); else map.set(label, [item]); diff --git a/frontend/src/routes/DocumentList.svelte.spec.ts b/frontend/src/routes/DocumentList.svelte.spec.ts index 9aba3bb6..4633d457 100644 --- a/frontend/src/routes/DocumentList.svelte.spec.ts +++ b/frontend/src/routes/DocumentList.svelte.spec.ts @@ -84,12 +84,12 @@ describe('DocumentList – year grouping', () => { await expect.element(groupCards.nth(1)).toBeInTheDocument(); }); - it('uses Ohne Datum for items with no documentDate', async () => { + it('uses undated label for items with no documentDate', async () => { const items = [ makeItem({ document: { ...makeItem().document, id: '1', documentDate: undefined } }) ]; render(DocumentList, { ...baseProps, items, total: 1 }); - await expect.element(page.getByText('Ohne Datum')).toBeInTheDocument(); + await expect.element(page.getByText('Undatiert')).toBeInTheDocument(); }); it('single year renders one group-card', async () => {