feat(i18n): add locale dictionaries and pilot surfaces
This commit is contained in:
@@ -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
|
||||
@@ -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
|
||||
@@ -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]
|
||||
}
|
||||
Reference in New Issue
Block a user