Translation toolchain of Sphinx doc
Documentation team would migrate documents to a new web design, including changing the doc format to RST . 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.
Sphinx provides mechanisms facilitating document translations in itself . 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/
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"
make -e SPHINXOPTS="-D language='de'" html