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.po → zh_CN.po in 2021). The zh_Hant → zh_TW rename was simply overlooked.
Files to rename:
ui/zh_Hant.po → ui/zh_TW.po
cldr-langs/zh_Hant.po → cldr-langs/zh_TW.po
- Update both
LINGUAS files accordingly
Confirmed by the project's own gen_cldr_langs.py which already maps zh_TW → zh-Hant for CLDR lookup — the intent was always zh_TW as the gettext code.
When running in
zh_TW.UTF-8environment, Dialect displays Simplified Chinese (zh_CN) instead of Traditional Chinese, because the translation file is namedzh_Hant.poinstead ofzh_TW.po.gettext's locale resolution doesn't know about
zh_Hant— it looks forzh_TW→ not found → falls through tozh_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(renamedzh_Hans.po→zh_CN.poin 2021). Thezh_Hant→zh_TWrename was simply overlooked.Files to rename:
ui/zh_Hant.po→ui/zh_TW.pocldr-langs/zh_Hant.po→cldr-langs/zh_TW.poLINGUASfiles accordinglyConfirmed by the project's own
gen_cldr_langs.pywhich already mapszh_TW→zh-Hantfor CLDR lookup — the intent was alwayszh_TWas the gettext code.