Last Comment Bug 415085 - Redirect unsupported locales to one that works
: Redirect unsupported locales to one that works
Status: RESOLVED FIXED
:
Product: addons.mozilla.org Graveyard
Classification: Graveyard
Component: Public Pages (show other bugs)
: 3.0
: PowerPC Mac OS X
: -- major
: 3.2
Assigned To: Wil Clouser [:clouserw]
:
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-01-31 08:03 PST by Atsushi Sakai
Modified: 2016-02-04 14:51 PST (History)
9 users (show)
See Also:
QA Whiteboard:
Iteration: ---
Points: ---


Attachments
add unsupported locale redirection (3.55 KB, patch)
2008-01-31 14:48 PST, Wil Clouser [:clouserw]
laura: review+
Details | Diff | Review

Description Atsushi Sakai 2008-01-31 08:03:43 PST
User-Agent:       Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; ja; rv:1.9b3pre) Gecko/2008013104 Minefield/3.0b3pre Firefox/3.0b
Build Identifier: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; ja-JP-mac; rv:1.9b3pre) Gecko/2008013104 Minefield/3.0b3pre

Get Add-ons does not work with ja-JP-mac (Japanese for Mac OS X) locale.

Reproducible: Always

Steps to Reproduce:
1. Use Firefox with ja-JP-mac locale.
2. Open Tools -> Add-ons -> Get Add-ons
3.
Actual Results:  

Get Add-ons does not work.

Expected Results:  
Get Add-ons works.

The cause of this bug is that
https://services.addons.mozilla.org/ja-JP-mac/firefox/api/list/featured/all/10
and
https://services.addons.mozilla.org/ja-JP-mac/firefox/api/search/add-ons
is redirected to invalid URL.
Comment 1 Laura Thomson :laura 2008-01-31 08:14:05 PST
addons.mozilla.org doesn't support the ja-JP-mac locale (hence the API doesn't
either, since it uses the same data).  

addons has this problem with the redirection too: if you go to 
https://addons.mozilla.org/ja-JP-mac/firefox/
you get redirected to
https://addons.mozilla.org/en-US/firefox/ja-JP-mac/firefox/
which 404s. 

I'm trying to work out if we should fall back to en-US - or if there's even a
way to distinguish between a request for an unsupported locale/app for a page
that is valid in en-US and a request for a page that just isn't valid.
Comment 2 Reed Loden [:reed] (use needinfo?) 2008-01-31 08:31:55 PST
Hmm, www.mozilla.com/www.mozilla.org has supported this since very early on. I wonder why AMO never added support for this locale. Making this into a general "support ja-JP-mac" bug.
Comment 3 Michael Morgan [:morgamic] 2008-01-31 08:35:27 PST
This should be solved at a global app level -- Wil can you take a look?
Comment 4 Wil Clouser [:clouserw] 2008-01-31 09:26:22 PST
ja-JP-mac is not the problem here.  It happens with any locale FF supports and AMO doesn't.
Comment 5 Fred Wenzel [:wenzel] 2008-01-31 11:16:24 PST
(In reply to comment #2)
> Hmm, www.mozilla.com/www.mozilla.org has supported this since very early on. I
> wonder why AMO never added support for this locale.

It's because nobody volunteered yet to translate it :)
Comment 6 Reed Loden [:reed] (use needinfo?) 2008-01-31 11:24:14 PST
(In reply to comment #5)
> It's because nobody volunteered yet to translate it :)

No, it's because AMO doesn't special-case it like we do. "ja-JP-mac" is the same thing as "ja", as far as localizing goes.
Comment 7 Fred Wenzel [:wenzel] 2008-01-31 11:26:37 PST
(In reply to comment #6)
> > It's because nobody volunteered yet to translate it :)
> 
> No, it's because AMO doesn't special-case it like we do. "ja-JP-mac" is the
> same thing as "ja", as far as localizing goes.

Ah, thanks for the additional info. Gotta love the special cases *sigh*.
Comment 8 Wil Clouser [:clouserw] 2008-01-31 14:48:07 PST
Created attachment 300745 [details] [diff] [review]
add unsupported locale redirection

This patch adds support for the ja-JP-mac special case and it also makes a best guess effort on locales that AMO doesn't support (like ar).  Unsupported locales are redirected to en-US.
Comment 9 Wil Clouser [:clouserw] 2008-01-31 15:02:49 PST
Comment on attachment 300745 [details] [diff] [review]
add unsupported locale redirection

laura@mozilla and lthomson@mozilla didn't match anything so I'm giving up and going with fligtar. <3
Comment 10 Wil Clouser [:clouserw] 2008-01-31 15:39:15 PST
Thanks, this is fixed in r9893

Note You need to log in before you can comment on or make changes to this bug.