I'm using Flask Babel for web translation: When I write my config file like the following, it doesn't find any translations and the error is that jinja2.ext.autoescape and jinja2.ext.with_ are deprecated. babel.cfg
[python: **.py]
[jinja2: **/templates/**.html]
extensions=jinja2.ext.autoescape,jinja2.ext.with_
If I remove the extensions line, it doesn't read the tags with underscore _{{ "some text" }}, only the {{ get_text("some text")}}
[python: **.py]
[jinja2: **/templates/**.html]
How can I configure the underscore tag like _{{ "some text" }}?
Even though the documentation was outdated on the Flask Babel side, it is clearly mentioned in
Jinjadocumentation that you don't need those extensions anymore, here and here.Also you are misusing the shortcut
_forgettext. Instead of_{{ "some text" }}you should be writing{{ _("some text") }}.