The discussion revolves around the issue of Discourse defaulting to Simplified Chinese (zh_CN) when the browser’s accept-language is set to zh-HK. alvinhochun suggests that Traditional Chinese (zh_TW) should be the default for zh-HK, zh-TW, and zh-MO accept-language values.
alvinhochun also points out that the language selection options “中文” and “中文 (TW)” are confusing and should be replaced with “简体中文” for Simplified Chinese and “正體中文” for Traditional Chinese. schleifer agrees and has created a PR to address this issue, using “繁體中文” instead of “正體中文” due to Twitter’s convention.
However, schleifer notes that the issue is more complex due to browser inconsistencies in presenting language options, and that using zh-Hans and zh-Hant might be a better approach. alvinhochun suggests that handling both language-region and language-script-region variants of language tags is necessary, regardless of the naming convention used.
Discourse currently has Traditional Chinese (zh_TW) and Simplified Chinese (zh_CN) localization. However when I have the browser’s accept-language set to zh-HK first, Discourse errorneously selects zh_CN as the default language.
Most users from Taiwan (zh-TW), Hong Kong (zh-HK) and Macau (zh-MO) prefer Traditional Chinese, so for these accept-language values Discourse should select zh_TW as the default language instead. (Technically you can also make use of Unicode CLDR likely subtags information, but for just Chinese it would be a bit overkill.)
I also want to point out that, having “中文” and “中文 (TW)” in the language selection is extremely weird. It really should list “简体中文” for Simplified Chinese and “正體中文” for Traditional Chinese instead.
To address the issue in the title, the “correct” option would be for us to use zh-Hans and zh-Hant, but the browsers are inconsistent with the options they present.
The Taiwanese FOSS l10n community has a preference for “正體” over “繁體”, but I’m not bothered by either.
As long as you only have two variants, the code is mostly cosmetic. Quite often when the name says “Chinese (Traditional)” the underlying code is still zh_TW. Either way you still need to handle both language-region and language-script-region variants of language tags sent by browsers. AFAIK Firefox on Android does send accept-language with zh-Hant-HK, depending on the Android system locale setting.