I have a python web application with jinja2 templates. I am using pybabel for localization. When using the pybabel extract
command, it exports everything exactly as intended, EXCEPT for any files which use the jinja2 autoescape
tag.
My babel.cfg file has the following line:
extensions=jinja2.ext.autoescape,jinja2.ext.with_
And the extract command I am using is:
pybabel extract -F ./babel.cfg -o ./locale/messages.pot ./
I have a file called settings.html, which has the following tag:
{% autoescape false %}
{% endautoescape %}
And pybabel lists this file in the console, in the list of files it extracts from:
extracting messages from templates/cfg/settings.html
But, when I check my pot file, there are no translations from settings.html.
If I delete the autoescape tag from settings.html, then re-run the pybabel extract
command, then it correctly extracts the translations.
So there must be something up with use of autoescape.
Any clues?