From a5cef980aed1fcd533788c6c19cbc9b68e5ef75e Mon Sep 17 00:00:00 2001 From: Till JS Date: Mon, 27 Apr 2026 18:41:43 +0200 Subject: [PATCH] i18n(music+profile): translate detail/hub views via $_() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - music/views/DetailView: route through music.detail.* (new namespace) - profile/ListView: route through profile.hub.* (new sub-namespace) + reuse existing profile.* keys for account-section actions; TABS refactored from literal label → labelKey routing through $_() Baseline 881 → 869 (-12). --- .../lib/modules/music/views/DetailView.svelte | 45 +++++++++----- .../src/lib/modules/profile/ListView.svelte | 59 ++++++++++--------- scripts/i18n-hardcoded-baseline.json | 2 - 3 files changed, 61 insertions(+), 45 deletions(-) diff --git a/apps/mana/apps/web/src/lib/modules/music/views/DetailView.svelte b/apps/mana/apps/web/src/lib/modules/music/views/DetailView.svelte index 7a32f4cd4..6445e570c 100644 --- a/apps/mana/apps/web/src/lib/modules/music/views/DetailView.svelte +++ b/apps/mana/apps/web/src/lib/modules/music/views/DetailView.svelte @@ -10,6 +10,7 @@ import { Heart } from '@mana/shared-icons'; import type { ViewProps } from '$lib/app-registry'; import type { LocalSong } from '../types'; + import { _ } from 'svelte-i18n'; let { params, goBack }: ViewProps = $props(); let songId = $derived(params.songId as string); @@ -38,7 +39,7 @@ async function saveField() { detail.blur(); await libraryStore.updateMetadata(songId, { - title: editTitle.trim() || detail.entity?.title || 'Ohne Titel', + title: editTitle.trim() || detail.entity?.title || $_('music.detail.title_fallback'), artist: editArtist.trim() || undefined, album: editAlbum.trim() || undefined, genre: editGenre.trim() || undefined, @@ -62,14 +63,14 @@ detail.deleteWithUndo({ - label: 'Song gelöscht', + label: $_('music.detail.toast_deleted'), delete: () => libraryStore.delete(songId), goBack, })} @@ -81,7 +82,7 @@ bind:value={editTitle} onfocus={detail.focus} onblur={saveField} - placeholder="Titel..." + placeholder={$_('music.detail.placeholder_title')} /> {/each} @@ -102,12 +103,14 @@
-

Interview starten

+

{$_('profile.hub.hero_title')}

{#if progress.percent > 0} - {progress.answered} von {progress.total} Fragen beantwortet — mach weiter! + {$_('profile.hub.hero_subtitle_progress', { + values: { answered: progress.answered, total: progress.total }, + })} {:else} - Erzähl Mana mehr über dich, damit die App besser zu dir passt. + {$_('profile.hub.hero_subtitle_initial')} {/if}

{#if progress.percent > 0} @@ -133,8 +136,8 @@ - Per Text - Fragen lesen und tippen + {$_('profile.hub.option_text_title')} + {$_('profile.hub.option_text_hint')}
@@ -197,7 +200,11 @@