Repository navigation
feat(i18n): add Settings language foundation with English source catalogs - #226
Conversation
…logs Start a small foundation from official main following the maintainer decision on MiaAI-Lab#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 MiaAI-Lab#194 Confidence: high Scope-risk: narrow
|
Thanks, this follows the direction posted on #194/#200 closely: exact pins for (Review notes prepared with Claude Code on behalf of the maintainer.) |
Move the language contributor notes into README, stop tracking the two ignored documentation paths, restore the shared ignore rules and credit the original author in CHANGELOG. Constraint: Address the three required PR 226 changes; preserve PR 194 Confidence: high Scope-risk: narrow
|
Thank you for the review. Addressed all three required points in
The follow-up changes only documentation/tracking. Runtime code, dependencies and tests are unchanged. Fresh Windows checks passed: frontend 802/802, catalog fixtures 11/11, source-catalog gate, typecheck and build. Fresh native Linux The optional |
|
Re-checked at a72bd34. The three requested changes are in ( (Review notes prepared with Claude Code on behalf of the maintainer.) |
|
Status at a72bd34: the review points are addressed and the change is documentation-only since f4c4c3e, but the PR now conflicts with main in (Review notes prepared with Claude Code on behalf of the maintainer.) |
|
Status at a72bd34: the review points are addressed and the change is documentation-only since f4c4c3e, but it now conflicts with main (448944c) in (Review notes prepared with Claude Code on behalf of the maintainer.) |
|
Thanks for the follow-up. Could you please confirm whether adding the pinned dependencies Once you confirm, we will rebase this PR onto the latest |
|
The foundation remains within the agreed scope but now has three conflicts with main 00151b5. It adds pinned i18next/react-i18next dependencies ( |
|
The foundation remains within the recorded scope but has conflicts in CHANGELOG, package metadata and Settings against current main. It adds i18next/react-i18next dependencies ( |
|
Now on main as 0ae456c (merge of the branch, authorship preserved; CHANGELOG credits @oscarlius). The pinned |
78 upstream commits: MQTT publishing (MiaAI-Lab#248), harness occupancy helpers (MiaAI-Lab#208), GPU clock cap from Settings (MiaAI-Lab#218), settings i18n foundation (MiaAI-Lab#226), configurable GPU temperature limits (MiaAI-Lab#273), Locals/Splash engines, TensorFold cache-counter fixes (MiaAI-Lab#252/MiaAI-Lab#260/MiaAI-Lab#272) and the zsh-safe remote probes (MiaAI-Lab#255/MiaAI-Lab#257). Conflict resolutions: - server/collectors/LlmProbe.js + its TensorFold test: took main's implementation, which supersedes this fork's /health `live` + /metrics work with the cache-counter precedence, running/waiting aliases, histogram validation and prefill holds. This drops the fork's parallel /metrics fetch (micro-optimisation only). - SystemCollector: main's zsh-safe find probes merged into the fork's build/parse refactor, keeping the fork-only RAPL package-power reads; _getRemoteNetwork now uses the injected executor (the merge had left the fork body calling sshExec, which made main's zsh-glob corpus test run real SSH). - OverviewPage: FleetKpis keeps the fork's placement but takes all sparks, so hidden cluster workers count in the KPI tiles (main's fix). - SparkPage: main's column layout (History in the hardware column, storage/network in the right column) over the fork's full-width History panel. - SettingsDialog: fork VulnHunter/REA opt-in toggles kept, metrics-history toggle switched to main's i18n keys. - index.js: fork vulnHunt/rea spark cleanup kept alongside MQTT removeUnit/applySettings. - CHANGELOG/README/package.json: both sides' entries kept; test globs unioned so the fork-only models/autopower/vulnhunt suites still run.
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)
Summary
Settings now switches immediately between English and 简体中文, remembers the browser-local preference and updates HTML language while preserving pending edits. This follows the maintainer's foundation decision: one i18next/react-i18next instance, per-namespace English source/fallback JSON, a missing-source-key gate at the start of
npm test, and one translated page.Scope is Settings and its embedded browser-alert controls. Other pages, navigation, the separate Alerts dialog and raw server diagnostics remain English. Plain interpolation and ordinary plurals are used; there is no ICU plugin, intl-messageformat or server/API change. This branch started from official main
3e6d4ef; #194 remains the unchanged integration reference.Contributor instructions and browser acceptance steps are in README → Interface language.
CODEBASE.mdanddocs/i18n.mdare absent from the PR's final tree, shared.gitignorematches the starting main, and CHANGELOG credits @oscarlius (#226). The net PR is 19 files.Dependencies and checker
i18next@26.4.2(published 2026-09-03) andreact-i18next@17.0.15(2026-09-21), both older than two weeks at initial submission. Primary registry metadata: i18next, react-i18next.@babel/runtime@7.29.7,html-parse-stringify@4.0.1anduse-sync-external-store@1.7.0. A scoped override pins the reviewed Babel runtime; no existing package resolution changes.{ ns },<Trans>coverage and the current transitiverolldown/parseAstdependency remain the optional follow-ups identified in review; the README records these limits.Validation
Current head:
a72bd3462e8b00e5137df42aff71a66abe967b47. The review follow-up changes documentation and Git tracking only;src/,server/,scripts/, package.json and the lockfile are identical tof4c4c3e.Fresh checks on 2026-10-17, Node 22.23.2:
npm test: catalog fixtures 11/11, server 1060/1060 (zero skips) and frontend 100 files / 802 tests passed. Typecheck and production build also passed. Tests ran as a normal user with genuine Python 3.11/zsh in a private mount namespace; host tools were unchanged.git diff --checkpassed. The two ignored document paths and.gitignoreare absent from the net changed-file list.The initial
f4c4c3evalidation also passed clean installs on Windows/Linux and 11 browser fixture checks on each platform (desktop/phone switching, reload persistence, no overflow/exposed keys, preserved pending settings and synthetic save). Browser checks were not repeated for this documentation-only follow-up. The existing production chunk-size warning remains. Earlier container validation exposed a timing race in unchanged LLM log draining; this PR does not repair that service-side issue.Reproduce with supported Node, Python 3.11+, Git and zsh on Linux:
npm ci,npm test,npm run typecheck,npm run build. Windows runs the frontend and catalog gates. No production deployment or live device/model operation was performed. Dependency approval and merging remain with the maintainer.