I18n/Tools/sphinx-doc
Translation toolchain of Sphinx doc
Documentation team would migrate documents to a new web design, including changing the doc format to RST [1]. Translation team need to make sure the translation toolchain would be changed correspondingly. This wiki page would document the investigation result of Sphinx-doc internationalization tools and the corresponding Openstack doc translation toolchain changes.
Slicing script
Sphinx provides mechanisms facilitating document translations in itself [2]. According to its document, below command could be used to generate pot file:
sphinx-build -b gettext doc/playground-user-guide/source/ doc/playground-user-guide/locale/
Merging script
Sphinx has a config option to build translated document, so you don't need to merge the translation strings back. You just need to build your po files into mo files by:
msgfmt "usage.po" -o "locale/es/LC_MESSAGES/usage.mo"
and then:
make -e SPHINXOPTS="-D language='de'" html
[1] http://specs.openstack.org/openstack/docs-specs/specs/kilo/migrate-to-new-web-design.html [2] http://sphinx-doc.org/latest/intl.html