mirror of
https://github.com/Dvorinka/Dash.git
synced 2026-10-28 07:41:27 +00:00
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>
14 lines
485 B
TypeScript
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;
|
|
}
|