How to use lazy_gettext with Pylons and setup.py

Just a quick question. When I use the _ () function provided by the Pylons i18n module, everything works as expected. My problem is with the lazy version of this lazy_gettext function. When I run:

python setup.py extract_messages

I get lines in the POT file that need to be translated using the _ () function, but not the ones wuth lazy_gettext (). How can I make it work?

Thank.

+3
source share
1 answer

In the modules where you use lazy_gettext(), just assign _ = lazy_gettextand use instead _().

+2
source

Source: https://habr.com/ru/post/1736314/


All Articles