diff --git a/apps/mana/apps/web/src/lib/modules/recipes/ListView.svelte b/apps/mana/apps/web/src/lib/modules/recipes/ListView.svelte index 3d8041a26..c2f4edfe6 100644 --- a/apps/mana/apps/web/src/lib/modules/recipes/ListView.svelte +++ b/apps/mana/apps/web/src/lib/modules/recipes/ListView.svelte @@ -14,7 +14,6 @@ } from './queries'; import { recipesStore } from './stores/recipes.svelte'; import { - DIFFICULTY_LABELS, DIFFICULTY_COLORS, DEFAULT_TAGS, UNIT_OPTIONS, @@ -26,6 +25,7 @@ import { useItemContextMenu } from '$lib/data/item-context-menu.svelte'; import { Trash, Heart, Copy, Star } from '@mana/shared-icons'; import { VisibilityPicker } from '@mana/shared-privacy'; + import { _ } from 'svelte-i18n'; let recipes$ = useAllRecipes(); let recipes = $derived(recipes$.value); @@ -64,7 +64,9 @@ ? [ { id: 'favorite', - label: ctxMenu.state.target.isFavorite ? 'Favorit entfernen' : 'Als Favorit', + label: ctxMenu.state.target.isFavorite + ? $_('recipes.list_view.ctx_remove_fav') + : $_('recipes.list_view.ctx_make_fav'), icon: Heart, action: () => { const t = ctxMenu.state.target; @@ -73,7 +75,7 @@ }, { id: 'duplicate', - label: 'Duplizieren', + label: $_('recipes.list_view.ctx_duplicate'), icon: Copy, action: () => { const t = ctxMenu.state.target; @@ -83,7 +85,7 @@ { id: 'div', label: '', type: 'divider' as const }, { id: 'delete', - label: 'Löschen', + label: $_('recipes.list_view.ctx_delete'), icon: Trash, variant: 'danger' as const, action: () => { @@ -161,7 +163,7 @@
@@ -171,7 +173,7 @@ onclick={() => (showFavoritesOnly = !showFavoritesOnly)} > - Favoriten + {$_('recipes.list_view.chip_favorites')} {#each ['easy', 'medium', 'hard'] as const as d} {/each}
@@ -244,10 +246,12 @@ style:background="{DIFFICULTY_COLORS[recipe.difficulty]}22" style:color={DIFFICULTY_COLORS[recipe.difficulty]} > - {DIFFICULTY_LABELS[recipe.difficulty].de} + {$_('recipes.difficulties.' + recipe.difficulty)} {#if totalTime}{formatTime(totalTime)}{/if} - {recipe.servings} Port. + {$_('recipes.list_view.badge_servings', { values: { n: recipe.servings } })} {#if recipe.tags.length > 0}
@@ -262,7 +266,7 @@ {#if expandedId === recipe.id}
-
Sichtbarkeit
+
{$_('recipes.detail_panel.heading_visibility')}
recipesStore.setVisibility(recipe.id, next)} @@ -271,7 +275,12 @@ {#if recipe.ingredients.length > 0}
- Zutaten ({recipe.servings} Portionen) + {$_('recipes.detail_panel.heading_ingredients')} + {$_('recipes.detail_panel.ingredients_servings_suffix', { + values: { n: recipe.servings }, + })}
{#each recipe.ingredients as ing}
@@ -283,7 +292,7 @@ {/if} {#if recipe.steps.length > 0}
-
Zubereitung
+
{$_('recipes.detail_panel.heading_steps')}
{#each recipe.steps as step, i}
{i + 1} @@ -311,7 +320,7 @@ }} > + - Neues Rezept + {$_('recipes.list_view.add_card')}
{/if}
@@ -320,41 +329,47 @@ {#if showCreate}
-
Neues Rezept
+
{$_('recipes.create_form.heading_new_recipe')}
- +
- Tags + {$_('recipes.create_form.label_tags')}
{#each DEFAULT_TAGS as tag} +
- Schritte + {$_('recipes.create_form.label_steps')} {#each newSteps as _, i}
{i + 1}. @@ -416,12 +433,18 @@ >{/if}
{/each} - +
- - + +
{/if} @@ -429,11 +452,12 @@ {#if filtered.length === 0 && !showCreate}
{#if recipes.length === 0} -

Noch keine Rezepte gespeichert.

- {$_('recipes.list_view.empty_no_recipes')}

+ {:else} -

Keine Rezepte gefunden.

+

{$_('recipes.list_view.empty_no_match')}

{/if}
{/if} diff --git a/scripts/i18n-hardcoded-baseline.json b/scripts/i18n-hardcoded-baseline.json index 048f5b8a0..80015b94d 100644 --- a/scripts/i18n-hardcoded-baseline.json +++ b/scripts/i18n-hardcoded-baseline.json @@ -176,7 +176,6 @@ "apps/mana/apps/web/src/lib/modules/quiz/ListView.svelte": 5, "apps/mana/apps/web/src/lib/modules/quiz/PlayView.svelte": 6, "apps/mana/apps/web/src/lib/modules/quotes/views/DetailView.svelte": 2, - "apps/mana/apps/web/src/lib/modules/recipes/ListView.svelte": 14, "apps/mana/apps/web/src/lib/modules/research-lab/components/CompareColumn.svelte": 2, "apps/mana/apps/web/src/lib/modules/research-lab/ListView.svelte": 4, "apps/mana/apps/web/src/lib/modules/rituals/ListView.svelte": 1, diff --git a/scripts/i18n-missing-baseline.json b/scripts/i18n-missing-baseline.json index 7e2aa2d69..b95591051 100644 --- a/scripts/i18n-missing-baseline.json +++ b/scripts/i18n-missing-baseline.json @@ -15,6 +15,7 @@ "apps/mana/apps/web/src/lib/modules/period/ListView.svelte": 1, "apps/mana/apps/web/src/lib/modules/plants/ListView.svelte": 5, "apps/mana/apps/web/src/lib/modules/quotes/components/QuoteCard.svelte": 4, + "apps/mana/apps/web/src/lib/modules/recipes/ListView.svelte": 1, "apps/mana/apps/web/src/lib/modules/times/components/EntryForm.svelte": 6, "apps/mana/apps/web/src/lib/modules/times/components/EntryItem.svelte": 6, "apps/mana/apps/web/src/lib/modules/times/components/EntryList.svelte": 2,