feat(#145): internationalise dashboard widget strings (de/en/es)

Replace all hardcoded German strings in dashboard components with
Paraglide translation keys. Date locale uses getLocale() instead
of the hardcoded 'de-DE'.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Marcel
2026-03-29 09:57:14 +02:00
parent 08f3f92167
commit c8da2224f8
7 changed files with 48 additions and 12 deletions

View File

@@ -1,4 +1,6 @@
<script lang="ts">
import * as m from '$lib/paraglide/messages.js';
type IncompleteDocumentDTO = {
id: string;
title: string;
@@ -14,7 +16,7 @@ let { incompleteDocs }: Props = $props();
{#if incompleteDocs.length > 0}
<div data-testid="dashboard-needs-metadata" class="rounded-sm border border-line bg-surface p-6">
<h2 class="mb-4 font-sans text-xs font-bold tracking-widest text-gray-400 uppercase">
Metadaten fehlen
{m.dashboard_needs_metadata_heading()}
</h2>
{#each incompleteDocs as doc (doc.id)}
<div class="flex items-center border-b border-line py-2 last:border-0">
@@ -27,7 +29,9 @@ let { incompleteDocs }: Props = $props();
</div>
{/each}
<div class="mt-4">
<a href="/enrich" class="font-sans text-xs text-ink-2 hover:text-ink"> Alle anzeigen </a>
<a href="/enrich" class="font-sans text-xs text-ink-2 hover:text-ink"
>{m.dashboard_needs_metadata_show_all()}</a
>
</div>
</div>
{/if}