Repository navigation
feat(i18n): 新增 zh/en 国际化支持 + botmux lang 子命令 - #15
Merged
Merged
Conversation
抽出全部用户可见文案到 src/i18n/{zh,en}.ts 字典,覆盖飞书卡片
按钮/状态、命令响应、AI 系统提示(让 Claude/Codex 用对应语言回
复)、setup 向导、daemon 运行时通知等。
新增 ~/.botmux/config.json 作为全局配置文件,存全机器维度的设
置(首字段 lang)。优先级:per-bot bots.json 显式覆盖 > 全局
config.json > 兜底 zh(向后兼容,存量部署升级零影响)。
新增 `botmux lang [zh|en] [--bot N] [--unset]` 子命令:无参显
示 effective + 每个 bot 的覆盖情况;带参写全局 config 或单 bot
覆盖;--unset 清除。写完后提示 botmux restart 生效。
Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Owner
|
非常感谢 @chengcyber 的 PR!review 完了,整体质量很高,可以合入。 验证
架构亮点
两个小瑕疵(不阻塞,可后续补)
第 3 条只是 FYI 不需要 rebase;第 1、2 条留给下一个 PR 收尾。 再次感谢 ❤️ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
src/i18n/{zh,en}.ts字典:飞书卡片按钮 / 状态、命令响应、AI 系统提示(决定 Claude/Codex 回你时用哪种语言)、setup 向导、daemon 运行时通知~/.botmux/config.json全局配置文件(首字段lang,未来可扩展),新增langper-bot 字段botmux lang [zh|en] [--bot N] [--unset]子命令,无需手编 JSONResolution order
langinbots.json—— 显式覆盖(最高)~/.botmux/config.jsonlang—— 全机器默认zh—— 存量部署升级零影响Test plan
npx tsc通过vitest run单元测试 179/179 绿(zh 默认,无回归)lang en生效,AI 系统提示、卡片、/help、/status全英文botmux lang全四路径(global set/unset、per-bot set/unset)烟测Backward compat
存量配置无
lang字段 → 全部继续走中文,行为零变化。升级不需要任何操作。