From 2cf3a06a3e3a75f0327da7f9020f811d4e721381 Mon Sep 17 00:00:00 2001 From: Till JS Date: Mon, 27 Apr 2026 14:45:15 +0200 Subject: [PATCH] =?UTF-8?q?i18n(notes):=20translate=20/notes=20+page.svelt?= =?UTF-8?q?e=20via=20$=5F()=20=E2=80=94=20header,=20toolbar,=20create=20fo?= =?UTF-8?q?rm,=20sections?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - , page H1, "{n} Notizen" stats counter - Search placeholder + "+ Neue Notiz" action - Create form: Titel/Schreibe etwas placeholders + Abbrechen/Erstellen actions - "Unbenannt" fallback used in mutation + 2 card titles - Section labels (Angepinnt / Weitere) - Empty: "Noch keine Notizen." + "Erste Notiz erstellen" action - Loading: "Laden..." Baselines: hardcoded 1058 → 1050 (8 cleared); missing-keys baseline unchanged. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> --- .../web/src/routes/(app)/notes/+page.svelte | 41 +++++++++++-------- scripts/i18n-hardcoded-baseline.json | 1 - 2 files changed, 24 insertions(+), 18 deletions(-) diff --git a/apps/mana/apps/web/src/routes/(app)/notes/+page.svelte b/apps/mana/apps/web/src/routes/(app)/notes/+page.svelte index 028cc92c5..185dc2527 100644 --- a/apps/mana/apps/web/src/routes/(app)/notes/+page.svelte +++ b/apps/mana/apps/web/src/routes/(app)/notes/+page.svelte @@ -7,6 +7,7 @@ import { notesStore } from '$lib/modules/notes/stores/notes.svelte'; import { NOTE_COLORS } from '$lib/modules/notes/types'; import { RoutePage } from '$lib/components/shell'; + import { _ } from 'svelte-i18n'; const allNotes$: Observable<Note[]> = getContext('notes'); @@ -35,7 +36,7 @@ e.preventDefault(); if (!newTitle.trim() && !newContent.trim()) return; const note = await notesStore.createNote({ - title: newTitle.trim() || 'Unbenannt', + title: newTitle.trim() || $_('notes.page.untitled'), content: newContent, color: newColor, }); @@ -48,16 +49,18 @@ </script> <svelte:head> - <title>Notes - Mana + {$_('notes.page.page_title_html')}
-

Notes

+

{$_('notes.page.title')}

{#if isLoaded} -
{notes.length} Notizen
+
+ {$_('notes.page.stats_count', { values: { n: notes.length } })} +
{/if}
@@ -67,10 +70,12 @@ - +
@@ -80,13 +85,13 @@ @@ -106,9 +111,9 @@
{$_('notes.page.action_cancel')} - +
@@ -118,7 +123,7 @@ {#if pinnedNotes.length > 0}
- +
{#each pinnedNotes as note (note.id)} -
{note.title || 'Unbenannt'}
+
{note.title || $_('notes.page.untitled')}
{getPreview(note.content, 120)}
{formatRelativeTime(note.updatedAt)}
@@ -139,7 +144,7 @@ {#if unpinnedNotes.length > 0}
{#if pinnedNotes.length > 0} - + {/if}
{#each unpinnedNotes as note (note.id)} @@ -148,7 +153,7 @@ class="note-card" style:border-top-color={note.color ?? 'transparent'} > -
{note.title || 'Unbenannt'}
+
{note.title || $_('notes.page.untitled')}
{getPreview(note.content, 120)}
{formatRelativeTime(note.updatedAt)}
@@ -159,12 +164,14 @@ {#if notes.length === 0 && !showCreate}
-

Noch keine Notizen.

- +

{$_('notes.page.empty_no_notes')}

+
{/if} {:else} -
Laden...
+
{$_('notes.page.loading')}
{/if}
diff --git a/scripts/i18n-hardcoded-baseline.json b/scripts/i18n-hardcoded-baseline.json index bf345ce89..5452ee4ea 100644 --- a/scripts/i18n-hardcoded-baseline.json +++ b/scripts/i18n-hardcoded-baseline.json @@ -270,7 +270,6 @@ "apps/mana/apps/web/src/routes/(app)/news/saved/+page.svelte": 1, "apps/mana/apps/web/src/routes/(app)/news/sources/+page.svelte": 1, "apps/mana/apps/web/src/routes/(app)/notes/[id]/+page.svelte": 5, - "apps/mana/apps/web/src/routes/(app)/notes/+page.svelte": 8, "apps/mana/apps/web/src/routes/(app)/observatory/+page.svelte": 6, "apps/mana/apps/web/src/routes/(app)/onboarding/+layout.svelte": 3, "apps/mana/apps/web/src/routes/(app)/onboarding/look/+page.svelte": 6,