zh-HK detected as zh-CN instead of zh-TW

RESOLVED FIXED

Status

RESOLVED FIXED
2 years ago
2 years ago

People

(Reporter: henry.fai.hang.chan, Unassigned)

Tracking

({good-first-bug})

Production
good-first-bug

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

2 years ago
User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:51.0) Gecko/20100101 Firefox/51.0
Build ID: 20170125094131

Steps to reproduce:

My Accept Language is zh-HK, en-US.


Actual results:

Visting mozilla.org and firefox.com takes me to firefox.com.cn


Expected results:

Visting mozilla.org and firefox.com takes me to www.mozilla.org/zh-TW/ OR www.mozilla.org/en-US/.

The vast majority of Hong Kong people use Traditional Chinese and not Simplified Chinese.  Presentation of Simplified Chinese to a Hong Kong user is considered inconvenient and disrespectful, if not downright offensive.
We already have a fallback mechanism for such cases. The code is here, the change should be easy:

https://github.com/mozilla/bedrock/blob/master/bedrock/settings/base.py#L175-L182

Marking as good-first-bug for new contributors.
Keywords: good-first-bug
(Reporter)

Comment 2

2 years ago
Pushed to https://github.com/mozilla/bedrock/pull/4650. I'm new to contributing code to Mozilla, hope I didn't make any mistake :)

Comment 3

2 years ago
Commit pushed to master at https://github.com/mozilla/bedrock

https://github.com/mozilla/bedrock/commit/f992b38b2302d1a513aab0a9ec0ee7431717e090
Bug 1338072 - Add fallback for zh-HK (#4650)



* Typo

* use CANONICAL_LOCALES instead of FALLBACK_LOCALES

+ adding a bug number as comment
Closing as per Comment 3.
Status: UNCONFIRMED → RESOLVED
Last Resolved: 2 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.