Skip to content

Conversation

@TaichiS
Copy link

@TaichiS TaichiS commented Nov 2, 2025

📝 Summary

This PR adds comprehensive Traditional Chinese (zh-TW) support to ZCF, enabling Taiwan users to use the application in their native language.

✨ Changes

Core i18n System

  • ✅ Updated src/constants.ts to include zh-TW in SUPPORTED_LANGS
  • ✅ Added zh-TW language labels and AI output directives
  • ✅ Fixed TypeScript type compatibility for zh-TW support

Translation Files (17 files, 747 lines)

  • ✅ Created complete zh-TW locale in src/i18n/locales/zh-TW/
  • ✅ All 17 namespace files translated with Taiwan-specific terminology
  • ✅ Character conversion: Simplified Chinese → Traditional Chinese
  • ✅ Localization: Mainland terminology → Taiwan terminology
    • "文件夹" → "資料夾" (folder)
    • "配置" → "設定" (configuration)
    • "软件" → "軟體" (software)
    • "程序" → "程式" (program)
    • "默认" → "預設" (default)

Documentation

  • ✅ Created README_zh-TW.md (44KB) with complete Taiwan Chinese documentation
  • ✅ Updated all README files (en, zh-CN, ja-JP) to include zh-TW language navigation
  • ✅ Updated CLI help text to show zh-TW option in all commands

Testing

  • ✅ Updated i18n integrity tests for zh-TW
  • ✅ Updated constants tests for zh-TW
  • ✅ Added zh-TW language switching tests
  • ✅ All tests pass (122 test files, 2066 tests)

🧪 Testing

  • All existing tests pass (122 files, 2066 tests)
  • New zh-TW translation tests added and passing
  • Build successful with all 51 i18n files copied to dist
  • TypeScript type check passed
  • ESLint check passed
  • Manual testing: npx zcf --lang zh-TW --help

📸 Screenshots (Optional)

You can test the zh-TW interface by running:

npx zcf --lang zh-TW --help

🔧 Technical Details

Files Changed

- 26 files changed
- 1,801 insertions(+)
- 30 deletions(-)

Key Files

- src/constants.ts - Language constants
- src/i18n/locales/zh-TW/* - 17 translation files
- src/cli-setup.ts - CLI help text
- src/utils/prompts.ts - Language selection
- README_zh-TW.md - Taiwan Chinese documentation
- Tests updated for zh-TW support

🎯 Translation Quality

- ✅ Accurate Simplified → Traditional character conversion
- ✅ Taiwan-specific terminology and expressions
- ✅ Technical terms preserved (Claude Code, API, MCP, etc.)
- ✅ Valid JSON syntax with proper escaping
- ✅ All interpolation placeholders intact ({{variable}})

🌏 Impact

This PR adds full Traditional Chinese support, making ZCF accessible to:
- Taiwan users
- Hong Kong users
- Macau users
- Traditional Chinese speakers worldwide

🔗 Related Issues

N/A - New feature addition

💡 Notes for Reviewers

- This is a pure addition with no breaking changes
- All existing functionality remains unchanged
- Language selection is backward compatible
- Build and test infrastructure updated to support zh-TW

---
Motivation: As a Taiwan user, I wanted to contribute Traditional Chinese support to make ZCF more accessible to the Traditional Chinese speaking community.

Thank you for considering this contribution! 🙏

TaichiS and others added 2 commits November 2, 2025 20:42
- Add zh-TW locale with 17 translation files (747 lines)
- Update language constants to include zh-TW
- Add zh-TW language detection and AI output directive
- Create README_zh-TW.md with Taiwan localization
- Update all README files to include zh-TW language links
- Add comprehensive tests for zh-TW translations
- Update CLI help text to show zh-TW option
- Fix TypeScript type for LANG_HINT_KEYS in prompts.ts

BREAKING CHANGE: None (backward compatible)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
@codecov
Copy link

codecov bot commented Nov 3, 2025

Codecov Report

❌ Patch coverage is 16.50485% with 86 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
scripts/resolve-catalog.mjs 0.00% 86 Missing ⚠️

📢 Thoughts on this report? Let us know!

TaichiS and others added 3 commits November 4, 2025 23:18
- Add 4 output-style templates for Claude Code (zh-TW)
  - engineer-professional.md
  - laowang-engineer.md
  - nekomata-engineer.md
  - ojousama-engineer.md

- Add 4 system-prompt templates for Codex (zh-TW)
  - engineer-professional.md
  - laowang-engineer.md
  - nekomata-engineer.md
  - ojousama-engineer.md

- All templates fully translated from zh-CN to zh-TW
- Technical terms and programming principles preserved
- Character personalities and styles maintained
- All CI/CD checks passed locally (lint, typecheck, tests, build)
- Add scripts/resolve-catalog.mjs to convert pnpm catalog references
- Update prepublishOnly to auto-resolve before publishing
- Bump version to 3.3.1-tw.4
- Fixes EUNSUPPORTEDPROTOCOL error when using npx zcf-tw

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
@WitMiao
Copy link
Collaborator

WitMiao commented Nov 5, 2025

感謝提供繁體中文翻譯pr👍,目前正在製作新版的文檔站,完成後會採納這個分支的大部分修改

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.

2 participants