#10078: Management commands should honor LANGUAGE_CODE settings
-------------------------------------------+--------------------------------
          Reporter:  gregoire              |         Owner:  nobody
            Status:  new                   |     Milestone:        
         Component:  Internationalization  |       Version:  SVN   
        Resolution:                        |      Keywords:        
             Stage:  Accepted              |     Has_patch:  0     
        Needs_docs:  0                     |   Needs_tests:  0     
Needs_better_patch:  0                     |  
-------------------------------------------+--------------------------------
Changes (by mtredinnick):

  * stage:  Unreviewed => Accepted

Comment:

 It's not necessarily a given that the solution presented here is correct.
 The Django management tools do a lot more behind the scenes that really
 require a system-neutral string language (for which we use en-us) than
 user-visible content. The comment reference in the description is quite
 possibly only the tip of the iceberg gere.

 The alternative solution is that management commands requiring localised
 content should call `translation.activate()` beforehand and restore the
 state with `deactivate()` afterwards.

 System management commands (on any kind of "system") typically have to be
 very careful about running in non-uniform locales, so "respecting
 LANGUAGE_CODE" is reasonably intrusive in that respect.

 All that being said, we do need a recommended course of behaviour here (at
 a minimum, in the documentation). Jonas' solution looks quite neat, for
 example. Bears thinking about.

-- 
Ticket URL: <http://code.djangoproject.com/ticket/10078#comment:4>
Django <http://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to