Skip to content

Add Traditional Chinese (Taiwan) localization - #1496

Open
EvenC-tw wants to merge 2 commits into
dbgate:masterfrom
EvenC-tw:add-zh-tw-locale
Open

Add Traditional Chinese (Taiwan) localization#1496
EvenC-tw wants to merge 2 commits into
dbgate:masterfrom
EvenC-tw:add-zh-tw-locale

Conversation

@EvenC-tw

Copy link
Copy Markdown

Summary

Adds a separate Traditional Chinese (Taiwan) localization as zh-TW.

This keeps the existing generic zh localization unchanged, and maps Traditional Chinese browser locales such as zh-TW, zh-Hant, and zh-Hant-TW to the new zh-TW translation.

Changes

  • Added translations/zh-TW.json
  • Added zh-TW to the web translation map
  • Added Traditional Chinese (Taiwan) to the language selector
  • Updated browser language detection so Traditional Chinese locales use zh-TW
  • Added zh-TW.json to the translation CLI language names

Validation

  • yarn translations:check
  • yarn build:web

Notes

The translation was based on translations/en.json as the source text.

Related to #842

Copilot AI review requested due to automatic review settings June 26, 2026 16:55

Copilot AI left a comment

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.

Pull request overview

Adds a new Traditional Chinese (Taiwan) locale (zh-TW) to the web UI, including browser-locale mapping so Traditional Chinese variants resolve to the new translation without changing the existing generic zh locale.

Changes:

  • Added a new translations/zh-TW.json translation bundle.
  • Registered zh-TW in the web translation registry and added locale mapping for Traditional Chinese browser locales.
  • Exposed zh-TW in the language selector and the translations CLI language-name map.

Reviewed changes

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

File Description
translations/zh-TW.json Adds a full Traditional Chinese (Taiwan) translation bundle.
packages/web/src/translations.ts Registers zh-TW and updates browser-locale detection/mapping.
packages/web/src/settings/GeneralSettings.svelte Adds zh-TW as a selectable UI language.
common/translations-cli/translate.js Adds a human-readable name for zh-TW.json for the translation CLI.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread packages/web/src/translations.ts
Comment thread packages/web/src/translations.ts
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