From abbc456caef3da15bd26aba62b8a97b3e518771a Mon Sep 17 00:00:00 2001 From: Till JS Date: Mon, 27 Apr 2026 14:49:23 +0200 Subject: [PATCH] =?UTF-8?q?i18n(mail):=20translate=20ListView=20via=20$=5F?= =?UTF-8?q?()=20=E2=80=94=20sidebar,=20thread=20list,=20compose=20form,=20?= =?UTF-8?q?context=20menu?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - "Neue Mail" compose button - Loading + retry, "Keine Mails" + "Postfach ist leer" empty hint - Compose form: heading, to/subject/body placeholders, cancel + send/sending action - Thread detail: "Unbekannt" sender fallback, "An:" to-prefix, "Wähle eine Nachricht aus" empty-detail - Context menu: 6 conditional labels (mark read/unread, star/unstar, archive, delete) Baselines: hardcoded 1050 → 1042 (8 cleared); missing-keys baseline unchanged. Co-Authored-By: Claude Opus 4.7 (1M context) --- .../web/src/lib/modules/mail/ListView.svelte | 50 ++++++++++++------- scripts/i18n-hardcoded-baseline.json | 1 - 2 files changed, 32 insertions(+), 19 deletions(-) diff --git a/apps/mana/apps/web/src/lib/modules/mail/ListView.svelte b/apps/mana/apps/web/src/lib/modules/mail/ListView.svelte index e9afcd3c2..df2e2b9f9 100644 --- a/apps/mana/apps/web/src/lib/modules/mail/ListView.svelte +++ b/apps/mana/apps/web/src/lib/modules/mail/ListView.svelte @@ -11,6 +11,7 @@ import { ContextMenu, type ContextMenuItem } from '@mana/shared-ui'; import { useItemContextMenu } from '$lib/data/item-context-menu.svelte'; import { Trash, Star, EnvelopeOpen, Archive } from '@mana/shared-icons'; + import { _ } from 'svelte-i18n'; let showCompose = $state(false); let selectedThreadId = $state(null); @@ -73,26 +74,30 @@ ? [ { id: 'read', - label: ctxMenu.state.target.isRead ? 'Als ungelesen' : 'Als gelesen', + label: ctxMenu.state.target.isRead + ? $_('mail.list_view.ctx_mark_unread') + : $_('mail.list_view.ctx_mark_read'), icon: EnvelopeOpen, action: () => {}, }, { id: 'star', - label: ctxMenu.state.target.isFlagged ? 'Stern entfernen' : 'Markieren', + label: ctxMenu.state.target.isFlagged + ? $_('mail.list_view.ctx_unstar') + : $_('mail.list_view.ctx_star'), icon: Star, action: () => {}, }, { id: 'archive', - label: 'Archivieren', + label: $_('mail.list_view.ctx_archive'), icon: Archive, action: () => {}, }, { id: 'div', label: '', type: 'divider' as const }, { id: 'delete', - label: 'Löschen', + label: $_('mail.list_view.ctx_delete'), icon: Trash, variant: 'danger' as const, action: () => {}, @@ -105,7 +110,9 @@
- +
{#each mailStore.mailboxes as mb (mb.id)} @@ -127,16 +134,18 @@
{#if mailStore.loading && mailStore.threads.length === 0} -
Lade Mails...
+
{$_('mail.list_view.loading')}
{:else if mailStore.error}

{mailStore.error}

- +
{:else if mailStore.threads.length === 0}
-

Keine Mails

-

Dein Postfach ist leer.

+

{$_('mail.list_view.empty_title')}

+

{$_('mail.list_view.empty_hint')}

{:else} {#each mailStore.threads as thread (thread.id)} @@ -176,37 +185,37 @@ onsubmit={handleSend} onkeydown={(e) => e.key === 'Escape' && (showCompose = false)} > -
Neue Nachricht
+
{$_('mail.list_view.compose_heading')}
{$_('mail.list_view.action_cancel')}
@@ -217,12 +226,17 @@
{msg.from?.[0]?.name || msg.from?.[0]?.email || 'Unbekannt'}{msg.from?.[0]?.name || + msg.from?.[0]?.email || + $_('mail.list_view.sender_unknown')} {formatDate(msg.date)}
{#if msg.to} -
An: {msg.to.map((t) => t.name || t.email).join(', ')}
+
+ {$_('mail.list_view.thread_to_prefix')} + {msg.to.map((t) => t.name || t.email).join(', ')} +
{/if}
{#if msg.bodyHtml} @@ -236,7 +250,7 @@
{:else}
-

Wähle eine Nachricht aus

+

{$_('mail.list_view.empty_detail')}

{/if}
diff --git a/scripts/i18n-hardcoded-baseline.json b/scripts/i18n-hardcoded-baseline.json index 5452ee4ea..0a302be12 100644 --- a/scripts/i18n-hardcoded-baseline.json +++ b/scripts/i18n-hardcoded-baseline.json @@ -127,7 +127,6 @@ "apps/mana/apps/web/src/lib/modules/library/components/ProgressControls.svelte": 3, "apps/mana/apps/web/src/lib/modules/library/ListView.svelte": 1, "apps/mana/apps/web/src/lib/modules/library/views/GridView.svelte": 2, - "apps/mana/apps/web/src/lib/modules/mail/ListView.svelte": 8, "apps/mana/apps/web/src/lib/modules/meditate/components/SessionPlayer.svelte": 3, "apps/mana/apps/web/src/lib/modules/meditate/components/StatsOverview.svelte": 3, "apps/mana/apps/web/src/lib/modules/meditate/ListView.svelte": 1,