feat(client): adopt the locale seat in theme, sidebar, question, and model

Each package ships its zh/en dictionaries as satisfies-typed pairs (zh is
the key-set source of truth; en is checked complete against it), merges its
namespace into LocaleNamespaceMap, and declares locale: NS at register —
components read the framework-injected typed t seat instead of a
hand-carried inject member. Overlapping verbatim words (retry, submit,
submitting) drop out of package dictionaries in favor of the shared common
vocabulary; the question composer stores validation feedback as dictionary
keys so shown feedback follows a locale switch.
This commit is contained in:
imccyu
2026-07-30 01:04:58 +08:00
parent c317fbc489
commit 2c5114c060
11 changed files with 58 additions and 44 deletions

View File

@@ -12,9 +12,9 @@ export const zh = {
export type SidebarKey = keyof typeof zh
/** English dictionary, checked complete against the zh key set. */
export const en: Record<SidebarKey, string> = {
export const en = {
'session.new': 'New Session',
'session.new.label': 'New session',
'toggle.open': 'Open sidebar',
'toggle.collapse': 'Collapse sidebar',
}
} satisfies Record<SidebarKey, string>