Skip to content

feat(i18n): add Traditional Chinese (zh-TW) locale#773

Draft
codexkz wants to merge 1 commit into
siteboon:mainfrom
codexkz:feat/i18n-zh-tw
Draft

feat(i18n): add Traditional Chinese (zh-TW) locale#773
codexkz wants to merge 1 commit into
siteboon:mainfrom
codexkz:feat/i18n-zh-tw

Conversation

@codexkz
Copy link
Copy Markdown

@codexkz codexkz commented May 19, 2026

Summary

  • Add Traditional Chinese (zh-TW) locale (all 7 namespaces)
  • Add README.zh-TW.md
  • Update language navigation bar in all existing READMEs

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

    • Updated README files across supported languages to clearly label Simplified Chinese options.
    • Added comprehensive Traditional Chinese (Taiwan) README.
  • New Features

    • Added Traditional Chinese (Taiwan) language support with complete localization for authentication, chat, code editor, settings, sidebar, and core interface components.

Review Change Stack

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 19, 2026

📝 Walkthrough

Walkthrough

This 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.

Changes

Traditional Chinese Locale Addition

Layer / File(s) Summary
i18n Infrastructure Setup
src/i18n/languages.js, src/i18n/config.js
Traditional Chinese language entry is added to the supported languages list with label "Traditional Chinese" and native name "繁體中文", and corresponding translation namespace imports (common, settings, auth, sidebar, chat, codeEditor, tasks) are wired into the i18next resources configuration.
Traditional Chinese Translation Files
src/i18n/locales/zh-TW/auth.json, src/i18n/locales/zh-TW/chat.json, src/i18n/locales/zh-TW/codeEditor.json, src/i18n/locales/zh-TW/common.json, src/i18n/locales/zh-TW/settings.json, src/i18n/locales/zh-TW/sidebar.json
Complete zh-TW translation resources are created for authentication flows (login/register/logout), chat UI, code editor controls, common application strings, settings tabs and subsections, and sidebar navigation with support for pluralized forms and dynamic placeholders.
README Language Label Clarifications
README.md, README.de.md, README.ja.md, README.ko.md, README.ru.md, README.tr.md, README.zh-CN.md
Language selector labels are updated across all README files to change the Simplified Chinese entry from "中文" to "简体中文" for clarity, with Traditional Chinese link added where applicable.
Traditional Chinese README
README.zh-TW.md
Complete Traditional Chinese project overview created with header/branding/badges/language navigation, screenshots for desktop/mobile/CLI, feature list, installation instructions (CloudCLI Cloud and self-hosted options including Docker), comparison table of CloudCLI UI vs Cloud, security/tool enablement guidance, plugin system documentation, multi-part FAQ, community/support links, GPL v3 license information, technology acknowledgements, and closing message.

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

  • siteboon/claudecodeui#303: Both PRs extend the same i18n system by updating src/i18n/config.js and src/i18n/languages.js to register new locale resources with react-i18next setup.
  • siteboon/claudecodeui#677: Both PRs extend i18n infrastructure by updating src/i18n/config.js and src/i18n/languages.js to register a new locale and add corresponding namespace JSON resources.
  • siteboon/claudecodeui#534: Both PRs modify README header language-switcher navigation and introduce a new locale with corresponding documentation, though this PR adds Traditional Chinese while the retrieved PR adds German.

Suggested reviewers

  • blackmammoth
  • viper151

Poem

🐰 A rabbit hops through language lands so wide,
Traditional Chinese now by Simplified's side,
Seven translation files, a README so bright,
i18n wiring perfect—every label right! ✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: adding Traditional Chinese (zh-TW) locale support with clear scope and specificity.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

📥 Commits

Reviewing files that changed from the base of the PR and between 10f721c and ed922dc.

📒 Files selected for processing (16)
  • README.de.md
  • README.ja.md
  • README.ko.md
  • README.md
  • README.ru.md
  • README.tr.md
  • README.zh-CN.md
  • README.zh-TW.md
  • src/i18n/config.js
  • src/i18n/languages.js
  • src/i18n/locales/zh-TW/auth.json
  • src/i18n/locales/zh-TW/chat.json
  • src/i18n/locales/zh-TW/codeEditor.json
  • src/i18n/locales/zh-TW/common.json
  • src/i18n/locales/zh-TW/settings.json
  • src/i18n/locales/zh-TW/sidebar.json

Comment thread README.zh-TW.md
Comment on lines +98 to +100
```
npx @cloudcli-ai/cloudcli@latest sandbox ~/my-project
```
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

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.

Comment thread src/i18n/config.js
Comment on lines +87 to +95
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';

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

🧩 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")
PY

Repository: 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.",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

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.

@blackmammoth blackmammoth marked this pull request as draft May 30, 2026 11:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant