Files
Reims-Go/frontend/ui-contract.json
T
Dnyo666 ceeec602be feat(i18n,plugin): implement end-to-end i18n & L10n v2 architecture and language pack protocol
- Build single-source-of-truth 7-domain locale catalog (`locales/{zh-CN,en-US}/*.json`, 1,100+ keys) and `cmd/i18ngen` generator emitting Go catalogs and eager/lazy-split TypeScript domain modules (`core`/`vm` eager; `wizard`/`settings`/`plugins` lazy)
- Add zero-dependency ICU MessageFormat subset (`{var}`, `{n, number}`, CLDR `plural`, `select`), 8-hop cycle-free regional fallback (`zh-HK/zh-MO -> zh-Hant -> zh-TW -> zh-CN`), `auto` OS display-language preference, and `en-XA` pseudo-localization across Go and TypeScript
- Introduce `CodedError` supportability with `[E_CODE]` badges, collapsible `[detail]` diagnostics, and automatic SMC OSK / SMBIOS serial / MAC / token redaction
- Add Host × Guest macOS dual-terminology annotation (`FormatGuestTerm`) across 6 official Apple guest UI locales and localize Win32 system tray, file pickers, and DPI-adaptive `installguide` overlays with CJK font fallback probing
- Upgrade L1–L4 plugin localization to dual-track v2: Track A full language packs (`files`, WOFF2 `fonts`, cross-plugin `pluginOverrides`), Track B plugin-scoped `l10n` bundles (`HasUIMessages` isolation), live `plugin/localeChanged` notifications, `< 2ms` static CLI pack loading, and `reims-go plugin locale init|check` translator toolchain with `zh-TW` and `ja-JP` reference packs
- Harden security, WCAG 2.1 AA token contrast, `< 768px` responsive drawer & form layouts, and RTL logical properties; add backend security/locale regression tests and frontend `node --test` static/runtime guard suite in CI

# Conflicts:
#	frontend/src/i18n.ts
#	internal/cli/cli.go
#	internal/i18n/i18n.go
2026-11-30 14:56:19 +08:00

134 lines
2.4 KiB
JSON

{
"uiApi": "1.0.0",
"tokens": [
"--font-sans",
"--font-cjk",
"--font-mono",
"--body-lh",
"--heading-tracking",
"--fs-11",
"--fs-12",
"--fs-13",
"--fs-14",
"--fs-15",
"--fs-16",
"--fs-20",
"--fs-24",
"--fw-regular",
"--fw-medium",
"--fw-strong",
"--sp-1",
"--sp-2",
"--sp-3",
"--sp-4",
"--sp-5",
"--sp-6",
"--sp-8",
"--r-sm",
"--r-md",
"--r-lg",
"--r-xl",
"--surface-0",
"--surface-canvas",
"--surface-sidebar-rail",
"--surface-sidebar",
"--surface-sidebar-border",
"--surface-sidebar-shadow",
"--surface-chrome",
"--surface-statusbar",
"--surface-1",
"--surface-card-elevated",
"--surface-2",
"--surface-input",
"--surface-hover",
"--surface-active",
"--border",
"--border-strong",
"--highlight-top",
"--scrim",
"--shadow-btn",
"--shadow-card",
"--shadow-overlay",
"--blur-chrome",
"--blur-overlay",
"--text",
"--text-2",
"--text-3",
"--text-code",
"--accent",
"--accent-hover",
"--accent-text",
"--accent-soft",
"--accent-soft-text",
"--focus-ring",
"--status-running",
"--status-busy",
"--status-error",
"--status-idle",
"--ok-soft",
"--ok-text",
"--warn-soft",
"--warn-text",
"--danger",
"--danger-soft",
"--danger-border",
"--danger-text",
"--notice-soft",
"--notice-border",
"--seg-thumb",
"--ease-out",
"--ease-in-out",
"--ease-spring",
"--dur-press",
"--dur-fast",
"--dur",
"--dur-modal",
"--dur-toast",
"--titlebar-h",
"--logbar-h",
"--sidebar-w",
"--page-max"
],
"parts": [
"rg-p-shell",
"rg-p-titlebar",
"rg-p-brand",
"rg-p-workspace",
"rg-p-sidebar",
"rg-p-sidebar-head",
"rg-p-nav",
"rg-p-main",
"rg-p-vm-page",
"rg-p-vm-header",
"rg-p-vm-preview",
"rg-p-vm-summary",
"rg-p-statusbar",
"rg-p-logpanel",
"rg-p-settings",
"rg-p-empty"
],
"stateAttrs": [
"data-theme",
"data-motion",
"data-locale",
"data-view",
"data-vm-state",
"data-busy",
"data-has-error",
"data-sidebar-collapsed",
"data-safe-mode"
],
"slots": [
"sidebar.footer",
"statusbar.right",
"vm.toolbar",
"vm.card",
"settings.plugin",
"vm.preview.tl",
"vm.preview.tr",
"vm.preview.bl",
"vm.preview.br",
"empty.state"
]
}