// Catalog lookup OUTSIDE React — for a page's `meta({ locale })` locale-aware // / <meta description>. This app is cookie-i18n (no `/<locale>` URL // prefix), so @voltro/web hands `meta` the active locale from the `voltro:locale` // cookie. Inside React, use `<T>` / `useT()` via the framework's auto-wired // <I18nProvider> instead. import en from './en' import de from './de' // Both catalogs share `en`'s keys (defineLocale enforces the mirror), so a // known-key lookup returns `string` — not `string | undefined` — which is what // `PageMeta.title` requires under exactOptionalPropertyTypes. export type Messages = Record<keyof typeof en, string> export const getCatalog = (locale?: string): Messages => (locale === 'de' ? de : en) as Messages