// Base catalog — the source of truth for this app's UI strings. Every key here // MUST be mirrored in `de.ts`; `defineLocale()` enforces that parity // at build time, so a missing translation fails typecheck rather than silently // falling back. // // Messages use ICU syntax: `{name}` placeholders and rich tags like // `` (rendered by passing a matching function to // ` {c} }} />`). A code snippet that // itself contains `{`/`}` (e.g. `query('notes.list', {})`) is passed as a // ReactNode value (`{queryCall}`) — NOT written into the message — so ICU never // tries to parse its braces. import { defineCatalog } from '@voltro/i18n' export default defineCatalog({ // Tab title + description. `meta.home.title` is a plain lookup with a // `{count}` token substituted in `meta({ loaderData })` (NOT ICU-formatted), // and `{{capProjectName}}` is a scaffold token — both are fine here. 'meta.home.title': '{count} notes — {{capProjectName}}', 'meta.home.description': 'Server-rendered from the api on every request.', // ---- Layout shell (pages/layout.tsx) ---- 'lang.label': 'Language', // ---- Home page (pages/index.tsx) ---- 'home.badge': 'renderMode: ssr · fed by the api', 'home.heading': 'Notes', 'home.lead': 'These rows are in the server-rendered HTML — the loader fetched them from the api with {queryCall} before the page was sent. Then useSubscription takes over for live updates.', 'home.empty': 'No notes yet. Create one against the api (its notes.create mutation), refresh, and it’s in the SSR HTML.', 'home.done': '✓ done', } as const)