Add zh/en i18n and follow DSH locale.bind for UI.

Wire API/delivery/tool strings through lib/i18n.js, and make the sidebar use ctx.locale.bind plus locale/change so English host preference no longer stays frozen on Chinese.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
oliver 2026-09-09 22:10:07 +08:00
parent 51deaf037b
commit b35bfde557
12 changed files with 373 additions and 37 deletions

View file

@ -74,6 +74,15 @@ export {
resolveCreateOrigin,
resolveMirrorSession,
} from './delivery.js'
export {
DEFAULT_LOCALE,
MESSAGES,
TITLE_PREFIX_EN,
apiError,
normalizeLocale,
resolveLocale,
t,
} from './i18n.js'
function loadPkg(id) {
const homes = [