From 165a3e0d12437933ceb1b5c731443d578a2ef1b7 Mon Sep 17 00:00:00 2001 From: Till JS Date: Mon, 27 Apr 2026 13:53:14 +0200 Subject: [PATCH] =?UTF-8?q?i18n(context):=20translate=20+page.svelte=20via?= =?UTF-8?q?=20$=5F()=20=E2=80=94=20overview=20page?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Header (title + subtitle), 4 stat cards (Spaces/Dokumente/Wörter/Split- label), 2 quick-action buttons, pinned-spaces section heading, recent- docs section + "Alle anzeigen" link, "Angeheftet" badge, pin/unpin title toggle, empty-state title+hint+action, "Dokument wirklich löschen?" confirm. Baselines: hardcoded 1150 → 1140 (10 cleared); missing-keys baseline unchanged. Co-Authored-By: Claude Opus 4.7 (1M context) --- .../web/src/routes/(app)/context/+page.svelte | 37 ++++++++++--------- scripts/i18n-hardcoded-baseline.json | 1 - 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/apps/mana/apps/web/src/routes/(app)/context/+page.svelte b/apps/mana/apps/web/src/routes/(app)/context/+page.svelte index 10b757e69..51df56473 100644 --- a/apps/mana/apps/web/src/routes/(app)/context/+page.svelte +++ b/apps/mana/apps/web/src/routes/(app)/context/+page.svelte @@ -9,6 +9,7 @@ } from '$lib/modules/context/queries'; import { documentTable } from '$lib/modules/context/collections'; import { RoutePage } from '$lib/components/shell'; + import { _ } from 'svelte-i18n'; const allSpaces = useAllSpaces(); const allDocuments = useAllDocuments(); @@ -20,7 +21,7 @@ const recentDocs = $derived(documents.slice(0, 6)); async function handleDeleteDoc(id: string) { - if (!confirm('Dokument wirklich loeschen?')) return; + if (!confirm($_('context.home.confirm_delete_doc'))) return; await documentTable.delete(id); } @@ -33,14 +34,14 @@ - Context - Mana + {$_('context.home.page_title_html')}
-

Context

-

Dein Wissensmanagement Hub

+

{$_('context.home.title')}

+

{$_('context.home.subtitle')}

@@ -49,25 +50,25 @@ class="rounded-xl border border-border-strong bg-white p-4 text-center dark:border-border dark:bg-card" >
{spaces.length}
-
Spaces
+
{$_('context.home.stat_spaces')}
{stats.total}
-
Dokumente
+
{$_('context.home.stat_documents')}
{stats.totalWords.toLocaleString()}
-
Woerter
+
{$_('context.home.stat_words')}
{stats.text}/{stats.context}/{stats.prompt}
-
Text/Kontext/Prompt
+
{$_('context.home.stat_split_label')}
@@ -78,21 +79,21 @@ class="flex items-center gap-2 rounded-lg bg-indigo-600 px-4 py-2 text-sm font-medium text-white transition-colors hover:bg-indigo-700" > - Spaces + {$_('context.home.action_spaces')} - Alle Dokumente + {$_('context.home.action_all_documents')} {#if pinnedSpaces.length > 0}
-

Angeheftete Spaces

+

{$_('context.home.section_pinned')}

{#each pinnedSpaces as space} 0}
@@ -147,7 +148,7 @@ {doc.type} {#if doc.pinned} - Angeheftet + {$_('context.home.badge_pinned')} {/if}

{doc.title}

@@ -163,7 +164,7 @@ handleTogglePinDoc(doc.id); }} class="ml-2 rounded p-1 opacity-0 transition-opacity hover:bg-muted group-hover:opacity-100 dark:hover:bg-muted" - title={doc.pinned ? 'Loslassen' : 'Anheften'} + title={doc.pinned ? $_('context.common.unpin') : $_('context.common.pin')} > {doc.pinned ? '★' : '☆'} @@ -187,16 +188,16 @@ class="rounded-xl border-2 border-dashed border-border-strong p-12 text-center dark:border-border" > -

Noch keine Dokumente

+

{$_('context.home.empty_title')}

- Erstelle deinen ersten Space und beginne mit dem Schreiben. + {$_('context.home.empty_hint')}

- Ersten Space erstellen + {$_('context.home.empty_action')}
{/if} diff --git a/scripts/i18n-hardcoded-baseline.json b/scripts/i18n-hardcoded-baseline.json index ec606625f..d8c4c2be4 100644 --- a/scripts/i18n-hardcoded-baseline.json +++ b/scripts/i18n-hardcoded-baseline.json @@ -235,7 +235,6 @@ "apps/mana/apps/web/src/routes/(app)/companion/+page.svelte": 2, "apps/mana/apps/web/src/routes/(app)/contacts/[id]/+page.svelte": 7, "apps/mana/apps/web/src/routes/(app)/contacts/+page.svelte": 7, - "apps/mana/apps/web/src/routes/(app)/context/+page.svelte": 10, "apps/mana/apps/web/src/routes/(app)/context/documents/[id]/+page.svelte": 3, "apps/mana/apps/web/src/routes/(app)/context/documents/+page.svelte": 5, "apps/mana/apps/web/src/routes/(app)/context/spaces/[id]/+page.svelte": 3,