diff --git a/apps/mana/apps/web/src/routes/(app)/inventory/items/[id]/+page.svelte b/apps/mana/apps/web/src/routes/(app)/inventory/items/[id]/+page.svelte index 928cda6f3..34c071080 100644 --- a/apps/mana/apps/web/src/routes/(app)/inventory/items/[id]/+page.svelte +++ b/apps/mana/apps/web/src/routes/(app)/inventory/items/[id]/+page.svelte @@ -49,13 +49,6 @@ let newNote = $state(''); const statuses: ItemStatus[] = ['owned', 'lent', 'stored', 'for_sale', 'disposed']; - const statusLabels: Record = { - owned: 'Besitzt', - lent: 'Verliehen', - stored: 'Eingelagert', - for_sale: 'Zu verkaufen', - disposed: 'Entsorgt', - }; function startEditing() { if (!item) return; @@ -90,7 +83,7 @@ } async function deleteItem() { - if (!item || !confirm('Item endgultig loschen?')) return; + if (!item || !confirm($_('inventory.detail.confirm_delete'))) return; await itemsStore.delete(item.id); goto(collection ? `/inventory/collections/${collection.id}` : '/inventory'); } @@ -100,14 +93,22 @@ - {item?.name || 'Item'} - Inventar - Mana + {$_('inventory.detail.page_title_html', { + values: { name: item?.name || $_('inventory.detail.page_title_fallback') }, + })} - + {#if !item}
-

Item nicht gefunden

- Zuruck +

+ {$_('inventory.detail.empty_not_found')} +

+ {$_('inventory.detail.empty_back')}
{:else}
@@ -154,7 +155,7 @@ {$_('inventory.detail.action_delete')} {/if}
@@ -165,10 +166,15 @@
- + @@ -178,17 +184,17 @@ {$_('inventory.detail.label_status')}
{$_('inventory.detail.label_quantity')} Standort{$_('inventory.detail.label_location')} - + {#each categoriesCtx.value as cat} {/each} @@ -233,7 +239,7 @@ {#if collection}

- Eigene Felder + {$_('inventory.detail.section_custom_fields')}

{#each collection.schema.fields.sort((a, b) => a.order - b.order) as field} @@ -294,7 +300,7 @@ class="rounded-xl border border-[hsl(var(--color-border))] bg-[hsl(var(--color-card))] p-4" >

- Details + {$_('inventory.detail.section_details')}

{#each collection.schema.fields.sort((a, b) => a.order - b.order) as field} @@ -314,7 +320,7 @@ class="rounded-xl border border-[hsl(var(--color-border))] bg-[hsl(var(--color-card))] p-4" >

- Notizen ({item.notes.length}) + {$_('inventory.detail.section_notes_count', { values: { n: item.notes.length } })}

{#each item.notes as note (note.id)} @@ -339,7 +345,7 @@ e.key === 'Enter' && addNote()} /> diff --git a/apps/mana/apps/web/src/routes/(app)/questions/+page.svelte b/apps/mana/apps/web/src/routes/(app)/questions/+page.svelte index 1f30460d2..9eb1af19c 100644 --- a/apps/mana/apps/web/src/routes/(app)/questions/+page.svelte +++ b/apps/mana/apps/web/src/routes/(app)/questions/+page.svelte @@ -6,9 +6,11 @@ filterByStatus, searchQuestions, } from '$lib/modules/questions/queries'; - import type { QuestionStatus, ResearchDepth } from '$lib/modules/questions/types'; + import type { QuestionStatus } from '$lib/modules/questions/types'; import { MagnifyingGlass, Clock, CheckCircle, CircleNotch, Archive } from '@mana/shared-icons'; import { RoutePage } from '$lib/components/shell'; + import { _, locale } from 'svelte-i18n'; + import { get } from 'svelte/store'; const allQuestions = useAllQuestions(); const allCollections = useAllCollections(); @@ -38,23 +40,17 @@ archived: { icon: Archive, color: 'text-muted-foreground' }, }; - const depthLabels: Record = { - quick: 'Quick', - standard: 'Standard', - deep: 'Deep', - }; - function formatDate(dateString: string): string { const date = new Date(dateString); const now = new Date(); const diff = now.getTime() - date.getTime(); const days = Math.floor(diff / (1000 * 60 * 60 * 24)); - if (days === 0) return 'Heute'; - if (days === 1) return 'Gestern'; - if (days < 7) return `Vor ${days} Tagen`; + if (days === 0) return $_('questions.home.date_today'); + if (days === 1) return $_('questions.home.date_yesterday'); + if (days < 7) return $_('questions.home.date_days_ago', { values: { n: days } }); - return date.toLocaleDateString('de-DE', { + return date.toLocaleDateString(get(locale) ?? 'de', { month: 'short', day: 'numeric', year: date.getFullYear() !== now.getFullYear() ? 'numeric' : undefined, @@ -63,7 +59,7 @@ - Fragen - Mana + {$_('questions.home.page_title_html')} @@ -72,10 +68,12 @@

- {selectedCollection ? selectedCollection.name : 'Alle Fragen'} + {selectedCollection ? selectedCollection.name : $_('questions.home.heading_all')}

- {filteredQuestions.length} Frage{filteredQuestions.length !== 1 ? 'n' : ''} + {filteredQuestions.length === 1 + ? $_('questions.home.count_one', { values: { n: filteredQuestions.length } }) + : $_('questions.home.count_other', { values: { n: filteredQuestions.length } })}

@@ -83,13 +81,13 @@ href="/questions/collections" class="rounded-lg border border-[hsl(var(--color-border))] px-4 py-2 text-sm font-medium text-[hsl(var(--color-foreground))] transition-colors hover:bg-[hsl(var(--color-muted))]" > - Sammlungen + {$_('questions.home.action_collections')} - Neue Frage + {$_('questions.home.action_new')}
@@ -103,7 +101,7 @@
@@ -112,11 +110,11 @@ bind:value={statusFilter} class="rounded-lg border border-[hsl(var(--color-border))] bg-[hsl(var(--color-input))] px-3 py-2 text-sm text-[hsl(var(--color-foreground))] focus:outline-none focus:ring-2 focus:ring-[hsl(var(--color-primary))]" > - - - - - + + + + + {#if collections.length > 0} @@ -124,7 +122,7 @@ bind:value={selectedCollectionId} class="rounded-lg border border-[hsl(var(--color-border))] bg-[hsl(var(--color-input))] px-3 py-2 text-sm text-[hsl(var(--color-foreground))] focus:outline-none focus:ring-2 focus:ring-[hsl(var(--color-primary))]" > - + {#each collections as collection} {/each} @@ -138,15 +136,17 @@ class="flex flex-col items-center justify-center rounded-xl border-2 border-dashed border-[hsl(var(--color-border))] py-16" > 🔍 -

Keine Fragen

+

+ {$_('questions.home.empty_title')} +

- Stelle deine erste Frage und lass die KI recherchieren. + {$_('questions.home.empty_hint')}

- Neue Frage + {$_('questions.home.empty_action')}
{:else} @@ -200,7 +200,7 @@ - {depthLabels[question.researchDepth]} + {$_('questions.home.depth_' + question.researchDepth)} diff --git a/apps/mana/apps/web/src/routes/accept-invitation/+page.svelte b/apps/mana/apps/web/src/routes/accept-invitation/+page.svelte index e12e67ff8..f91b49c49 100644 --- a/apps/mana/apps/web/src/routes/accept-invitation/+page.svelte +++ b/apps/mana/apps/web/src/routes/accept-invitation/+page.svelte @@ -17,6 +17,8 @@ import { SPACE_TYPE_LABELS } from '@mana/shared-branding'; import { isSpaceType, type SpaceType } from '@mana/shared-types'; import { loadActiveSpace, authFetch, writeActiveSpaceHint } from '$lib/data/scope'; + import { _, locale } from 'svelte-i18n'; + import { get } from 'svelte/store'; interface InvitationPayload { id: string; @@ -45,7 +47,7 @@ async function loadInvitation() { if (!invitationId) { - loadError = 'Kein Einladungs-Code in der URL'; + loadError = $_('invitations.accept.error_no_invitation_id'); loading = false; return; } @@ -56,7 +58,9 @@ `/api/auth/organization/get-invitation?id=${encodeURIComponent(invitationId)}` ); if (!res.ok) { - throw new Error(`Einladung nicht gefunden (${res.status})`); + throw new Error( + $_('invitations.accept.error_not_found', { values: { status: res.status } }) + ); } invitation = (await res.json()) as InvitationPayload; } catch (err) { @@ -124,44 +128,50 @@
{#if loading} -

Lade Einladung …

+

{$_('invitations.accept.loading')}

{:else if loadError} -

Einladung nicht abrufbar

+

{$_('invitations.accept.unavailable_title')}

{loadError}

-

Der Link ist möglicherweise abgelaufen oder schon benutzt.

+

{$_('invitations.accept.unavailable_hint')}

{:else if invitation} {#if invitation.status === 'accepted'} -

Schon angenommen

-

Diese Einladung ist bereits angenommen worden.

- Zur App +

{$_('invitations.accept.already_accepted_title')}

+

{$_('invitations.accept.already_accepted_hint')}

+ {$_('invitations.accept.to_app')} {:else if invitation.status === 'rejected' || invitation.status === 'canceled'} -

Einladung abgelaufen

-

Diese Einladung ist nicht mehr gĂĽltig.

+

{$_('invitations.accept.expired_title')}

+

{$_('invitations.accept.expired_hint')}

{:else} -

Einladung

+

{$_('invitations.accept.eyebrow')}

- {invitation.inviterEmail ?? 'Jemand'} lädt dich in - {invitation.organizationName ?? 'einen Space'} ein + {@html $_('invitations.accept.heading_invite_html', { + values: { + inviter: invitation.inviterEmail ?? $_('invitations.accept.inviter_fallback'), + space: invitation.organizationName ?? $_('invitations.accept.space_fallback'), + }, + })}

- {SPACE_TYPE_LABELS.de[spaceType]} - Rolle: {invitation.role} -

-

- Nach Annahme kannst du in diesem Space mitarbeiten — sehen, was andere schreiben, und - selbst Einträge anlegen. Deine persönlichen Daten bleiben in deinem Personal-Space, - getrennt. + {(get(locale) ?? 'de').startsWith('de') + ? SPACE_TYPE_LABELS.de[spaceType] + : SPACE_TYPE_LABELS.en[spaceType]} + {$_('invitations.accept.role_label', { values: { role: invitation.role } })}

+

{$_('invitations.accept.explainer')}

{#if actionError}

{actionError}

{/if}
- +
diff --git a/scripts/i18n-hardcoded-baseline.json b/scripts/i18n-hardcoded-baseline.json index e430c6a7f..7a10295dd 100644 --- a/scripts/i18n-hardcoded-baseline.json +++ b/scripts/i18n-hardcoded-baseline.json @@ -229,7 +229,6 @@ "apps/mana/apps/web/src/routes/(app)/inventory/collections/[id]/+page.svelte": 5, "apps/mana/apps/web/src/routes/(app)/inventory/collections/[id]/edit/+page.svelte": 2, "apps/mana/apps/web/src/routes/(app)/inventory/collections/new/+page.svelte": 1, - "apps/mana/apps/web/src/routes/(app)/inventory/items/[id]/+page.svelte": 7, "apps/mana/apps/web/src/routes/(app)/inventory/locations/+page.svelte": 2, "apps/mana/apps/web/src/routes/(app)/inventory/search/+page.svelte": 1, "apps/mana/apps/web/src/routes/(app)/library/entry/[id]/+page.svelte": 1, @@ -278,7 +277,6 @@ "apps/mana/apps/web/src/routes/(app)/presi/present/[id]/+page.svelte": 2, "apps/mana/apps/web/src/routes/(app)/profile/my-wishes/+page.svelte": 1, "apps/mana/apps/web/src/routes/(app)/questions/[id]/+page.svelte": 3, - "apps/mana/apps/web/src/routes/(app)/questions/+page.svelte": 7, "apps/mana/apps/web/src/routes/(app)/questions/collections/+page.svelte": 1, "apps/mana/apps/web/src/routes/(app)/questions/new/+page.svelte": 6, "apps/mana/apps/web/src/routes/(app)/skilltree/+page.svelte": 4, @@ -300,7 +298,6 @@ "apps/mana/apps/web/src/routes/(app)/wetter/+page.svelte": 2, "apps/mana/apps/web/src/routes/(auth)/reset-password/+page.svelte": 1, "apps/mana/apps/web/src/routes/+error.svelte": 1, - "apps/mana/apps/web/src/routes/accept-invitation/+page.svelte": 7, "apps/mana/apps/web/src/routes/auth/callback/+page.svelte": 3, "apps/mana/apps/web/src/routes/auth/reset-password/+page.svelte": 1, "apps/mana/apps/web/src/routes/community/+layout.svelte": 5, diff --git a/scripts/i18n-missing-baseline.json b/scripts/i18n-missing-baseline.json index b749044b4..218f64be2 100644 --- a/scripts/i18n-missing-baseline.json +++ b/scripts/i18n-missing-baseline.json @@ -52,7 +52,9 @@ "apps/mana/apps/web/src/routes/(app)/citycorners/cities/[slug]/locations/[id]/edit/+page.svelte": 26, "apps/mana/apps/web/src/routes/(app)/citycorners/cities/[slug]/map/+page.svelte": 6, "apps/mana/apps/web/src/routes/(app)/citycorners/favorites/+page.svelte": 6, + "apps/mana/apps/web/src/routes/(app)/inventory/items/[id]/+page.svelte": 1, "apps/mana/apps/web/src/routes/(app)/invoices/[id]/edit/+page.svelte": 1, + "apps/mana/apps/web/src/routes/(app)/questions/+page.svelte": 1, "apps/mana/apps/web/src/routes/(app)/quotes/+page.svelte": 3, "apps/mana/apps/web/src/routes/(app)/quotes/categories/+page.svelte": 2, "apps/mana/apps/web/src/routes/(app)/quotes/category/[category]/+page.svelte": 8,