[Qgis-community-team] wheee, sphinx templates translatable...
Richard Duivenvoorde
richard at duif.net
Mon Aug 26 00:40:13 PDT 2013
tl;dr newer versions of Sphinx take the templates into account for
translating.
After a lot of googling and fiddling with Ninja and Sphinx, I finally
found a message somewhere that 'it should just work', so apparently I/we
was/were using an older version of Sphinx.
The good news: if you install sphinx via pip (eg in a virtual
environment) 'sphinx-build -b gettext' just picks up all strings in your
template files which are properly formatted (see
http://jinja.pocoo.org/docs/extensions/#i18n-extension )
eg: {{ gettext('Hello World!') }}
This will then end up in a sphinx.po in our locale dirs, and can be
translated.
There are apparently other problems (Paolo? meta tags), but for me this
is a huge step forward :-)
Regards,
Richard
More information about the Qgis-community-team
mailing list