#11118: BaseCommand doesn't restore translation
------------------------------------------------------------+---------------
 Reporter:  rvdrijst                                        |       Owner:  
nobody    
   Status:  new                                             |   Milestone:      
      
Component:  Core framework                                  |     Version:  SVN 
      
 Keywords:  basecommand execute syncdb translation testing  |       Stage:  
Unreviewed
Has_patch:  1                                               |  
------------------------------------------------------------+---------------
 The implementation of !BaseCommand.execute() sets the translation to 'en-
 us' for the duration of the command execution, but doesn't restore the
 original translation. This is not a problem when execution stops when the
 command is done (command line use)

 However in tests, the syncdb command is called programmatically, running
 the tests with the 'en-us' translation activated even when this is not the
 same as settings.LANGUAGE_CODE.

 The attached patch fixes this by restoring the language that was activated
 when the command started.

 Note: this ticket is related to #10078, but whereas that ticket is about
 documentation, this ticket fixes a bug.

-- 
Ticket URL: <http://code.djangoproject.com/ticket/11118>
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 django-updates@googlegroups.com
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to