[docs] [issue25907] Documentation i18n: Added trans tags in sphinx templates

STINNER Victor report at bugs.python.org
Thu Jan 21 03:20:44 EST 2016

STINNER Victor added the comment:

The patch only changes Doc/tools/templates/indexcontent.html.

(Simplified) example of change on Doc/tools/templates/indexcontent.html:

   "<p>What's new in Python {{ version }}?</p>"


   "<p>{% trans %}What's new in Python {{ version }}?{% endtrans %}</p>"

I'm not a big fan of this option. Where does {% trans %}...{% endtrans %} format come from?

Is there an existing format to translate HTML templates?

I found html_translator_class config option in Sphinx:


Can't you avoid the new tags and use a small HTML parser to extract all strings?

nosy: +ezio.melotti, haypo

Python tracker <report at bugs.python.org>

More information about the docs mailing list