feat(i18n): add Traditional Chinese (zh-TW) locale#773
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (8)
✅ Files skipped from review due to trivial changes (6)
🚧 Files skipped from review as they are similar to previous changes (2)
📝 WalkthroughWalkthroughAdds Traditional Chinese (zh-TW) i18n support: registers zh-TW in languages and i18n config, adds full zh-TW translation JSON files (auth, chat, codeEditor, common, settings, sidebar), updates README language labels to "简体中文", and adds a complete README.zh-TW. ChangesTraditional Chinese Locale Addition
Sequence Diagram(s)No sequence diagrams are generated for this PR: the changes are primarily localization resource additions and documentation updates without complex multi-component control flow. Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@README.zh-TW.md`:
- Around line 98-100: Add a language identifier to the fenced code block that
contains the command "npx `@cloudcli-ai/cloudcli`@latest sandbox ~/my-project" so
markdownlint MD040 is satisfied; specifically update the opening fence for that
block to include a language (e.g., change ``` to ```bash) for the fenced block
containing that exact command.
In `@src/i18n/config.js`:
- Around line 87-95: The import of zhTWTasks (import zhTWTasks from
'./locales/zh-TW/tasks.json') is failing because the file doesn't exist; either
add the missing locale file or stop referencing it: create
src/i18n/locales/zh-TW/tasks.json with the required translations matching the
structure used by other locale files (so the zhTWTasks import and the zh-TW
registration in the locale object succeed), or remove the zhTWTasks import and
remove its entry from the zh-TW locale registration (the code that builds the
locale object where zhTWTasks is included) and any subsequent usage of
zhTWTasks.
In `@src/i18n/locales/zh-TW/chat.json`:
- Line 99: The zh-TW locale JSON contains untranslated English values (notably
the "auto" key with "A model classifier decides per tool call whether to approve
or deny. Hands-off, but safer than Bypass — denials still happen." and other
keys like "Thinking", "Processing", "Stop Generation" in the later block);
replace these English strings with accurate Traditional Chinese translations,
preserving the exact JSON keys, punctuation and escape sequences, ensure the
file remains valid UTF-8 JSON, and run the i18n/JSON linter/tests to validate no
keys or formatting changed.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: d278bff1-08c3-44e6-b1aa-55c4e15a5cff
📒 Files selected for processing (16)
README.de.mdREADME.ja.mdREADME.ko.mdREADME.mdREADME.ru.mdREADME.tr.mdREADME.zh-CN.mdREADME.zh-TW.mdsrc/i18n/config.jssrc/i18n/languages.jssrc/i18n/locales/zh-TW/auth.jsonsrc/i18n/locales/zh-TW/chat.jsonsrc/i18n/locales/zh-TW/codeEditor.jsonsrc/i18n/locales/zh-TW/common.jsonsrc/i18n/locales/zh-TW/settings.jsonsrc/i18n/locales/zh-TW/sidebar.json
| import zhTWCommon from './locales/zh-TW/common.json'; | ||
| import zhTWSettings from './locales/zh-TW/settings.json'; | ||
| import zhTWAuth from './locales/zh-TW/auth.json'; | ||
| import zhTWSidebar from './locales/zh-TW/sidebar.json'; | ||
| import zhTWChat from './locales/zh-TW/chat.json'; | ||
| import zhTWCodeEditor from './locales/zh-TW/codeEditor.json'; | ||
| // eslint-disable-next-line import-x/order | ||
| import zhTWTasks from './locales/zh-TW/tasks.json'; | ||
|
|
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Verify the zh-TW tasks locale exists and is valid JSON
set -euo pipefail
fd -i '^tasks\.json$' src/i18n/locales/zh-TW
python - <<'PY'
import json, pathlib
p = pathlib.Path("src/i18n/locales/zh-TW/tasks.json")
print("exists:", p.exists())
if p.exists():
with p.open("r", encoding="utf-8") as f:
json.load(f)
print("json: valid")
PYRepository: siteboon/claudecodeui
Length of output: 79
Missing zh-TW tasks locale file will cause import failure
The file src/i18n/locales/zh-TW/tasks.json does not exist in the repository, but line 94 imports it as zhTWTasks and line 197 registers it in the locale configuration. This will fail at module resolution.
Also applies to: 190-198
The missing import affects the entire locale object initialization for zh-TW.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@src/i18n/config.js` around lines 87 - 95, The import of zhTWTasks (import
zhTWTasks from './locales/zh-TW/tasks.json') is failing because the file doesn't
exist; either add the missing locale file or stop referencing it: create
src/i18n/locales/zh-TW/tasks.json with the required translations matching the
structure used by other locale files (so the zhTWTasks import and the zh-TW
registration in the locale object succeed), or remove the zhTWTasks import and
remove its entry from the zh-TW locale registration (the code that builds the
locale object where zhTWTasks is included) and any subsequent usage of
zhTWTasks.
There was a problem hiding this comment.
Seems like the humans are having a chat. I'll hop back into my burrow for now. If you need me again, just tag @coderabbitai in a new comment, and I'll come hopping out!
| import zhTWCommon from './locales/zh-TW/common.json'; | ||
| import zhTWSettings from './locales/zh-TW/settings.json'; | ||
| import zhTWAuth from './locales/zh-TW/auth.json'; | ||
| import zhTWSidebar from './locales/zh-TW/sidebar.json'; | ||
| import zhTWChat from './locales/zh-TW/chat.json'; | ||
| import zhTWCodeEditor from './locales/zh-TW/codeEditor.json'; | ||
| // eslint-disable-next-line import-x/order | ||
| import zhTWTasks from './locales/zh-TW/tasks.json'; | ||
|
|
Summary
Details
Translated from zh-CN with Taiwan-localized terminology (e.g. 檔案, 專案, 設定, 伺服器, 儲存庫, 工作階段).
Covers: common, auth, chat, settings, sidebar, codeEditor, tasks.
Thanks for building this project — happy to adjust anything if needed!
Summary by CodeRabbit
Documentation
New Features