From f29bb3034c724e27363afc3af5ad151367cdc950 Mon Sep 17 00:00:00 2001 From: Till JS Date: Mon, 27 Apr 2026 13:48:35 +0200 Subject: [PATCH] =?UTF-8?q?i18n(finance):=20translate=20+page.svelte=20via?= =?UTF-8?q?=20$=5F()=20=E2=80=94=20header,=20summary=20cards,=20breakdown,?= =?UTF-8?q?=20add=20form,=20history?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - tag, page H1 - Summary cards (Einnahmen/Ausgaben/Bilanz) — labels via $_(); values stay numeric - Section headings (Ausgaben nach Kategorie / Transaktionen) - Add toggle button: cancel + "+ Transaktion hinzufügen" labels - Add form: type-toggle (Ausgabe/Einnahme), amount placeholder ("0,00"), description placeholder, submit button - Loading state ("Laden...") Baselines: hardcoded 1160 → 1150 (10 cleared); missing-keys baseline unchanged. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> --- .../web/src/routes/(app)/finance/+page.svelte | 29 ++++++++++--------- scripts/i18n-hardcoded-baseline.json | 1 - 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/apps/mana/apps/web/src/routes/(app)/finance/+page.svelte b/apps/mana/apps/web/src/routes/(app)/finance/+page.svelte index 7b2701254..754fc2a63 100644 --- a/apps/mana/apps/web/src/routes/(app)/finance/+page.svelte +++ b/apps/mana/apps/web/src/routes/(app)/finance/+page.svelte @@ -15,6 +15,7 @@ } from '$lib/modules/finance/queries'; import { financeStore } from '$lib/modules/finance/stores/finance.svelte'; import { RoutePage } from '$lib/components/shell'; + import { _ } from 'svelte-i18n'; const txs$: Observable<Transaction[]> = getContext('transactions'); const cats$: Observable<FinanceCategory[]> = getContext('financeCategories'); @@ -91,13 +92,13 @@ </script> <svelte:head> - <title>Finance - Mana + {$_('finance.page.page_title_html')}
@@ -111,15 +112,15 @@
- Einnahmen + {$_('finance.page.summary_income')} +{formatCurrency(income)}
- Ausgaben + {$_('finance.page.summary_expenses')} -{formatCurrency(expenses)}
- Bilanz + {$_('finance.page.summary_balance')} = 0} class:expense={balance < 0}> {balance >= 0 ? '+' : ''}{formatCurrency(balance)} @@ -129,7 +130,7 @@ {#if spending.size > 0}
-

Ausgaben nach Kategorie

+

{$_('finance.page.section_by_category')}

{#each expenseCategories as cat (cat.id)} {@const amount = spending.get(cat.id) ?? 0} @@ -154,7 +155,7 @@ @@ -165,13 +166,13 @@ type="button" class="type-btn" class:active={addType === 'expense'} - onclick={() => (addType = 'expense')}>Ausgabe (addType = 'expense')}>{$_('finance.page.type_expense')} (addType = 'income')}>{$_('finance.page.type_income')}
@@ -180,7 +181,7 @@ class="amount-input" type="text" inputmode="decimal" - placeholder="0,00" + placeholder={$_('finance.page.placeholder_amount')} bind:value={addAmount} autofocus /> @@ -189,7 +190,7 @@
@@ -206,7 +207,7 @@ {/each}
{$_('finance.page.action_submit')} {/if} @@ -214,7 +215,7 @@ {#if monthTxs.length > 0}
-

Transaktionen

+

{$_('finance.page.section_transactions')}

{#each [...grouped.entries()] as [date, dayTxs] (date)}
{formatDateLabel(date)}
@@ -240,7 +241,7 @@
{/if} {:else} -
Laden...
+
{$_('finance.page.loading')}
{/if}
diff --git a/scripts/i18n-hardcoded-baseline.json b/scripts/i18n-hardcoded-baseline.json index 330cf833c..ec606625f 100644 --- a/scripts/i18n-hardcoded-baseline.json +++ b/scripts/i18n-hardcoded-baseline.json @@ -240,7 +240,6 @@ "apps/mana/apps/web/src/routes/(app)/context/documents/+page.svelte": 5, "apps/mana/apps/web/src/routes/(app)/context/spaces/[id]/+page.svelte": 3, "apps/mana/apps/web/src/routes/(app)/context/spaces/+page.svelte": 5, - "apps/mana/apps/web/src/routes/(app)/finance/+page.svelte": 10, "apps/mana/apps/web/src/routes/(app)/food/[id]/+page.svelte": 10, "apps/mana/apps/web/src/routes/(app)/food/+page.svelte": 7, "apps/mana/apps/web/src/routes/(app)/food/add/+page.svelte": 2,