Closed
Bug 621389
Opened 14 years ago
Closed 14 years ago
SUMO doesn't always choose the correct values from Accept-Language
Categories
(support.mozilla.org :: Knowledge Base Software, task)
support.mozilla.org
Knowledge Base Software
Tracking
(Not tracked)
VERIFIED
FIXED
2.7
People
(Reporter: JasnaPaka, Assigned: jsocol)
References
()
Details
Attachments
(2 files)
I use latest Firefox 4.0 in czech version. When I try to visit SUMO (URL: http://support.mozilla.com/) I'm redirected to the en-US version. Not sure why. My expectation is that I should be redirected to the czech (cs) version (http://support.mozilla.com/cs/).
I'm not sure if it's related but I see familiar problem with articles too. One example. When I try to visit article which doesn't have translation I'm redirected to the en-US version of SUMO. With old SUMO there was no redirect to the en-US version. In other words I saw czech (cs) SUMO (GUI) with english article
Visit:
http://support.mozilla.com/cs/kb/what-are-app-tabs
You are redirected to the page:
http://support.mozilla.com/en-US/kb/what-are-app-tabs
My expectation:
* Stay on the same URL and show english version of the article.
Assignee | ||
Comment 1•14 years ago
|
||
Pavel, would you mind filing a separate bug for the article issue? That's a design decision and unrelated to the wrong-locale issue.
For the issue in this bug, can you attach headers for a request that goes to the wrong place?
Reporter | ||
Comment 2•14 years ago
|
||
HTTP Headers in *.har. You can show it online: http://www.softwareishard.com/har/viewer/
Reporter | ||
Comment 3•14 years ago
|
||
(In reply to comment #1)
> Pavel, would you mind filing a separate bug for the article issue? That's a
> design decision and unrelated to the wrong-locale issue.
Filled Bug 622151.
Assignee | ||
Comment 4•14 years ago
|
||
Comment 5•14 years ago
|
||
A dupe of bug 591828?
Assignee | ||
Comment 6•14 years ago
|
||
Bug 591828 is an AMO bug, not a SUMO bug.
Updated•14 years ago
|
Summary: SUMO doesn't redirect correctly to the localized versions of SUMO → SUMO doesn't redirect correctly to the localized versions of SUMO in localized browsers with accept language="locale,en-us;q=0.7,en;q=0.3"
Assignee | ||
Comment 7•14 years ago
|
||
Scoobidiver: do you have headers or any other information that supports the change to the summary?
Comment 8•14 years ago
|
||
> Scoobidiver: do you have headers or any other information that supports the
> change to the summary?
The previous title was not clear enough. This behaviour is caused by 2 conditions: a localized browser AND more than one content language (local as main and for instance English as secondary).
The accept language header can take different forms:
* "cs,en-us;q=0.7,en;q=0.3"
* "fr-fr,en-us;q=0.7,en;q=0.3"
* "nb,no;q=0.8,nn;q=0.6,en-us;q=0.4,en;q=0.2"
See bug 591828 and bug 582075 (especially comment 4) for more information.
Assignee | ||
Comment 9•14 years ago
|
||
(In reply to comment #8)
> The accept language header can take different forms:
> * "cs,en-us;q=0.7,en;q=0.3"
> * "fr-fr,en-us;q=0.7,en;q=0.3"
> * "nb,no;q=0.8,nn;q=0.6,en-us;q=0.4,en;q=0.2"
Are any of these specifically, reliably causing problems?
We use Django's parse_accept_lang_header method, which, except for some floating-point mistakes, parses all of those headers correctly.
Summary: SUMO doesn't redirect correctly to the localized versions of SUMO in localized browsers with accept language="locale,en-us;q=0.7,en;q=0.3" → SUMO doesn't always choose the correct values from Accept-Language
Comment 10•14 years ago
|
||
> Are any of these specifically, reliably causing problems?
I tried with different headers:
* Accept-Language: fr-FR,en-US;q=0.5
* Accept-Language: fr-fr,fr;q=0.7,en-us;q=0.3
* Accept-Language: fr,fr-fr;q=0.7,en-us;q=0.3
* Accept-Language: fr-fr,fr;q=0.8,en-us;q=0.5,en;q=0.3
I was redirected to en-US SUMO a few minutes ago, now to it SUMO, and never to fr SUMO. Clearing history does not change anything.
Comment 11•14 years ago
|
||
I am using French Windows with French settings (in numbers , is used as separator instead of .).
Assignee | ||
Comment 12•14 years ago
|
||
(In reply to comment #11)
> I am using French Windows with French settings (in numbers , is used as
> separator instead of .).
That should not change the format of the Accept-Language header. The values in comment 10 are the correct format. That you got to 'it' and that it's not 100% consistent tells me this is probably a thread-safety issue.
Assignee | ||
Updated•14 years ago
|
Assignee: nobody → james
Target Milestone: --- → 2.7
Assignee | ||
Comment 13•14 years ago
|
||
We think these patches will fix it:
https://github.com/jsocol/kitsune/compare/b0cb526c%5E...a1c8afee
Please reopen if it doesn't.
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Comment 14•14 years ago
|
||
Verified on support.allizom.org(http and https) with the following first preferred languages: fr, fr-fr, en-US, it, vi, cs.
Comment 15•14 years ago
|
||
Verified using variations of this: curl -sI -H'Accept-Language: nb,no;q=0.8,nn;q=0.6,en-us;q=0.4,en;q=0.2' http://support.allizom.org/ | grep Location
Status: RESOLVED → VERIFIED
You need to log in
before you can comment on or make changes to this bug.
Description
•