0

I'm following this recipe, with a small test project called i18n

Chameleon I18N

I've set up the message_extractors as follows:

message_extractors = { '.': [
    ( '**.py', 'lingua_python', None ),
    ( '**.pt', 'lingua_xml', None ),
    ]};

When I run the extract_messages code, I don't get any templates processed:

../bin/python setup.py extract_messages -o locale/test.pot
    running extract_messages
    extracting messages from i18n/__init__.py
    extracting messages from i18n/models.py
    extracting messages from i18n/tests.py
    extracting messages from i18n/views.py
    extracting messages from i18n/scripts/__init__.py
    extracting messages from i18n/scripts/initializedb.py
    writing PO template file to locale/test.pot

Why are the template files skipped when they're in the source tree?

Tim Child
  • 2,994
  • 1
  • 26
  • 25

1 Answers1

0

That section of the cookbook is outdated: current versions of lingua no longer use Babel, or any configuration through setup.py/setup.cfg. You can use lingua's pot-create command to extract messages from your code and mpaltes instead. The lingua page on PyPI has a fair amount of documentation and examples for doing that.

Wichert Akkerman
  • 4,918
  • 2
  • 23
  • 30