Skip to content

zh_Hant.po should be zh_TW.po — gettext locale mismatch causes zh_CN fallback #469

Description

@a-lang

When running in zh_TW.UTF-8 environment, Dialect displays Simplified Chinese (zh_CN) instead of Traditional Chinese, because the translation file is named zh_Hant.po instead of zh_TW.po.

gettext's locale resolution doesn't know about zh_Hant — it looks for zh_TW → not found → falls through to zh_CN. The translations themselves are 100% complete and correct.

This is the exact same issue that was fixed for Simplified Chinese in dialect-app/po#8 (renamed zh_Hans.pozh_CN.po in 2021). The zh_Hantzh_TW rename was simply overlooked.

Files to rename:

  • ui/zh_Hant.poui/zh_TW.po
  • cldr-langs/zh_Hant.pocldr-langs/zh_TW.po
  • Update both LINGUAS files accordingly

Confirmed by the project's own gen_cldr_langs.py which already maps zh_TWzh-Hant for CLDR lookup — the intent was always zh_TW as the gettext code.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions