Closed
Bug 1164781
Opened 9 years ago
Closed 9 years ago
Spanish locales are redirected to /en-US instead of /es when page is not localized
Categories
(www.mozilla.org :: Bedrock, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: flod, Assigned: kohei)
References
Details
(Whiteboard: [kb=1748704] )
Attachments
(1 file)
(deleted),
text/x-github-pull-request
|
Details |
https://www.mozilla.org/firefox/os/
This page is not enabled for es-CL, but it's localized and activated in es-ES.
es-CL accept_languages header is set to "es-cl, es, en-us, en". So it should fall back to es, not en-US.
https://www.mozilla.org/es/firefox/os/
Reporter | ||
Comment 1•9 years ago
|
||
Side note: the redirect es -> es-ES is from bug 774675.
Comment 2•9 years ago
|
||
Hmm, I'm not quite sure what's going on here, or why it's behaving differently from other pages. I wonder if this is a side effect from our server-side geo detection/redirection.
https://github.com/mozilla/bedrock/blob/master/bedrock/firefox/views.py#L244
Paul, any ideas here as to what could be causing this one?
Flags: needinfo?(pmac)
Reporter | ||
Comment 3•9 years ago
|
||
(In reply to Alex Gibson [:agibson] from comment #2)
> Hmm, I'm not quite sure what's going on here, or why it's behaving
> differently from other pages. I wonder if this is a side effect from our
> server-side geo detection/redirection.
It shouldn't be related. It's kind of hard to find a page available in es-ES but not es-CL, here's a couple
https://www.mozilla.org/firefox/os/devices/
https://www.mozilla.org/contribute/friends
Both redirect to en-US
Assignee | ||
Comment 4•9 years ago
|
||
Hmm, it's weird, the CANONICAL_LOCALES map I have added is not working?
https://github.com/mozilla/bedrock/blob/master/bedrock/settings/base.py#L132-L142
Comment 5•9 years ago
|
||
(In reply to Francesco Lodolo [:flod] (UTC+2) from comment #3)
> (In reply to Alex Gibson [:agibson] from comment #2)
> > Hmm, I'm not quite sure what's going on here, or why it's behaving
> > differently from other pages. I wonder if this is a side effect from our
> > server-side geo detection/redirection.
>
> It shouldn't be related. It's kind of hard to find a page available in es-ES
> but not es-CL, here's a couple
> https://www.mozilla.org/firefox/os/devices/
> https://www.mozilla.org/contribute/friends
>
> Both redirect to en-US
Ah ok, so not specific to this page. Thanks flod and Kohei!
Assignee | ||
Comment 6•9 years ago
|
||
(In reply to Kohei Yoshino [:kohei] from comment #4)
> Hmm, it's weird, the CANONICAL_LOCALES map I have added is not working?
>
> https://github.com/mozilla/bedrock/blob/master/bedrock/settings/base.py#L132-
> L142
Hmm, es-CL is not a short locale name, it's not related. I guess the problem here is:
https://github.com/mozilla/bedrock/blob/master/lib/l10n_utils/__init__.py#L60-L70
Adding a similar mapping may solve the issue, like
FALLBACK_LOCALES = {'es-CL': 'es-ES', 'es-AR': 'es-ES', 'es-MX': 'es-ES'}
Comment 7•9 years ago
|
||
Clearing my premature needsinfo for pmac, although he may still have an idea that's going on here. Looks like Kohei is already on the path, thanks!
Flags: needinfo?(pmac)
Assignee | ||
Comment 8•9 years ago
|
||
Will hack it later today.
Assignee: nobody → kohei.yoshino
Status: NEW → ASSIGNED
Component: L10N → Bedrock
Whiteboard: [kb=1748704]
Assignee | ||
Comment 9•9 years ago
|
||
Assignee | ||
Updated•9 years ago
|
Comment 10•9 years ago
|
||
Commits pushed to master at https://github.com/mozilla/bedrock
https://github.com/mozilla/bedrock/commit/5f5106391b553bfdad7f1ad6f85015ae2070b76a
Fix Bug 1164781 - Spanish locales are redirected to /en-US instead of /es when page is not localized
https://github.com/mozilla/bedrock/commit/11aefc752afc7a9890e280f3bd69a7448523f4d2
Merge pull request #2989 from kyoshino/bug-1164781-spanish-fallback
Fix Bug 1164781 - Spanish locales are redirected to /en-US instead of /es when page is not localized
Updated•9 years ago
|
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•