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:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user