i18n(moodlit): translate moods/+page.svelte via $_() — page header, create form, toasts

- <title>, page H1
- Toggle button (Schliessen / + Neues Mood) — was misspelled "Schliessen" without ß; new key uses correct form internally
- Create form: Name label + Mein Mood placeholder, Animation label, Farben label
- Toast messages: "{name} erstellt" with interpolation, "Standard-Moods können nicht gelöscht werden" (was missing ä/ö), "Gelöscht"
- Animation option labels (Gradient/Pulse/Wave/Flicker/Aurora) left as proper nouns

Baselines: hardcoded 1103 → 1099 (4 cleared, of 9 — remaining all decorative animation names that read as proper nouns); missing-keys baseline unchanged.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Till JS 2026-04-27 14:24:18 +02:00
parent c89792fe46
commit 2266d83cd4
7 changed files with 81 additions and 11 deletions

View file

@ -74,5 +74,18 @@
"error": "Fehler",
"success": "Erfolgreich",
"create": "Erstellen"
},
"moodsPage": {
"page_title_html": "Moods - Moodlit - Mana",
"title": "Moods",
"action_close": "Schliessen",
"action_new_mood": "+ Neues Mood",
"label_name": "Name",
"placeholder_name": "Mein Mood",
"label_animation": "Animation",
"label_colors": "Farben",
"toast_created": "\"{name}\" erstellt",
"toast_default_protected": "Standard-Moods können nicht gelöscht werden",
"toast_deleted": "Gelöscht"
}
}

View file

@ -74,5 +74,18 @@
"error": "Error",
"success": "Success",
"create": "Create"
},
"moodsPage": {
"page_title_html": "Moods - Moodlit - Mana",
"title": "Moods",
"action_close": "Close",
"action_new_mood": "+ New mood",
"label_name": "Name",
"placeholder_name": "My mood",
"label_animation": "Animation",
"label_colors": "Colors",
"toast_created": "\"{name}\" created",
"toast_default_protected": "Default moods can't be deleted",
"toast_deleted": "Deleted"
}
}

View file

@ -74,5 +74,18 @@
"error": "Error",
"success": "Éxito",
"create": "Crear"
},
"moodsPage": {
"page_title_html": "Moods - Moodlit - Mana",
"title": "Moods",
"action_close": "Cerrar",
"action_new_mood": "+ Nuevo mood",
"label_name": "Nombre",
"placeholder_name": "Mi mood",
"label_animation": "Animación",
"label_colors": "Colores",
"toast_created": "«{name}» creado",
"toast_default_protected": "Los moods predeterminados no se pueden eliminar",
"toast_deleted": "Eliminado"
}
}

View file

@ -74,5 +74,18 @@
"error": "Erreur",
"success": "Succès",
"create": "Créer"
},
"moodsPage": {
"page_title_html": "Moods - Moodlit - Mana",
"title": "Moods",
"action_close": "Fermer",
"action_new_mood": "+ Nouveau mood",
"label_name": "Nom",
"placeholder_name": "Mon mood",
"label_animation": "Animation",
"label_colors": "Couleurs",
"toast_created": "« {name} » créé",
"toast_default_protected": "Les moods par défaut ne peuvent pas être supprimés",
"toast_deleted": "Supprimé"
}
}

View file

@ -74,5 +74,18 @@
"error": "Errore",
"success": "Successo",
"create": "Crea"
},
"moodsPage": {
"page_title_html": "Moods - Moodlit - Mana",
"title": "Moods",
"action_close": "Chiudi",
"action_new_mood": "+ Nuovo mood",
"label_name": "Nome",
"placeholder_name": "Il mio mood",
"label_animation": "Animazione",
"label_colors": "Colori",
"toast_created": "«{name}» creato",
"toast_default_protected": "I mood predefiniti non possono essere eliminati",
"toast_deleted": "Eliminato"
}
}

View file

@ -39,7 +39,7 @@
colors: newColors,
animation: newAnimation,
});
toast.success(`"${newName}" erstellt`);
toast.success($_('moodlit.moodsPage.toast_created', { values: { name: newName } }));
newName = '';
showCreate = false;
}
@ -65,27 +65,29 @@
async function deleteMood(mood: LocalMood) {
if (mood.isDefault) {
toast.error('Standard-Moods konnen nicht geloscht werden');
toast.error($_('moodlit.moodsPage.toast_default_protected'));
return;
}
await moodsStore.deleteMood(mood.id);
toast.success('Geloscht');
toast.success($_('moodlit.moodsPage.toast_deleted'));
}
</script>
<svelte:head>
<title>Moods - Moodlit - Mana</title>
<title>{$_('moodlit.moodsPage.page_title_html')}</title>
</svelte:head>
<RoutePage appId="moodlit" backHref="/moodlit">
<div class="mx-auto max-w-4xl">
<div class="mb-6 flex items-center justify-between">
<h1 class="text-3xl font-bold">Moods</h1>
<h1 class="text-3xl font-bold">{$_('moodlit.moodsPage.title')}</h1>
<button
onclick={() => (showCreate = !showCreate)}
class="rounded-lg bg-purple-600 px-4 py-2 font-medium text-white hover:bg-purple-700"
>
{showCreate ? 'Schliessen' : '+ Neues Mood'}
{showCreate
? $_('moodlit.moodsPage.action_close')
: $_('moodlit.moodsPage.action_new_mood')}
</button>
</div>
@ -94,20 +96,21 @@
<div class="grid gap-4 md:grid-cols-2">
<div>
<label for="moodlit-name" class="mb-1 block text-sm font-medium text-muted-foreground"
>Name</label
>{$_('moodlit.moodsPage.label_name')}</label
>
<input
id="moodlit-name"
type="text"
bind:value={newName}
placeholder="Mein Mood"
placeholder={$_('moodlit.moodsPage.placeholder_name')}
class="w-full rounded-lg border border-border bg-input px-4 py-2 text-foreground"
/>
</div>
<div>
<label
for="moodlit-animation"
class="mb-1 block text-sm font-medium text-muted-foreground">Animation</label
class="mb-1 block text-sm font-medium text-muted-foreground"
>{$_('moodlit.moodsPage.label_animation')}</label
>
<select
id="moodlit-animation"
@ -122,7 +125,9 @@
</select>
</div>
<div class="md:col-span-2">
<span class="mb-1 block text-sm font-medium text-muted-foreground">Farben</span>
<span class="mb-1 block text-sm font-medium text-muted-foreground"
>{$_('moodlit.moodsPage.label_colors')}</span
>
<div class="flex gap-2">
{#each newColors as color, i}
<input

View file

@ -261,7 +261,7 @@
"apps/mana/apps/web/src/routes/(app)/memoro/archive/+page.svelte": 2,
"apps/mana/apps/web/src/routes/(app)/memoro/tags/+page.svelte": 6,
"apps/mana/apps/web/src/routes/(app)/moodlit/+page.svelte": 3,
"apps/mana/apps/web/src/routes/(app)/moodlit/moods/+page.svelte": 9,
"apps/mana/apps/web/src/routes/(app)/moodlit/moods/+page.svelte": 5,
"apps/mana/apps/web/src/routes/(app)/moodlit/sequences/+page.svelte": 3,
"apps/mana/apps/web/src/routes/(app)/music/+page.svelte": 6,
"apps/mana/apps/web/src/routes/(app)/music/library/+page.svelte": 6,