chore(app): i18n sync (#15362)
This commit is contained in:
parent
e5ae6c51b0
commit
6ef3af73df
65 changed files with 1096 additions and 71 deletions
|
|
@ -56,8 +56,9 @@ function detectLocale() {
|
|||
|
||||
function UiI18nBridge(props: ParentProps) {
|
||||
const locale = createMemo(() => detectLocale())
|
||||
const zh = uiZh as Partial<Record<string, string>>
|
||||
const t = (key: keyof typeof uiEn, params?: UiI18nParams) => {
|
||||
const value = locale() === "zh" ? (uiZh[key] ?? uiEn[key]) : uiEn[key]
|
||||
const value = locale() === "zh" ? (zh[key] ?? uiEn[key]) : uiEn[key]
|
||||
const text = value ?? String(key)
|
||||
return resolveTemplate(text, params)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue