#24517: makemessages doesn't recognize aliased gettext functions
-------------------------------------+-------------------------------------
Reporter: Mezgrman | Owner: nobody
Type: Bug | Status: new
Component: | Version: 1.7
Internationalization | Keywords: makemessages, i18n,
Severity: Normal | translation, l10n
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
When running `manage.py makemessages`, translation functions like
`ugettext_lazy` are ignored when they are imported with a name other than
their original name or `_`.
This will work as expected:
{{{
from django.utils.translation import ugettext_lazy
my_string = ugettext_lazy("This will be recognized.")
}}}
This will also work:
{{{
from django.utils.translation import ugettext_lazy as _
my_string = _("This will also be recognized.")
}}}
But this will not:
{{{
from django.utils.translation import ugettext_lazy as lazy_
my_string = lazy_("This will not be recognized.")
}}}
This wouldn't be too much of a problem in many cases, but if you need to
use more than one translation function in your code, this WILL be a
problem.
--
Ticket URL: <https://code.djangoproject.com/ticket/24517>
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/051.fc6985df7813a4bd0c13852d3dbf85ac%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.