Pipeline 如下
? ?
? ?
? ?
? ?
? ?
? ?
? ?
? ?
安裝 sphinx 必須的 python 軟件包
?
$ pip install sphinx sphinx-patchqueue sphinx-intl
? ?
? ?
編譯 rST 文檔 ,生成 pot 文件
?
$ make gettext
? ?
? ?
? ?
生成 po 文件
? ?
$ sphinx-intl update -p _build/locale/ --locale-dir=_build/locale/ -l zh_CN
? ?
? ?
? ?
? ?
對 po 文件 進行 翻譯
? ?
使用任何翻譯軟件或者 翻譯平臺完成翻譯工作
? ?
? ?
編輯 config.py 文件,為其指明 locale_dirs
? ?
? ?
? ?
? ?
$ make -e SPHINXOPTS="-D language='zh_CN'" html
? ?
? ?
? ?
? ?
翻譯完成的文檔
? ?
? ?
? ?
? ?
? ?
Quick start.
? ?
? ?
? ?
- Export pot files.
? ?
make gettext
? ?
- Generate locale po files
? ?
sphinx-intl update -p _build/locale/ --locale-dir=locale/ -l zh_CN
? ?
? ?
- Register pot files to .tx/config file
? ?
sphinx-intl update-txconfig-resources --pot-dir _build/locale/ --locale-dir=locale/ --transifex-project-name odoo-documentation-technical
? ?
? ?
- Make html
? ?
make -e SPHINXOPTS="-D language='zh_CN' -D locale_dirs=locale/" html
使用sphinx 翻譯odoo文檔
技術