feat(i18n): add locale dictionaries and pilot surfaces

This commit is contained in:
2026-06-11 04:55:47 +02:00
parent 2c6d6bffcd
commit ac3dfe69cd
15 changed files with 354 additions and 19 deletions
+27
View File
@@ -0,0 +1,27 @@
export const en = {
login: {
title: "Sign In",
usernameLabel: "Username",
passwordLabel: "Password",
submitLabel: "Sign In",
},
dashboardHome: {
heading: "Dashboard",
cards: {
items: {
title: "Total Items",
countLabel: "Total",
},
assets: {
title: "Total Assets",
countLabel: "Total",
},
recipients: {
title: "Total Recipients",
countLabel: "Total",
},
},
},
}
export type Dictionary = typeof en
+27
View File
@@ -0,0 +1,27 @@
import type { Dictionary } from "./en"
export const es = {
login: {
title: "Iniciar sesión",
usernameLabel: "Usuario",
passwordLabel: "Contraseña",
submitLabel: "Iniciar sesión",
},
dashboardHome: {
heading: "Panel de control",
cards: {
items: {
title: "Total de artículos",
countLabel: "Total",
},
assets: {
title: "Total de activos",
countLabel: "Total",
},
recipients: {
title: "Total de destinatarios",
countLabel: "Total",
},
},
},
} satisfies Dictionary
+15
View File
@@ -0,0 +1,15 @@
import type { Locale } from "../locales"
import { type Dictionary, en } from "./en"
import { es } from "./es"
export type { Dictionary }
export const dictionaries = {
en,
es,
} satisfies Record<Locale, Dictionary>
export function getDictionary(locale: Locale): Dictionary {
return dictionaries[locale]
}