-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Incorrect language redirection in addons.mozilla.org #4697
Comments
What's happening is we have fallback code that takes an unsupported long code ( For zh-* see #4515 also |
Is there anyway to override this redirection? The fallback of |
In the end There isn't a way to override the redirection, we need to fix the logic. In the meantime you can visit https://addons.mozilla.org/zh-TW/firefox directly. |
This issue has been automatically marked as stale because it has not had recent activity. If you think this bug should stay open, please comment on the issue with further details. Thank you for your contributions. |
The issue is still not fixed. Please re-open this issue. |
Describe the problem and steps to reproduce it:
Website should follow browser's language priority when doing redirection / content detection. The "Accepted-Language" header include priority for the language in it. All redirection or locale detection should respect the priority specified there.
For example, when provided with this "
Accepted-Language
" header:a website should:
zh-HK
" (Traditional Chinese, Hong Kong) and "zh-TW
" (Traditional Chinese, Taiwan) first. If exists, redirect / show the content in that language.en-US
". redirect / show the content in that language.en
". redirect / show the content in that language.What happened?
If you supply a request to addons.mozilla.org/firefox with the said header:
it will redirect you to addons.mozilla.org/zh-CN/firefox.
What did you expect to happen?
That is not an expected response. It is wrong in multiple levels:
zh-HK
" in the site, there is "zh-TW
". From language priority, it should be shown.zh-CN
" is never a part of the language preference. If should not be shown, or it should be shown as a fallback only if both "zh-HK
" and "zh-TW
" are absent.zh-TW
", the fallback to "zh-HK
" should always be "zh-TW
" (both Traditional Chinese).The text was updated successfully, but these errors were encountered: