#24073: Deactivate translations instead of forcing 'en-us' in management
commands
-------------------------------------+-------------------------------------
Reporter: claudep | Owner: claudep
Type: | Status: assigned
Cleanup/optimization |
Component: Core (Management | Version: master
commands) |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by claudep):
* status: new => assigned
* stage: Ready for checkin => Accepted
Comment:
At least I've understood what's happening. As `migrate` is calling another
management command (`loaddata`), that last command is restoring the
default language code at exit, hence canceling the `deactivate_all` call
from the base command. And then of course, the autodetector is fooled by
the translated `verbose_name`.
Semantically, I think that the root cause is `get_language` returning
`settings.LANGUAGE_CODE` when translations are deactivated. I'll see if we
can safely fix that.
--
Ticket URL: <https://code.djangoproject.com/ticket/24073#comment:5>
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 unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/065.0ac69795cf593e747c5f897628db69b3%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.