Last Comment Bug 746564 - Replace 'request.locale' with 'request.LANGUAGE_CODE'
: Replace 'request.locale' with 'request.LANGUAGE_CODE'
Status: RESOLVED FIXED
u=dev c=general p=0 s=2013.3 [qa-]
:
Product: support.mozilla.org
Classification: Other
Component: General (show other bugs)
: unspecified
: All All
: -- normal (vote)
: 2013Q1
Assigned To: Michał Frontczak [:fxa90id] ♥
:
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-04-18 07:32 PDT by James Socol [:jsocol, :james]
Modified: 2013-02-07 17:31 PST (History)
4 users (show)
See Also:
QA Whiteboard:
Iteration: ---
Points: ---


Attachments

Description James Socol [:jsocol, :james] 2012-04-18 07:32:02 PDT
The Django docs[1] indicate that the built-in translation middleware (which we don't use) prefers 'request.LANGUAGE_CODE'. For compatibility with 3rd party apps (and to make a waffle upgrade possible) we should switch.

This if probably a big patch, but almost entirely search-and-replace, unless some lines need to be rewrapped.

[1] https://docs.djangoproject.com/en/1.3/topics/i18n/deployment/#how-django-discovers-translations
Comment 1 Will Kahn-Greene [:willkg] 2012-04-18 11:04:45 PDT
To clarify, is this something we should fix sooner rather than later, or is this something we can stick in the code quality pile to be fixed in an upcoming house-keeping week?
Comment 2 Apokalyptica79 2012-09-11 07:22:55 PDT
Hello i would like to try this.

Thanks
Comment 3 Ricky Rosario [:rrosario, :r1cky] 2012-09-11 07:26:35 PDT
Let me know if you have any questions!
Comment 4 Michał Frontczak [:fxa90id] ♥ 2013-02-05 16:48:00 PST
Can I pick it?
Comment 5 Ricky Rosario [:rrosario, :r1cky] 2013-02-05 17:00:24 PST
(In reply to Michał Frontczak :fxa90id from comment #4)
> Can I pick it?

go for it :)
Comment 6 Michał Frontczak [:fxa90id] ♥ 2013-02-05 17:14:56 PST
https://github.com/mozilla/kitsune/pull/1121
Comment 7 Ricky Rosario [:rrosario, :r1cky] 2013-02-07 16:55:12 PST
Landed on master:
https://github.com/mozilla/kitsune/commit/d3db15ec11cbb0ff26a2a179d83713c25229b97a
Comment 8 Ricky Rosario [:rrosario, :r1cky] 2013-02-07 17:31:16 PST
Deployed to prod.
Comment 9 Ricky Rosario [:rrosario, :r1cky] 2013-02-07 17:31:32 PST
Thanks Michał this was awesome!

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