Initially the tutorial was written in Japanese then English rendition was added (commits ending at #14) by utilizing sphinx-intl that involves complicated manual process. It's nice to have an updater script that can handle at least 2 following situations:
Prerequisite: sphinx-common is installed. Folder structure of sphinx is already prepared (that is already added in 70a6277)
Assumption: It's ok to run this script on linux, not on Windows
Case-1. Only message catalogs (.po) files are updated.
In the case where only translation was added to .po files and no original source file (.rst) isn't changed,
$ cd %OPENRTM_TUTORIAL%/doc (where `conf.py` exists)
$ sphinx-intl build
$ make -e SPHINXOPTS="-D language='ja'" html (not ideal but making `en` directly ignores the change)
$ make -e SPHINXOPTS="-D language='en'" html
$ cp _build/html/* locale/en (Copy translation `.html` files to manually created folder `locale`)
This isn't clear yet because sometimes the steps above don't generate the updated content so I had to start over the steps mentioned in Case-2.
Case-2. Original source files (.rst) are updated.
In addition to the steps mentioned above, most of the steps in the official doc are needed like:
$ make gettext
$ sphinx-intl update -p _build/locale -l en -l ja
: (same as steps in `Case-1`)
Initially the tutorial was written in Japanese then English rendition was added (commits ending at #14) by utilizing sphinx-intl that involves complicated manual process. It's nice to have an updater script that can handle at least 2 following situations:
Prerequisite:
sphinx-commonis installed. Folder structure ofsphinxis already prepared (that is already added in 70a6277)Assumption: It's ok to run this script on
linux, not onWindowsCase-1. Only
message catalogs(.po) files are updated.In the case where only translation was added to
.pofiles and no original source file (.rst) isn't changed,This isn't clear yet because sometimes the steps above don't generate the updated content so I had to start over the steps mentioned in
Case-2.Case-2. Original source files (
.rst) are updated.In addition to the steps mentioned above, most of the steps in the official doc are needed like: