#24842: Resets settings if before defining DATABASES use ugettext or
ugettext_lazy
-------------------------------------+-------------------------------------
Reporter: Lagovas | Owner: nobody
Type: Bug | Status: closed
Component: | Version: 1.6
Internationalization |
Severity: Normal | Resolution: invalid
Keywords: settings | Triage Stage:
translations ugettext | Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by claudep):
* status: new => closed
* resolution: => invalid
Comment:
You should never call any `django.utils.translation` method inside a
`settings.py` file, as it will most probably lead to circular imports.
Use some noop method like `gettext_noop = lambda s: s` in the settings
file so as the string is extracted in po files, then call ugettext or
ugettext_lazy later in your code when you use that value to translate it.
--
Ticket URL: <https://code.djangoproject.com/ticket/24842#comment:2>
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.90a42d960c83568dcc232da5b3f0afbf%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.