mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-14 20:01:09 +02:00
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:
parent
c89792fe46
commit
2266d83cd4
7 changed files with 81 additions and 11 deletions
|
|
@ -74,5 +74,18 @@
|
||||||
"error": "Fehler",
|
"error": "Fehler",
|
||||||
"success": "Erfolgreich",
|
"success": "Erfolgreich",
|
||||||
"create": "Erstellen"
|
"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"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -74,5 +74,18 @@
|
||||||
"error": "Error",
|
"error": "Error",
|
||||||
"success": "Success",
|
"success": "Success",
|
||||||
"create": "Create"
|
"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"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -74,5 +74,18 @@
|
||||||
"error": "Error",
|
"error": "Error",
|
||||||
"success": "Éxito",
|
"success": "Éxito",
|
||||||
"create": "Crear"
|
"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"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -74,5 +74,18 @@
|
||||||
"error": "Erreur",
|
"error": "Erreur",
|
||||||
"success": "Succès",
|
"success": "Succès",
|
||||||
"create": "Créer"
|
"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é"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -74,5 +74,18 @@
|
||||||
"error": "Errore",
|
"error": "Errore",
|
||||||
"success": "Successo",
|
"success": "Successo",
|
||||||
"create": "Crea"
|
"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"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -39,7 +39,7 @@
|
||||||
colors: newColors,
|
colors: newColors,
|
||||||
animation: newAnimation,
|
animation: newAnimation,
|
||||||
});
|
});
|
||||||
toast.success(`"${newName}" erstellt`);
|
toast.success($_('moodlit.moodsPage.toast_created', { values: { name: newName } }));
|
||||||
newName = '';
|
newName = '';
|
||||||
showCreate = false;
|
showCreate = false;
|
||||||
}
|
}
|
||||||
|
|
@ -65,27 +65,29 @@
|
||||||
|
|
||||||
async function deleteMood(mood: LocalMood) {
|
async function deleteMood(mood: LocalMood) {
|
||||||
if (mood.isDefault) {
|
if (mood.isDefault) {
|
||||||
toast.error('Standard-Moods konnen nicht geloscht werden');
|
toast.error($_('moodlit.moodsPage.toast_default_protected'));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
await moodsStore.deleteMood(mood.id);
|
await moodsStore.deleteMood(mood.id);
|
||||||
toast.success('Geloscht');
|
toast.success($_('moodlit.moodsPage.toast_deleted'));
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<svelte:head>
|
<svelte:head>
|
||||||
<title>Moods - Moodlit - Mana</title>
|
<title>{$_('moodlit.moodsPage.page_title_html')}</title>
|
||||||
</svelte:head>
|
</svelte:head>
|
||||||
|
|
||||||
<RoutePage appId="moodlit" backHref="/moodlit">
|
<RoutePage appId="moodlit" backHref="/moodlit">
|
||||||
<div class="mx-auto max-w-4xl">
|
<div class="mx-auto max-w-4xl">
|
||||||
<div class="mb-6 flex items-center justify-between">
|
<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
|
<button
|
||||||
onclick={() => (showCreate = !showCreate)}
|
onclick={() => (showCreate = !showCreate)}
|
||||||
class="rounded-lg bg-purple-600 px-4 py-2 font-medium text-white hover:bg-purple-700"
|
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>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
@ -94,20 +96,21 @@
|
||||||
<div class="grid gap-4 md:grid-cols-2">
|
<div class="grid gap-4 md:grid-cols-2">
|
||||||
<div>
|
<div>
|
||||||
<label for="moodlit-name" class="mb-1 block text-sm font-medium text-muted-foreground"
|
<label for="moodlit-name" class="mb-1 block text-sm font-medium text-muted-foreground"
|
||||||
>Name</label
|
>{$_('moodlit.moodsPage.label_name')}</label
|
||||||
>
|
>
|
||||||
<input
|
<input
|
||||||
id="moodlit-name"
|
id="moodlit-name"
|
||||||
type="text"
|
type="text"
|
||||||
bind:value={newName}
|
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"
|
class="w-full rounded-lg border border-border bg-input px-4 py-2 text-foreground"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<label
|
<label
|
||||||
for="moodlit-animation"
|
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
|
<select
|
||||||
id="moodlit-animation"
|
id="moodlit-animation"
|
||||||
|
|
@ -122,7 +125,9 @@
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<div class="md:col-span-2">
|
<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">
|
<div class="flex gap-2">
|
||||||
{#each newColors as color, i}
|
{#each newColors as color, i}
|
||||||
<input
|
<input
|
||||||
|
|
|
||||||
|
|
@ -261,7 +261,7 @@
|
||||||
"apps/mana/apps/web/src/routes/(app)/memoro/archive/+page.svelte": 2,
|
"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)/memoro/tags/+page.svelte": 6,
|
||||||
"apps/mana/apps/web/src/routes/(app)/moodlit/+page.svelte": 3,
|
"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)/moodlit/sequences/+page.svelte": 3,
|
||||||
"apps/mana/apps/web/src/routes/(app)/music/+page.svelte": 6,
|
"apps/mana/apps/web/src/routes/(app)/music/+page.svelte": 6,
|
||||||
"apps/mana/apps/web/src/routes/(app)/music/library/+page.svelte": 6,
|
"apps/mana/apps/web/src/routes/(app)/music/library/+page.svelte": 6,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue