#17379: Silent translation of all ./manage.py commands to en-us
unexpected/undocumented
-------------------------------------+-------------------------------------
     Reporter:  chrischambers        |                    Owner:  nobody
         Type:  Bug                  |                   Status:  new
    Component:                       |                  Version:  SVN
  Internationalization               |               Resolution:
     Severity:  Normal               |             Triage Stage:  Accepted
     Keywords:  management, shell,   |      Needs documentation:  1
  i18n, l10n, en-us, translation,    |  Patch needs improvement:  1
  documentation                      |                    UI/UX:  0
    Has patch:  1                    |
  Needs tests:  0                    |
Easy pickings:  1                    |
-------------------------------------+-------------------------------------

Comment (by neaf):

 The ticket requested shell to respect locale setting. Since it's an
 interface to your app there's no reason not to do that. You might want to
 see how your locale or other functionality that depends on i18n behaves.

 can_import_settings was supposed to check if settings are available before
 execution of a command according to documentation
 (https://docs.djangoproject.com/en/dev/howto/custom-management-
 commands/#BaseCommand.can_import_settings). It was doing that only by
 coincidence… it was doing that by forcing en_us locale via translation
 module which relies on settings.

 makemessages used that coincidental behavior to avoid forced locale and
 respect language set in your settings file.

 The patch decouples can_import_settings from the locale forcing behavior
 to allow its proper usage as described in documentation.

 makemessages implementation didn't change. The only difference is it now
 uses force_en_us_locale instead of can_import_settings to achieve the same
 thing.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/17379#comment:7>
Django <https://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