Last active
August 29, 2015 14:18
-
-
Save shimizukawa/55ed6b2c5cee88805a43 to your computer and use it in GitHub Desktop.
sphinx i18n doc build procedure
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
################################ | |
# ENV variables | |
set SPHINXINTL_TRANSIFEX_USERNAME=<your-transifex-account-id> | |
set SPHINXINTL_TRANSIFEX_PASSWORD=<your-transifex-account-password> | |
set SPHINXINTL_TRANSIFEX_PROJECT_NAME=sphinx-doc-1_3 | |
set SPHINXINTL_LOCALE_DIR=locale | |
set SPHINXINTL_POT_DIR=_build/gettext | |
set SPHINX_LANG=ja | |
set SPHINXOPTS="-D language=%SPHINX_LANG%" | |
################################ | |
# install | |
git clone https://github.com/sphinx-doc/sphinx.git -b stable # stable is now 1.3.x | |
pip install ./sphinx sphinx-intl transifex-client==0.8 | |
################################ | |
# setup transifex setting files | |
cd sphinx/doc | |
sphinx-intl create-transifexrc # create ~/.transifexrc | |
sphinx-intl create-txconfig # create .tx/config | |
############################################################# | |
# make pot files to initialize tx resource definition | |
make gettext | |
sphinx-intl update-txconfig-resources # initialize resource definitions in .tx/config | |
########################### | |
# make translated document | |
tx pull -l %SPHINX_LANG% # pull po files from transifex | |
make html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
################################ | |
# ENV variables | |
export SPHINXINTL_TRANSIFEX_USERNAME=<your-transifex-account-id> | |
export SPHINXINTL_TRANSIFEX_PASSWORD=<your-transifex-account-password> | |
export SPHINXINTL_TRANSIFEX_PROJECT_NAME=sphinx-doc-1_3 | |
export SPHINXINTL_LOCALE_DIR=locale | |
export SPHINXINTL_POT_DIR=_build/gettext | |
export SPHINX_LANG=ja | |
################################ | |
# install | |
git clone https://github.com/sphinx-doc/sphinx.git -b stable # stable is now 1.3.x | |
pip install ./sphinx sphinx-intl transifex-client | |
################################ | |
# setup transifex setting files | |
cd sphinx/doc | |
sphinx-intl create-transifexrc # create ~/.transifexrc | |
sphinx-intl create-txconfig # create .tx/config | |
############################################################# | |
# make pot files to initialize tx resource definition | |
make gettext | |
sphinx-intl update-txconfig-resources # initialize resource definitions in .tx/config | |
########################### | |
# make translated document | |
tx pull -l $SPHINX_LANG # pull po files from transifex | |
make html SPHINXOPTS="-D language=$SPHINX_LANG" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
################################ | |
# install | |
git clone https://github.com/sphinx-doc/sphinx.git -b stable # stable is now 1.3.x | |
pip install ./sphinx sphinx-intl transifex-client | |
################################ | |
# setup transifex setting files | |
cd sphinx/doc | |
sphinx-intl create-transifexrc --transifex-username=<your-transifex-account-id> --transifex-password=<your-transifex-account-password> # create ~/.transifexrc | |
sphinx-intl create-txconfig --transifex-project-name=sphinx-doc-1_3 # create .tx/config | |
############################################################# | |
# make pot files to initialize tx resource definition | |
make gettext | |
sphinx-intl update-txconfig-resources -p _build/gettext -d locale # initialize resource definitions in .tx/config | |
########################### | |
# make translated document | |
tx pull -l ja # pull po files from transifex | |
make html SPHINXOPTS="-D language=ja" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment