Skip to content

Add Traditional Chinese (zh-Hant) UI locale #10592

Description

@MumuTW

Summary

Orca ships five UI locales (en, zh, ko, ja, es), where zh is Simplified Chinese. There is no Traditional Chinese catalog, so zh-TW / zh-HK users get the English UI.

The codebase already accounts for Traditional Chinese

This isn't an oversight — src/shared/ui-locale.ts:22-29 has an explicit carve-out:

if (primary === 'zh') {
  if (tag.startsWith('zh-tw') || tag.startsWith('zh-hk') || tag.startsWith('zh-hant')) {
    return DEFAULT_UI_LOCALE   // -> 'en'
  }
  return 'zh'
}

With Language: System on a zh-TW machine, Orca deliberately resolves to English rather than serving Simplified. That is the right call given the available catalogs — Simplified is not an acceptable substitute for a Traditional reader, and silently serving it would be worse than English.

The naming reinforces that this space was left open: the picker label is already scoped as 中文(简体) rather than a bare 中文 (src/renderer/src/i18n/supported-languages.ts:38, src/renderer/src/i18n/locales/zh.json), so adding 中文(繁體) alongside it needs no renaming of the existing option.

So the groundwork is done. What's missing is the catalog.

Why it's worth adding

Traditional Chinese isn't a spelling variant of Simplified — beyond the script itself, a lot of the technical vocabulary diverges in ways that make a Simplified catalog read as clearly foreign to a zh-TW/zh-HK user (e.g. 软件/軟體, 程序/程式, 界面/介面, 服务器/伺服器, 缓存/快取). Machine-converting zh.json character-by-character would produce Traditional characters with Mainland terminology, which is usually judged worse than leaving it in English.

Taiwan and Hong Kong are a meaningful share of the Chinese-speaking developer population, and right now they're the only group among Orca's covered languages that gets routed to English by design.

Suggested implementation

Adding a locale looks contained. Touch points:

  • src/renderer/src/i18n/locales/zh-TW.json — new catalog
  • src/shared/ui-locale.ts — add to SUPPORTED_UI_LOCALES; change the zh-tw / zh-hk / zh-hant branch to return the new locale instead of DEFAULT_UI_LOCALE
  • src/shared/ui-language.ts — new UI_LANGUAGE_* constant, add to the union and UI_LANGUAGE_VALUES
  • src/renderer/src/i18n/supported-languages.ts — add to UI_LANGUAGE_CHOICES and UI_LANGUAGE_CHOICE_FALLBACKS (中文(繁體))
  • src/renderer/src/i18n/i18n.ts — add to NON_DEFAULT_LOCALE_LOADERS
  • src/main/i18n/main-i18n.ts:24-27 — the main process lazy-loads the same renderer catalogs, so its loader map needs the entry too
  • src/renderer/src/components/settings/appearance-search.ts:34-52 — add 中文(繁體) to the search keywords

The lazy-loading backend means a sixth catalog costs nothing at cold start.

I'm a zh-TW speaker and happy to help review or proofread a Traditional catalog if that's useful — the mechanical conversion is the easy part, the terminology pass is where it needs a native reader.

Environment

  • Orca 1.4.155 (stable), macOS (Darwin 25.5.0), arm64
  • System locale zh-TW, UI resolves to English

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions