なかなか手順を覚えられないのでメモ。
sphinx-intl コマンドのインストール
pip install sphinx-intl
conf.py への設定追加
conf.py
locale_dirs = ['翻訳用ファイルを配置するディレクトリのパス']
gettext_compact = False
language = '翻訳後の言語'
翻訳用ファイルの生成
# build/locale_dirs 配下に pot ファイルを生成する。
make gettext
# source/locale_dirs 配下に po ファイルを生成する。
sphinx-intl update -p build/locale_dirs -l language
翻訳する
source/locale_dirs/language/LC_MESSAGES
配下の po ファイルへ訳文を入れていく。
ドキュメントをビルドする
sphinx-intl build
make html