I have a Pyramid project that uses Jinja2. I am trying to use Babel by adding the following to the setup.py
message_extractors = { '.': [
('**.py', 'python', None ),
('static/**', 'ignore', None),
('resources/**', 'ignore', None),
('climmob3/templates/**.html', 'jinja2', None),
('FlatLab/**', 'ignore', None),
]},
And I have a setup.cfg file with
[compile_catalog]
directory = climmob3/locale
domain = climmob3
statistics = true
[extract_messages]
add_comments = TRANSLATORS:
output_file = climmob3/locale/climmob3.pot
width = 80
[init_catalog]
domain = climmob3
input_file = climmob3/locale/climmob3.pot
output_dir = climmob3/locale
[update_catalog]
domain = climmob3
input_file = climmob3/locale/climmob3.pot
output_dir = climmob3/locale
previous = true
However when I run
python setup.py extract_messages
I can see tha it tries to extract the messages from the template files (.html) but it does not recognizes neither _ or {% trans %} so the .pot file is empty
Do I need to do anything extra?