Add i18n support: localized CLI output (zh-CN, zh-TW, ja, ko, fr)
Author: pixelxiaoCreated Sep 16, 2026Updated Sep 17, 2026
Labelsenhancementarea: clistatus: has-pr
Proposal
Add an internationalization (i18n) layer so CLI output (labels, table headers, section titles, summary lines) can be displayed in languages other than English.
Requested locales (initial set)
en(default, unchanged behavior)zh-CN(Simplified Chinese)zh-TW(Traditional Chinese)ja(Japanese)ko(Korean)fr(French)
Proposed design (looking for maintainer feedback before writing code)
- New module
src/i18n/: a hand-rolled, dependency-free locale catalog (one TS file per locale) plus at(key, vars?)lookup with English fallback for missing keys. No new runtime dependencies. - Locale resolution order:
codeburn language <code>config (new subcommand, stored in the existing config.json) →CODEBURN_LANGenv →LANG/LC_ALLenv (e.g.zh_CN.UTF-8) →en. - Scope of this first PR: user-facing strings of the read-only report surfaces —
status,overview,report/today/monthdashboards (table headers like Cost/Tokens/Share, section titles like By tool / Top models / Daily, totals labels). Parser logic, provider code and the menubar JSON contract are untouched. - Tests: fixture-based
tests/i18n.test.tscovering locale resolution, fallback behavior, and that zh-CN output contains no untranslated catalog keys; plus assertingnpm testparity with main. - Numbers, currency symbols and model names stay as data (not translated); currency display remains governed by the existing
currencyconfig.
Non-goals for this PR
- Translating commander
--helptext (follow-up PR if the approach is accepted) - menubar / Electron / GNOME UI strings (follow-up)
Happy to adjust scope or mechanism (e.g. JSON catalogs instead of TS, different env var name) to match maintainer preferences. If this is welcome, I'd implement it against main with full-suite verification per CONTRIBUTING.
Source: getagentseal/codeburn