Repository navigation
Conversation
Wire up react-i18next + i18next-icu with ICU message syntax, a dotted namespace separator, locale detection with localStorage persistence, and static catalog loading via import.meta.glob. English stays in the source defaults; zh-Hans catalogs live under src/locales/zh-Hans.
Add scripts/i18n-check.mjs as the parity gate (missing inline default, {{...}} misuse and placeholder mismatches are errors; missing translation and orphan keys are warnings), and pin tests to English in src/testing/setup.ts so the existing assertion suite is unchanged.
Replace user-facing literals with t() calls across App.tsx, the shell chrome (AppSidebar, MobileTabBar, CommandPalette, sparkSummary), ThemeSwitch, and the OverviewPage batch (OverviewPage, SparkCard, FleetKpis, FleetAlertStrip, ActivityFeed, FleetTokenTotals, FleetEnergyCard, ModelLauncher). English defaults are byte-identical to the previous literals, so behavior is unchanged when lng is en.
Add/Edit Spark dialogs, Settings, access-token, confirm-shutdown, shutdown-all, open-access chip, TestResultList, plus the shared deviceKind and addSparkSteps helpers. Adds the zh-Hans spark namespace and new common action keys (remove/back/loading/test/testing). Replaces the Add dialog's English-string prefix check with a structured connectIssue() helper so validation works in every locale.
Wire up react-i18next + i18next-icu with ICU message syntax, a dotted namespace separator, locale detection with localStorage persistence, and static catalog loading via import.meta.glob. English stays in the source defaults; zh-Hans catalogs live under src/locales/zh-Hans.
Add scripts/i18n-check.mjs as the parity gate (missing inline default, {{...}} misuse and placeholder mismatches are errors; missing translation and orphan keys are warnings), and pin tests to English in src/testing/setup.ts so the existing assertion suite is unchanged.
…t, Settings and Activity alerts
Preserve the existing localization history while resolving upstream conflicts, hardening asynchronous locale selection, and validating the initial partial Chinese UI. Constraint: Browser-local language preference; server protocols and benchmark prompts stay unchanged relative to upstream. Confidence: high Scope-risk: moderate Not-tested: Linux server-suite terminal acceptance and live GPU integration.
Cover all application pages, benchmark metadata, shared menus and charts. Preserve original server fields with optional browser-rendered descriptors. Intent: Complete browser-local English and Simplified Chinese interface coverage without changing benchmark inputs or execution behavior. Constraint: Keep localization history, add no dependencies, do not publish an upstream PR. Confidence: Frontend 544 tests, strict catalog and AST audits, typecheck and production build passed; Linux release validation follows. Scope-risk: Server JSON metadata is additive; unknown diagnostics retain original detail.
Preserve the full Chinese interface while integrating remote Linux and Windows storage telemetry improvements. Keep both Unreleased changelog entries. Constraint: Preserve the deployed 1091dfb revision and original localization history Confidence: high Scope-risk: narrow
|
Thank you for the very thorough work and the validation detail. It is not mergeable in this pass for two reasons: it adds new dependencies ( (Review notes prepared with Claude Code on behalf of the maintainer.) |
Translate the newly added parallel-model confirmation while retaining upstream launcher behavior and both changelog entries. Constraint: Keep the production panel unchanged Scope-risk: narrow
Address PR MiaAI-Lab#194 review with non-backtracking literal matching, raw persistence, explicit batch response boundaries, portable browser checks and architecture documentation. Pin the existing localization graph and declare the formatter peer while maintainer acceptance remains pending. Constraint: Preserve original English fields, diagnostics and benchmark/model content; no production deployment Scope-risk: moderate
|
Thank you for the review. I have pushed the maintenance changes through The concrete defects are addressed:
Fresh Node 22.23.2 verification: Windows and Linux frontend 548/548 each, native Linux server 761/761, both typechecks and production builds, strict keys (3,054, zero errors / warnings), AST coverage, checker tests (6/6) and browser configuration tests (10/10) passed. Windows Edge fixture acceptance passed 43 checks. Linux Chromium 154 fixture acceptance also passed 43 checks, including a post-run assertion that the temporary profile was removed. Cold Linux runs exposed two first-import 5-second timeouts, including a two-file run at bounded concurrency. Test setup now prepares dependency / lazy catalog compilation before assertions; beacon cases still reset modules after each case sets its token, and catalog cases still use the real loader. Default test and hook deadlines are unchanged. A fresh directory without optimizer caches passed the affected files (12/12), followed by the complete suite (548/548 with The dependency proposal and split sequence are ready: foundation first (agreed dependency graph, loader, preference, Settings selector, shell), then page / catalog batches, and a separately reviewable server-descriptor change. The current integration history is preserved without force pushing. Before opening the smaller foundation PR, which dependency direction would you prefer: retain the currently tested pinned graph, select an older compatible graph, or use a smaller dependency approach? The split implementation will follow that decision; this Draft is not being requested for merge as one change. |
|
Maintainer note on direction: #200 is a second, competing zh-CN approach, so we want to decide the i18n approach once before reviewing either: which loader and dependencies (this adds new ones, which is a maintainer decision), how the catalogs are split, and how new strings stay translated. After that we would review one small foundation PR first, then catalogs. Thank you for the split plan; it is the right shape, we just have not chosen the dependency direction yet. (Review notes prepared with Claude Code on behalf of the maintainer.) |
|
Status check at a232338: it still adds new dependencies ( (Review notes prepared with Claude Code on behalf of the maintainer.) |
|
Maintainer decision on the i18n direction (applies to #194 and #200): one loader, (Review notes prepared with Claude Code on behalf of the maintainer.) |
|
Status at a232338 (draft integration reference): unchanged, and it now conflicts with main in 24 files, including (Review notes prepared with Claude Code on behalf of the maintainer.) |
|
Status at a232338 (draft integration reference): unchanged, and it now conflicts with main in 24 files including (Review notes prepared with Claude Code on behalf of the maintainer.) |
|
Status at a232338 (draft integration reference): unchanged, and it conflicts with main (448944c) in 24+ files. It still depends on (Review notes prepared with Claude Code on behalf of the maintainer.) |
|
Rechecked a232338 against main 00151b5; this integration draft still has 30 merge conflicts and adds four localization dependencies in |
|
This integration draft still adds four localization dependencies ( |
…logs Start a small foundation from official main following the maintainer decision on #194. Use one i18next/react-i18next loader, browser-local language switching, and source-catalog checks in npm test. Constraint: Settings only; no ICU, server recognizer, or changes to #194 Confidence: high Scope-risk: narrow
|
Update: the foundation PR #226 is now on main as 0ae456c, with only |
|
Status at So the route is unchanged and the ball is with you: per-page catalog PRs on top of #226, English as the source of truth, pinned versions at least two weeks old. Please do not spend effort rebasing this branch — that is explicitly not wanted, and nothing here is blocked on it. Your bounded recognizer and shallow response-decoration work still pass their focused tests and remain the reference for anyone implementing the server-side message path later, which is why this stays open rather than being closed. (Review notes prepared with Claude Code on behalf of the maintainer.) |
|
Status at So nothing here is blocked on you, and please continue not to rebase this branch — that is explicitly not wanted and would be wasted effort. The route is per-page catalog PRs on top of #226, English as the source of truth, pinned versions at least two weeks old. This stays open rather than closed because the server-side work in it remains the reference for anyone implementing that path later: the bounded recognizer with its 4,096-code-unit budget and literal-segment matching, and the shallow response decoration with an explicit power-batch boundary, both still pass their focused tests and both fixed real defects. When the per-page catalogs are done and that server path is picked up, this branch is where its design should be taken from. (Review notes prepared with Claude Code on behalf of the maintainer.) |
Add session-age and Harness entry translations to the Settings follow-up, preserving pending values and callbacks. Reuse the stacked row layout for narrow screens and document the merged, pending and untranslated surfaces. Constraint: Keep the Settings work together in MiaAI-Lab#310; leave MiaAI-Lab#194 open and unchanged as a reference. Confidence: high Scope-risk: narrow
Extend the Settings catalogs to cover MQTT fields, validation, and GPU clock feedback. Keep pending edits and result facts intact across language switches. Constraint: Settings-only follow-up to #226; retain #194 as a reference. Confidence: high Scope-risk: narrow (cherry picked from commit 174ef5c)
Add session-age and Harness entry translations to the Settings follow-up, preserving pending values and callbacks. Reuse the stacked row layout for narrow screens and document the merged, pending and untranslated surfaces. Constraint: Keep the Settings work together in #310; leave #194 open and unchanged as a reference. Confidence: high Scope-risk: narrow (cherry picked from commit 6b9b5b3)
|
Status at |
|
Status: the page-sized replacement chain (#315–#325) is under review in stack order, and #314's description explicitly keeps this branch as the untouched integration/translation reference, as agreed. Nothing to change on this PR — it stays open as the reference until the chain lands; at that point the remaining delta here (server-message design, lazy module compilation in (Review notes prepared with Claude Code on behalf of the maintainer.) |
Status: Draft integration reference
This keeps the complete English / 简体中文 feature available for integration testing while addressing the maintainer's review. It is not proposed for merge as one large change. Dependency acceptance and the foundation / per-page review sequence are still awaiting a maintainer decision; the full diff has not yet been split.
Maintenance completed
responseI18n()to the current message object. Only explicit power-batch routes decorate their own rows; arbitrary benchmarkresults, model output and nested payloads are not recursively scanned.I18N_BROWSER_BINARYbefore starting fixtures. Use uniquely owned OS temporary profiles with cleanup. Share the.omx/artifact ignore rule through tracked.gitignore.CODEBASE.md, update localization / server contributor notes, declare the existingintl-messageformatpeer explicitly, pin the four already-tested localization versions, and include third-party notices. This does not upgrade the resolved dependency graph or establish dependency approval.83fd76a74a19c40e8061da3310f1e856f02eddf2, preserving and localizing the new “Run both” model action and its upstream tests.Proposed review sequence and dependency decision
See
docs/i18n-dependencies.md.Currently tested direct build dependencies are
i18next@26.4.2,react-i18next@17.0.16,i18next-icu@2.5.0andintl-messageformat@12.1.3. The maintainer can accept this graph, request an older compatible graph, or choose a smaller dependency approach. Any graph change requires fresh installation and relevant full regression / build / browser checks. Follow-up branches will preserve the original localization history; no force push or batch creation of dependent PRs is needed before agreement.Feature preserved
Settings switches English / 简体中文 immediately and persists the browser-local choice; unsupported browser languages fall back to English. Coverage includes navigation, menus, settings and device dialogs, Overview / Spark, tokens, energy, activity, embedded / standalone Showcase, Decode / Prefill / Quality, Tool Eval, charts, confirmations, errors and share cards. Tool Eval uses stable IDs for 83 options and 15 groups. Each browser renders optional server descriptors independently while original English fields and HTTP behavior remain compatible.
Model output, raw logs, commands, protocol IDs, names, benchmark prompts and scoring retain their original content. Unknown diagnostics remain complete. Coverage boundaries and exact retained strings are documented in
docs/i18n.mdandscripts/i18n-retained-text.json.Validation
Results apply to head
a23233862fbc8055792547e4bbab9bae508057e0on Node 22.23.2:--maxWorkers=4. Cold Linux runs exposed two first-import 5-second timeouts, including a two-file run at bounded concurrency. The test setup now prepares client dependencies / lazy catalog compilation before behavior assertions; beacon cases still reset modules after setting their own token, and catalog tests still call the real loader. Default test and hook deadlines are unchanged. A fresh directory with optimizer caches excluded passed the affected files 12/12, followed by the complete suite 548/548.npm ci --include=dev --ignore-scripts --no-audit --fund=falsepassed with the exact lockfile graph (230 packages). Windows dependency tree confirms the four explicit pinned packages.git diff --checkpassed. Source archive SHA-256:f6b12600afff86c1d8e4b168057ab6e17ed9b169eeb1447e26ded0e39778df19.Reproduce with
npm run i18n:check -- --strict,npm run i18n:coverage,npm run test:i18n-coverage,npm run test:i18n-browser-config,npm run typecheck,npm run test:frontend -- --maxWorkers=4,npm run test:server(native Linux),npm run build, andnpm run test:i18n-browserafter building (browser setup indocs/i18n.md).No production deployment or live device operation was performed in this maintenance pass. Real model-generation / GPU benchmark acceptance is outside this UI validation. Dependency acceptance and smaller follow-up PRs remain pending.