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,7 @@
<script lang="ts">
import * as m from '$lib/paraglide/messages.js';
import { getLocale } from '$lib/paraglide/runtime.js';
type Document = {
id: string;
title: string;
@@ -13,7 +16,7 @@ interface Props {
let { recentDocs }: Props = $props();
function formatDate(dateStr: string): string {
return new Intl.DateTimeFormat('de-DE', {
return new Intl.DateTimeFormat(getLocale(), {
day: 'numeric',
month: 'long',
year: 'numeric'
@@ -24,7 +27,7 @@ function formatDate(dateStr: string): string {
{#if recentDocs.length > 0}
<div data-testid="dashboard-recent-docs" 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">
Zuletzt hinzugefügt
{m.dashboard_recent_heading()}
</h2>
{#each recentDocs as doc (doc.id)}
<div class="flex items-center justify-between border-b border-line py-2 last:border-0">