Skip to content

feat(i18n): add zh-TW (Traditional Chinese, Taiwan) locale#57

Merged
AprilNEA merged 1 commit into
AprilNEA:masterfrom
PeterDaveHelloKitchen:add-zh-tw-locale
Jun 2, 2026
Merged

feat(i18n): add zh-TW (Traditional Chinese, Taiwan) locale#57
AprilNEA merged 1 commit into
AprilNEA:masterfrom
PeterDaveHelloKitchen:add-zh-tw-locale

Conversation

@PeterDaveHello
Copy link
Copy Markdown
Contributor

This pull request adds support for Traditional Chinese (Taiwan) as a separate locale (zh-TW), improves locale detection logic for Chinese variants, and updates translation files and documentation accordingly.

The changes ensure users can explicitly select between Simplified Chinese (zh-CN), Traditional Chinese for Hong Kong (zh-HK), and Traditional Chinese for Taiwan (zh-TW), and that the correct translations are loaded based on their system or user-selected locale.

@pullfrog
Copy link
Copy Markdown

pullfrog Bot commented Jun 1, 2026

You've hit your limit · resets 5pm (UTC)

Pullfrog  | Rerun failed job ➔View workflow run | via Pullfrog | Using Claude Opus𝕏

Copy link
Copy Markdown
Owner

@AprilNEA AprilNEA left a comment

Choose a reason for hiding this comment

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

Thanks for adding zh-TW. I think this needs a small follow-up before merging: clippy is currently failing, and there are a couple of i18n edge cases/comments to fix inline.

Comment thread crates/openlogi-gui/src/i18n.rs Outdated
Comment thread crates/openlogi-gui/src/i18n.rs Outdated
Comment thread crates/openlogi-gui/src/i18n.rs
Copy link
Copy Markdown

@pullfrog pullfrog Bot left a comment

Choose a reason for hiding this comment

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

✅ No new issues found.

Reviewed changes — first Pullfrog pass on this PR; the force-pushed commit folds in fixes for all three of AprilNEA's prior threads on i18n.rs.

  • Rewrote match_supported's zh arm as a single-pass script/region scan — clears the Vec-allocation clippy lint and expresses resolution priority explicitly: Hanszh-CN, hk/mo region → zh-HK, tw region or bare Hantzh-TW, fallback → zh-CN.
  • Documented the resolution order on match_supported — including the corner case that zh-Hans-HK stays Simplified (script wins) while zh-Hant-HK resolves to HK (region wins over generic Hant).
  • Corrected the SUPPORTED doc commentzh-TW is not in gpui-component's bundled ui.yml, so it's listed alongside ja / ru as locales where framework widget strings fall back to English.
  • Expanded match_supported tests — added zh-Hans-HK, zh-Hant-TW, zh-TW, zh-Hant, and zh-Hant-HK cases covering all four match arms.
  • Added zh-TW coverage to locale_file_resolves_keys — asserts Settings, Left Click, the interpolated Bind %{name}, and a BLURB fallback check so a missing/typoed zh-TW column would fail in CI.
  • Renamed the picker labels for disambiguationzh-HK繁體中文(香港), zh-TW正體中文(臺灣), using Taiwan's preferred 正體 term.
  • Added zh-TW: translations across locales/app.yml — every previously translated key now has a Taiwan-flavor column.

Pullfrog  | View workflow run | Using Claude Opus𝕏

@PeterDaveHello PeterDaveHello requested a review from AprilNEA June 1, 2026 17:37
@AprilNEA AprilNEA merged commit 131768c into AprilNEA:master Jun 2, 2026
7 checks passed
This was referenced Jun 2, 2026
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