feat(i18n): add Traditional Chinese (zh-TW) locale#773
Conversation
📝 WalkthroughWalkthroughThis PR introduces comprehensive Traditional Chinese (zh-TW) localization support by updating i18n infrastructure with new language registration, creating full translation resources across seven JSON files, clarifying language labels in existing README files to distinguish Simplified Chinese, and providing a complete Traditional Chinese README with full documentation. 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 cross-component interactions or altered 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
| ``` | ||
| npx @cloudcli-ai/cloudcli@latest sandbox ~/my-project | ||
| ``` |
There was a problem hiding this comment.
Add a language identifier to the fenced code block.
Line 98 opens a fenced block without a language, which triggers markdownlint MD040.
🛠️ Suggested fix
-```
+```bash
npx `@cloudcli-ai/cloudcli`@latest sandbox ~/my-project</details>
<!-- suggestion_start -->
<details>
<summary>📝 Committable suggestion</summary>
> ‼️ **IMPORTANT**
> Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
```suggestion
🧰 Tools
🪛 markdownlint-cli2 (0.22.1)
[warning] 98-98: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
🤖 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 `@README.zh-TW.md` around lines 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.
| 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.
| }, | ||
| "descriptions": { | ||
| "default": "只有受信任的指令(ls、cat、grep、git status 等)自動執行。其他指令將被略過。可以寫入工作區。", | ||
| "auto": "A model classifier decides per tool call whether to approve or deny. Hands-off, but safer than Bypass — denials still happen.", |
There was a problem hiding this comment.
Untranslated English strings remain in zh-TW locale
Line 99 and several entries on Line 226–249 are still English (A model classifier..., Thinking, Processing, Stop Generation, etc.). Please localize these to keep the zh-TW experience consistent.
Also applies to: 226-249
🤖 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/locales/zh-TW/chat.json` at 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.
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