Am 18.10.2016 um 06:29 schrieb Mingcai SHEN:
> I tried both on linux and windows, and they are the same, not text
> inside the tags was extracted into pot file. very strange....
> Problem with virtualenv ?
It should work with virtualenv as well.
Here are the steps you should try:
Create and activate a virtual env, then:
pip install tg.devtools
gearbox quickstart -jnx example
cd example
pip install .
In example/templates/about.jinja,
under {% block contents %} add these lines:
{{ gettext('Hello gettext!') }}
{% trans %}Hello trans!{% endtrans %}
Then run:
python setup.py extract_messages
The output should now contain the line:
"extracting messages from example/templates/about.jinja"
The file example/i18n/example.pot should be created
and should contain these lines taken from about.jinja:
msgid "Hello gettext!"
msgid "Hello trans!"
-- Chris