Files
Dash/apps/frontend/src/i18n/index.ts
T
Tomas DvorakandDevin 88a8210bf8 feat: i18n seam — typed t() + en dictionary
Nav and header wired as proof. Full string extraction deferred until a
second locale exists; CONTRIBUTING records the convention.

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-09-21 19:45:46 +02:00

14 lines
485 B
TypeScript

import { en, type Key } from "@/i18n/en";
export type { Key } from "@/i18n/en";
// i18n seam: dictionaries are plain objects keyed by dotted names. `t` is a
// typed lookup that falls back to the key itself, so a missing translation
// renders the key — loud in dev, never a crash. Locales beyond `en` plug in
// here later (settings key + lazy import); nothing else changes.
const dict: Record<Key, string> = en;
export function t(key: Key): string {
return dict[key] ?? key;
}