Closed Bug 549013 Opened 14 years ago Closed 14 years ago

[kitsune] Valid Locales List

Categories

(support.mozilla.org :: Knowledge Base Software, task, P1)

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: jsocol, Assigned: jsocol)

Details

I'm not sure if we want to use product-details for this or not. I was under the impression we had more locales than they do. Either way, currently the only locale is 'en', so we need to build the Django list of locales and RTL locales.
Severity: normal → major
Priority: -- → P1
Assignee: laura → nobody
Assignee: nobody → james
It's been a while with no update, so I just wanted to point out that I'm working on this, and making good progress.

The issue I ran into is that the localeurl middleware we were using doesn't support locales with capital letters, like "en-US." I considered filing a bug with them, but since AMO already did this and more, I ended up just creating a simplified version of amo.middleware and amo.urlresolvers that deals with the locale but not the app.

Now I'm mostly in the "cleaning up after the change" part--finding old references that need to point to move. I've got some tests to fix and some to write (eg: all the old search tests assumed the only locale was |en|) before it's ready for review, but it is coming. Maybe I'll push the WIP to github.
So, a bunch of tests are failing now and the /media/ part doesn't work via the Django test server. Those are my big fixes, along with proper tests for the redirecting.

Here's the WIP:
http://github.com/jsocol/kitsune/compare/development...bug-549013
r+ at http://github.com/jsocol/kitsune/commit/a0ba1c340e492be2c51e8c324467d3d00806d491
Tests pass, looks nice. Glad to rid jingo.render() of all request-related variables :)

Some lines in sumo_locales.py are too long for check.py but meh, I didn't notice that the first time around.
http://github.com/jsocol/kitsune/commit/fbc0f6951d4bc618886baf1556ca3f87ac3a2142
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.