Skip to content

Add Traditional Chinese (zh_tw) language support #5313

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: dev
Choose a base branch
from

Conversation

YC815
Copy link

@YC815 YC815 commented Jun 17, 2025

📝 Describe Your Changes

  • Added zh_tw to the language switcher (LanguageSwitcher.tsx)
  • Integrated Traditional Chinese translation files for chat, common, and settings
  • Registered zh_tw namespace in the i18n initialization (i18n.ts)

🛠️ Fixes Issues


🔍 Self Checklist

  • Added relevant comments, esp in complex areas
  • Updated docs (for bug fixes / features)
  • Created issues for follow-up changes or refactoring needed

💡 Notes
This is a simple addition of Traditional Chinese language support. Since the changes are straightforward and self-contained (mostly JSON content and one-line registration edits), I did not check the items in the checklist above. No complex logic was involved.


Important

Add Traditional Chinese (zh_tw) language support with new translation files and i18n integration.

  • Language Support:
    • Added zh_tw to LANGUAGES in LanguageSwitcher.tsx.
    • Integrated zh_tw translations in i18n.ts for chat, common, and settings.
  • Translation Files:
    • Added zh_tw/chat.json for chat translations.
    • Added zh_tw/common.json for common translations.
    • Added zh_tw/settings.json for settings translations.

This description was created by Ellipsis for e3644f2. You can customize this summary. It will automatically update as commits are pushed.

Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

Caution

Changes requested ❌

Reviewed everything up to e3644f2 in 1 minute and 46 seconds. Click for details.
  • Reviewed 123 lines of code in 5 files
  • Skipped 0 files when reviewing.
  • Skipped posting 1 draft comments. View those below.
  • Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. web-app/src/i18n.ts:42
  • Draft comment:
    It appears that for the 'zh_tw' language, the 'common' key is assigned to 'zhTwChat'. This looks like a copy-paste error. Should it be 'zhTwCommon' instead?
  • Reason this comment was not posted:
    Marked as duplicate.

Workflow ID: wflow_ZbVUEzzQTHUMnv11

You can customize Ellipsis by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.

Copy link
Author

@YC815 YC815 left a comment

Choose a reason for hiding this comment

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

done

@louis-menlo
Copy link
Contributor

Thanks @YC815 for the contribution, we will take a look and merge soon.

@YC815
Copy link
Author

YC815 commented Jun 17, 2025

I saw the pull request "Enhance i18n and add missing i18n for all components #5314." Once that pull request is merged, I can update this one to be compatible.

@louis-menlo
Copy link
Contributor

Hi @YC815 FYI, the Enhance 18n... PR has been merged

Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds Traditional Chinese (zh_tw) language support to the web application's internationalization system. The implementation includes translation files for all namespaces and proper integration into the language switching functionality.

  • Added Traditional Chinese translations for chat, common, and settings namespaces
  • Integrated zh_tw into the i18n configuration and language switcher
  • Followed existing pattern for language support implementation

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
web-app/src/locales/zh_tw/settings.json Added Traditional Chinese translations for settings interface
web-app/src/locales/zh_tw/common.json Added Traditional Chinese translations for common UI elements
web-app/src/locales/zh_tw/chat.json Added Traditional Chinese translations for chat interface
web-app/src/i18n.ts Registered zh_tw namespace imports and configuration
web-app/src/containers/LanguageSwitcher.tsx Added Traditional Chinese option to language selector
Comments suppressed due to low confidence (1)

@@ -12,6 +12,8 @@ const LANGUAGES = [
{ value: 'en', label: 'English' },
{ value: 'id', label: 'Bahasa' },
{ value: 'vn', label: 'Tiếng Việt' },
{ value: 'zh_tw', label: '繁體中文'
Copy link
Preview

Copilot AI Jul 18, 2025

Choose a reason for hiding this comment

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

Missing comma after the object. This inconsistent formatting could cause issues if additional languages are added later.

Suggested change
{ value: 'zh_tw', label: '繁體中文'
{ value: 'zh_tw', label: '繁體中文' },

Copilot uses AI. Check for mistakes.

@@ -34,6 +37,11 @@ i18n.use(initReactI18next).init({
common: vnCommon,
settings: vnSettings,
},
zh_tw:{
Copy link
Preview

Copilot AI Jul 18, 2025

Choose a reason for hiding this comment

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

[nitpick] Missing space after colon. Should be zh_tw: { to maintain consistent formatting with other language entries.

Suggested change
zh_tw:{
zh_tw: {

Copilot uses AI. Check for mistakes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

2 participants