easy contributable internationalization process with sphinx @ pyconmy2015
TRANSCRIPT
![Page 1: Easy contributable internationalization process with Sphinx @ pyconmy2015](https://reader035.vdocuments.pub/reader035/viewer/2022062820/589b53641a28ab4a398b6e3f/html5/thumbnails/1.jpg)
Easy contributable internationalization process with Sphinx
Takayuki Shimizukawa
Sphinx co-maintainer
Sphinx-users.jp
1
![Page 2: Easy contributable internationalization process with Sphinx @ pyconmy2015](https://reader035.vdocuments.pub/reader035/viewer/2022062820/589b53641a28ab4a398b6e3f/html5/thumbnails/2.jpg)
こんにちはKon-Nichi-Wa
2
![Page 3: Easy contributable internationalization process with Sphinx @ pyconmy2015](https://reader035.vdocuments.pub/reader035/viewer/2022062820/589b53641a28ab4a398b6e3f/html5/thumbnails/3.jpg)
Who am I
@shimizukawa
1. Sphinx co-maintainer
2. Sphinx-users.jp
3. PyCon JP committee
BePROUD co, ltd.3
![Page 4: Easy contributable internationalization process with Sphinx @ pyconmy2015](https://reader035.vdocuments.pub/reader035/viewer/2022062820/589b53641a28ab4a398b6e3f/html5/thumbnails/4.jpg)
http://pycon.jp/
4
![Page 5: Easy contributable internationalization process with Sphinx @ pyconmy2015](https://reader035.vdocuments.pub/reader035/viewer/2022062820/589b53641a28ab4a398b6e3f/html5/thumbnails/5.jpg)
Agenda
1. Sphinx introduction & Setup for i18n
2. A easy way and Non easy ways to translate
3. Sphinx i18n feature
4. Automated translation process with several services
5. Tips, tricks, traps 5
![Page 6: Easy contributable internationalization process with Sphinx @ pyconmy2015](https://reader035.vdocuments.pub/reader035/viewer/2022062820/589b53641a28ab4a398b6e3f/html5/thumbnails/6.jpg)
Question
6
![Page 7: Easy contributable internationalization process with Sphinx @ pyconmy2015](https://reader035.vdocuments.pub/reader035/viewer/2022062820/589b53641a28ab4a398b6e3f/html5/thumbnails/7.jpg)
Question1
How many people do you use Open Source
Software?
7
![Page 8: Easy contributable internationalization process with Sphinx @ pyconmy2015](https://reader035.vdocuments.pub/reader035/viewer/2022062820/589b53641a28ab4a398b6e3f/html5/thumbnails/8.jpg)
Question2
How many people may have contributed to the
OSS?
8
![Page 9: Easy contributable internationalization process with Sphinx @ pyconmy2015](https://reader035.vdocuments.pub/reader035/viewer/2022062820/589b53641a28ab4a398b6e3f/html5/thumbnails/9.jpg)
Question3
Does the translation into familiar language
contribute to other developers?
9
![Page 10: Easy contributable internationalization process with Sphinx @ pyconmy2015](https://reader035.vdocuments.pub/reader035/viewer/2022062820/589b53641a28ab4a398b6e3f/html5/thumbnails/10.jpg)
10
Translator
Product Author
Translated Docs
Readers
English Docs
Translators
![Page 11: Easy contributable internationalization process with Sphinx @ pyconmy2015](https://reader035.vdocuments.pub/reader035/viewer/2022062820/589b53641a28ab4a398b6e3f/html5/thumbnails/11.jpg)
Tools & Services
Tools1. sphinx - documentation generator2. docutils - base of sphinx3. sphinx-intl - support utility for sphinx i18n4. transifex-client - file transfer tool for
Transifex
Services5. Transifex - translation support service6. Drone.io - continuous integration service
11
![Page 12: Easy contributable internationalization process with Sphinx @ pyconmy2015](https://reader035.vdocuments.pub/reader035/viewer/2022062820/589b53641a28ab4a398b6e3f/html5/thumbnails/12.jpg)
1. Sphinx introduction& Setup for i18n
12
![Page 13: Easy contributable internationalization process with Sphinx @ pyconmy2015](https://reader035.vdocuments.pub/reader035/viewer/2022062820/589b53641a28ab4a398b6e3f/html5/thumbnails/13.jpg)
What is Sphinx?
Sphinx is a documentation generator
Sphinx generates doc as several output formats from the reST text
markup
13
1. Sphinx introduction & Setup for i18n
Sphinx
reSTreSTreStructuredText
(reST)reST
Parser
HTML Builder
ePub Builder
LaTeX Builder texlive
HTMLtheme
Favorite Editor
![Page 14: Easy contributable internationalization process with Sphinx @ pyconmy2015](https://reader035.vdocuments.pub/reader035/viewer/2022062820/589b53641a28ab4a398b6e3f/html5/thumbnails/14.jpg)
The history of Sphinx (short ver.)
14
1. Sphinx introduction & Setup for i18n
The father of Sphinx
Too hard to maintenance
~2007
Easy to writeEasy to
maintenance2007~
![Page 15: Easy contributable internationalization process with Sphinx @ pyconmy2015](https://reader035.vdocuments.pub/reader035/viewer/2022062820/589b53641a28ab4a398b6e3f/html5/thumbnails/15.jpg)
Sphinx Before and After
Before
There was no standard ways to write documentsSometime, we need converting markups into other
formats
After
Generate multiple output format from single sourceIntegrated html themes make read docs easierAPI references can be integrated into narrative docsAutomated doc building and hosting by ReadTheDocs
15
1. Sphinx introduction & Setup for i18n
![Page 16: Easy contributable internationalization process with Sphinx @ pyconmy2015](https://reader035.vdocuments.pub/reader035/viewer/2022062820/589b53641a28ab4a398b6e3f/html5/thumbnails/16.jpg)
Many docs are written by SphinxFor examples
Python libraries/tools:Python, Sphinx, Flask, Jinja2, Django, Pyramid, SQLAlchemy, Numpy, SciPy, scikit-learn, pandas, fabric, ansible, awscli, …
Non python libraries/tools:Chef, CakePHP(2.x), MathJax, Selenium, Varnish
16
1. Sphinx introduction & Setup for i18n
![Page 17: Easy contributable internationalization process with Sphinx @ pyconmy2015](https://reader035.vdocuments.pub/reader035/viewer/2022062820/589b53641a28ab4a398b6e3f/html5/thumbnails/17.jpg)
Many docs are written by SphinxFor examples
Python libraries/tools:Python, Sphinx, Flask, Jinja2, Django, Pyramid, SQLAlchemy, Numpy, SciPy, scikit-learn, pandas, fabric, ansible, awscli, …
Non python libraries/tools:Chef, CakePHP(2.x), MathJax, Selenium, Varnish
17
1. Sphinx introduction & Setup for i18n
![Page 18: Easy contributable internationalization process with Sphinx @ pyconmy2015](https://reader035.vdocuments.pub/reader035/viewer/2022062820/589b53641a28ab4a398b6e3f/html5/thumbnails/18.jpg)
SPHINXdocutils
HTML Builder HTML theme(Jinja2)
gettext Builder
*.pot
*.po
I18N
*.mo OmegaT
Pootle
Transifex
Translation Tools, Services
Favorite Editor
Sphinx i18n feature (built-in)
18
1. Sphinx introduction & Setup for i18n
reST Parser(directive / role)
doctree(Intermediat
e)
reSTreSTreStructuredText(reST)
![Page 19: Easy contributable internationalization process with Sphinx @ pyconmy2015](https://reader035.vdocuments.pub/reader035/viewer/2022062820/589b53641a28ab4a398b6e3f/html5/thumbnails/19.jpg)
$ pip install sphinx
Support tools for translation
How to install Sphinx with i18n tools
To build a sphinx document
$ pip install sphinx-intl$ pip install transifex-client=0.8
19
1. Sphinx introduction & Setup for i18n
![Page 20: Easy contributable internationalization process with Sphinx @ pyconmy2015](https://reader035.vdocuments.pub/reader035/viewer/2022062820/589b53641a28ab4a398b6e3f/html5/thumbnails/20.jpg)
$ git clone https://github.com/shimizukawa/deepthought.git$ cd deepthought/doc$ make html...Build finished. The HTML pages are in _build/html.
"make html" command generates html files into _build/html.
make html once
20
1. Sphinx introduction & Setup for i18n
![Page 21: Easy contributable internationalization process with Sphinx @ pyconmy2015](https://reader035.vdocuments.pub/reader035/viewer/2022062820/589b53641a28ab4a398b6e3f/html5/thumbnails/21.jpg)
Files & setup conf.py$ tree /path/to/deepthought+- deep_thought| +- __init__.py| +- api.py| +- calc.py| +- utils.py+- doc| +- _build/| | +- html/ | +- _static/| +- _template/| +- conf.py| +- index.py| +- make.bat| +- Makefile+- setup.py
21
1. Sphinx introduction & Setup for i18n
Document source
Document build output
Target library for doc1. ...2. 3. language = 'ma'4. locale_dirs = ['locale']5.
doc/conf.py
![Page 22: Easy contributable internationalization process with Sphinx @ pyconmy2015](https://reader035.vdocuments.pub/reader035/viewer/2022062820/589b53641a28ab4a398b6e3f/html5/thumbnails/22.jpg)
2. Easy contributable internationalization process with Sphinx
22
![Page 23: Easy contributable internationalization process with Sphinx @ pyconmy2015](https://reader035.vdocuments.pub/reader035/viewer/2022062820/589b53641a28ab4a398b6e3f/html5/thumbnails/23.jpg)
What is internationalization?
23
2. Easy contributable internationalization process with Sphinx
I18N
![Page 24: Easy contributable internationalization process with Sphinx @ pyconmy2015](https://reader035.vdocuments.pub/reader035/viewer/2022062820/589b53641a28ab4a398b6e3f/html5/thumbnails/24.jpg)
What is easy contributable?
24
2. Easy contributable internationalization process with Sphinx
![Page 25: Easy contributable internationalization process with Sphinx @ pyconmy2015](https://reader035.vdocuments.pub/reader035/viewer/2022062820/589b53641a28ab4a398b6e3f/html5/thumbnails/25.jpg)
Not a easy way (example 1/3)
The manual are provided only in the HTML files
Rewriting reST files
25
2. Easy contributable internationalization process with Sphinx
![Page 26: Easy contributable internationalization process with Sphinx @ pyconmy2015](https://reader035.vdocuments.pub/reader035/viewer/2022062820/589b53641a28ab4a398b6e3f/html5/thumbnails/26.jpg)
Not a easy way (example 2/3)
The manual are generated fromreST files and
docstrings in the source files
Rewriting reST filesRewriting docstrins in the source files.
26
2. Easy contributable internationalization process with Sphinx
![Page 27: Easy contributable internationalization process with Sphinx @ pyconmy2015](https://reader035.vdocuments.pub/reader035/viewer/2022062820/589b53641a28ab4a398b6e3f/html5/thumbnails/27.jpg)
Not a easy way (example 3/3)
OK, we are engineers. We can use git!
Learn gitLearn GitHubgit clone to get the codeTranslation (Yes! This is what I want to
do!)git commitgit pullSometimes resolve conflictgit push
27
2. Easy contributable internationalization process with Sphinx
![Page 28: Easy contributable internationalization process with Sphinx @ pyconmy2015](https://reader035.vdocuments.pub/reader035/viewer/2022062820/589b53641a28ab4a398b6e3f/html5/thumbnails/28.jpg)
Not easy vs easy
Not a easy way Easy way1. Learn git2. Learn GitHub3. git clone to get the
code4. Translation5. git commit, pull,
push6. Resolve conflict7. Build html your self
1. No git2. No Github3. No file4. Translation5. Update
Automatically6. No conflict7. You can get a HTML
output w/o hand-build.
28
2. Easy contributable internationalization process with Sphinx
![Page 29: Easy contributable internationalization process with Sphinx @ pyconmy2015](https://reader035.vdocuments.pub/reader035/viewer/2022062820/589b53641a28ab4a398b6e3f/html5/thumbnails/29.jpg)
3. Sphinx i18n feature
29
![Page 30: Easy contributable internationalization process with Sphinx @ pyconmy2015](https://reader035.vdocuments.pub/reader035/viewer/2022062820/589b53641a28ab4a398b6e3f/html5/thumbnails/30.jpg)
Two i18n features of SphinxOutput pot files:
from reST
Input po files:to generate translated HTML
30
3. Sphinx i18n feature
reST pot
reST
htmlpo
![Page 31: Easy contributable internationalization process with Sphinx @ pyconmy2015](https://reader035.vdocuments.pub/reader035/viewer/2022062820/589b53641a28ab4a398b6e3f/html5/thumbnails/31.jpg)
Translation flowGenerate pot
Translate pot into po
Generate Translated HTML
31
3. Sphinx i18n feature
reST pot
reST
htmlpo
pot poTranslator
Pleasetranslate
Translate!Thanks for yourContribution!
![Page 32: Easy contributable internationalization process with Sphinx @ pyconmy2015](https://reader035.vdocuments.pub/reader035/viewer/2022062820/589b53641a28ab4a398b6e3f/html5/thumbnails/32.jpg)
#: ../../../deep_thought/utils.py:docstring of deep_thought.utils.dumps:1msgid "Serialize ``obj`` to a JSON formatted :class:`str`."msgstr ""
msgid "For example:"msgstr ""
32
Output pot files 3. Sphinx i18n feature
$ make gettext...Build finished. The message catalogs are in _build/gettext.
$ ls _build/gettextapi.pot examples.pot generated.pot index.pot
generated.pot
reST pot
![Page 33: Easy contributable internationalization process with Sphinx @ pyconmy2015](https://reader035.vdocuments.pub/reader035/viewer/2022062820/589b53641a28ab4a398b6e3f/html5/thumbnails/33.jpg)
Preparing po files to translate
doc+- _build/| +- gettext/| +- api.pot| +- examples.pot| +- generated.pot| +- index.pot+- locale/
doc+- _build/+- locale/ +- zh_cn/ | +- LC_MESSAGES/ | +- api.po | +- examples.po | +- generated.po | +- index.po +- ja/
copy and renamefor each langs
Translate them
Translator
pot po
33
3. Sphinx i18n feature
![Page 34: Easy contributable internationalization process with Sphinx @ pyconmy2015](https://reader035.vdocuments.pub/reader035/viewer/2022062820/589b53641a28ab4a398b6e3f/html5/thumbnails/34.jpg)
34
Preparing po files to translate
$ sphinx-intl update -p _build/gettext -l zh_cnCreate: locale/zh_cn/LC_MESSAGES/api.poCreate: locale/zh_cn/LC_MESSAGES/examples.poCreate: locale/zh_cn/LC_MESSAGES/generated.poCreate: locale/zh_cn/LC_MESSAGES/index.po
At first, sphinx-intl copy pot files and rename them
pot po
sphinx-intl
$ make gettext$ sphinx-intl update -p _build/gettext -l zh_cnNot Changed: locale/zh_cn/LC_MESSAGES/api.poUpdated: locale/zh_cn/LC_MESSAGES/examples.po +3, -1Not Changed: locale/ma/LC_MESSAGES/generated.po
After change the document, sphinx-intl update differences
3. Sphinx i18n feature
![Page 35: Easy contributable internationalization process with Sphinx @ pyconmy2015](https://reader035.vdocuments.pub/reader035/viewer/2022062820/589b53641a28ab4a398b6e3f/html5/thumbnails/35.jpg)
Translate po files
#: ../../../deep_thought/utils.py:docstring of deep_thought.utils.dumps:1msgid "Serialize ``obj`` to a JSON formatted :class:`str`."msgstr ""
generated.po
pot po
sphinx-intl
Translator
#: ../../../deep_thought/utils.py:docstring of deep_thought.utils.dumps:1msgid "Serialize ``obj`` to a JSON formatted :class:`str`."msgstr " 序列 ``obj`` 以 JSON 格式 :class:`str` 。 "
generated.po
Translate by using Vim, Emacs, OmegaT, ...
35
3. Sphinx i18n feature
![Page 36: Easy contributable internationalization process with Sphinx @ pyconmy2015](https://reader035.vdocuments.pub/reader035/viewer/2022062820/589b53641a28ab4a398b6e3f/html5/thumbnails/36.jpg)
Input po files
36
3. Sphinx i18n feature
reST
htmlpo
Translated
$ make html...Build finished. The HTML pages are in _build/html.
![Page 37: Easy contributable internationalization process with Sphinx @ pyconmy2015](https://reader035.vdocuments.pub/reader035/viewer/2022062820/589b53641a28ab4a398b6e3f/html5/thumbnails/37.jpg)
Big picture
37
3. Sphinx i18n feature
reST pot
html
po
make gettext
sphinx-intl
Translator
make html
Doc Author
TranslationCatalog
Translatedcatalog
![Page 38: Easy contributable internationalization process with Sphinx @ pyconmy2015](https://reader035.vdocuments.pub/reader035/viewer/2022062820/589b53641a28ab4a398b6e3f/html5/thumbnails/38.jpg)
4. Automated translation process with several services
38
![Page 39: Easy contributable internationalization process with Sphinx @ pyconmy2015](https://reader035.vdocuments.pub/reader035/viewer/2022062820/589b53641a28ab4a398b6e3f/html5/thumbnails/39.jpg)
Entire process to translate sphinx docs
39
4. Automated translation process with several services
reST pot
html
po
make gettext
sphinx-intl
make html
Doc Author
TranslationCatalog
Translatedcatalog
Translator
Translator
Translator
Autor / Translator
upload
Translator
clone
Translator
![Page 40: Easy contributable internationalization process with Sphinx @ pyconmy2015](https://reader035.vdocuments.pub/reader035/viewer/2022062820/589b53641a28ab4a398b6e3f/html5/thumbnails/40.jpg)
To Be
40
4. Automated translation process with several services
reST pot
html
po
make gettext
sphinx-intl
make html
Doc Author
TranslationCatalog
Translatedcatalog
upload
Translators
To BeAutomated
To BeParallel
clone
![Page 41: Easy contributable internationalization process with Sphinx @ pyconmy2015](https://reader035.vdocuments.pub/reader035/viewer/2022062820/589b53641a28ab4a398b6e3f/html5/thumbnails/41.jpg)
Translation tool typesVim / Emacs (Editors)
Edit local filesTranslation support plugins are available.
OmegaT (Translation Tools)Edit local files.Translation support features.
Transifex (Services)Edit onlineTranslation support
features.
41
4. Automated translation process with several services
po
Translators
To BeParallel
![Page 42: Easy contributable internationalization process with Sphinx @ pyconmy2015](https://reader035.vdocuments.pub/reader035/viewer/2022062820/589b53641a28ab4a398b6e3f/html5/thumbnails/42.jpg)
Be Parallel by using Transifex
Transifex provides...As API:Upload potDownload po
As Web console:GlossaryTranslation memoryRecommendationAuto-translation
42
4. Automated translation process with several services
po
Translators
Parallel
pot
Upload
pot
Auto Update
sphinx-intltransifex-client
po transifex-clientDownload
![Page 43: Easy contributable internationalization process with Sphinx @ pyconmy2015](https://reader035.vdocuments.pub/reader035/viewer/2022062820/589b53641a28ab4a398b6e3f/html5/thumbnails/43.jpg)
Translation on Transifex web console
43
4. Automated translation process with several services
Original Text
Translated Text(you should keep reST syntax)
Suggestions fromTranslation Memory (TM)
Original(pot)
Translation(po)
Copy orig to translationMachine translation
SaveReview (if needed)
Translators
Parallel1
2
4
3
56
![Page 44: Easy contributable internationalization process with Sphinx @ pyconmy2015](https://reader035.vdocuments.pub/reader035/viewer/2022062820/589b53641a28ab4a398b6e3f/html5/thumbnails/44.jpg)
To Be Automated
44
4. Automated translation process with several services
po
Translators
Parallel
pot
Upload
pot
Auto Update
sphinx-intltransifex-client
po transifex-clientDownload
reST
html
make gettext
make html
Doc Author
upload
To BeAutomated
clone
![Page 45: Easy contributable internationalization process with Sphinx @ pyconmy2015](https://reader035.vdocuments.pub/reader035/viewer/2022062820/589b53641a28ab4a398b6e3f/html5/thumbnails/45.jpg)
To Be Automated
45
4. Automated translation process with several services
pot
Upload sphinx-intltransifex-client
po transifex-clientDownload
reST
html
make gettext
make htmlupload
clone1
2 3
456
To BeAutomated
![Page 46: Easy contributable internationalization process with Sphinx @ pyconmy2015](https://reader035.vdocuments.pub/reader035/viewer/2022062820/589b53641a28ab4a398b6e3f/html5/thumbnails/46.jpg)
The procedure for automation
1. clone repository2. make gettext3. Upload pot4. Download po5. make html6. Upload html
46
4. Automated translation process with several services
pot
Upload sphinx-intltransifex-client
po transifex-clientDownload
reST
html
make gettext
make htmlupload
clone1
2 3
456
To BeAutomate
d
![Page 47: Easy contributable internationalization process with Sphinx @ pyconmy2015](https://reader035.vdocuments.pub/reader035/viewer/2022062820/589b53641a28ab4a398b6e3f/html5/thumbnails/47.jpg)
1. pip install sphinx sphinx-intl transifex-client==0.82. git clone https://github.com/shimizukawa/deepthought.git3. cd deepthought/doc4. sphinx-intl create-transifexrc # create ~/.transifexrc5. sphinx-intl create-txconfig # create .tx/config6. make gettext7. sphinx-intl -p _build/gettext update-txconfig-resources
# update .tx/config8. tx push -s # push pot files to
transifex9. tx pull -l zh_cn # pull po files from
transifex10. make html SPHINXOPTS="-D language=ma"
Shell commands for automationrun.sh
$ export SPHINXINTL_TRANSIFEX_USERNAME=mice$ export SPHINXINTL_TRANSIFEX_PASSWORD=42$ export SPHINXINTL_TRANSIFEX_PROJECT_NAME=deepthought-0_7$ export SPHINXINTL_POT_DIR=_build/gettext$ run.sh
47
4. Automated translation process with several services
![Page 48: Easy contributable internationalization process with Sphinx @ pyconmy2015](https://reader035.vdocuments.pub/reader035/viewer/2022062820/589b53641a28ab4a398b6e3f/html5/thumbnails/48.jpg)
The drone.io
48
WebHook
Deploy
Clone repositoryRun shell script
The drone.io is a continuous integration service.
4. Automated translation process with several services
![Page 49: Easy contributable internationalization process with Sphinx @ pyconmy2015](https://reader035.vdocuments.pub/reader035/viewer/2022062820/589b53641a28ab4a398b6e3f/html5/thumbnails/49.jpg)
GitHub + drone.io + S3
49
GitHub
Amazon S3
Transifex 1. Clone repository2. make gettext.3. Upload pot4. Download po5. make html6. Upload html
4. Automated translation process with several services
2
1
3
![Page 50: Easy contributable internationalization process with Sphinx @ pyconmy2015](https://reader035.vdocuments.pub/reader035/viewer/2022062820/589b53641a28ab4a398b6e3f/html5/thumbnails/50.jpg)
Be Automated
50
pot
Upload sphinx-intltransifex-client
po transifex-clientDownload
reST
html
make gettext
make htmlupload
clone1
2 3
456
To BeAutomated
UploadpotDownload
poupload
WebHookclone
1
5
6make html
make gettext2
3
4
1WebHook
Automated
4. Automated translation process with several services
![Page 51: Easy contributable internationalization process with Sphinx @ pyconmy2015](https://reader035.vdocuments.pub/reader035/viewer/2022062820/589b53641a28ab4a398b6e3f/html5/thumbnails/51.jpg)
Automated by drone.io
51
UploadpotDownload
poupload
WebHookclone
1
56
make html
make gettext2
3
4
1WebHook
Automated
4. Automated translation process with several services
![Page 52: Easy contributable internationalization process with Sphinx @ pyconmy2015](https://reader035.vdocuments.pub/reader035/viewer/2022062820/589b53641a28ab4a398b6e3f/html5/thumbnails/52.jpg)
View from doc author
Doc Author doesn't require annoying procedure.
UpdateTranslation Source
Doc Author
Notify
See
Commit
52
4. Automated translation process with several services
![Page 53: Easy contributable internationalization process with Sphinx @ pyconmy2015](https://reader035.vdocuments.pub/reader035/viewer/2022062820/589b53641a28ab4a398b6e3f/html5/thumbnails/53.jpg)
View from doc translatorsNo gitNo fileNo conflictUpdate AutomaticallyThey can get a translated HTML output w/o hand-
build.
Translators
ParallelSee
TranslateTranslated Pages
53
4. Automated translation process with several services
![Page 54: Easy contributable internationalization process with Sphinx @ pyconmy2015](https://reader035.vdocuments.pub/reader035/viewer/2022062820/589b53641a28ab4a398b6e3f/html5/thumbnails/54.jpg)
The entire automated process
54
UpdateTranslation Source
Doc Author
Translators
Parallel
Notify
See
See
Publish
Translate
Commit
DownloadTranslations
Notify
Automated
4. Automated translation process with several services
![Page 55: Easy contributable internationalization process with Sphinx @ pyconmy2015](https://reader035.vdocuments.pub/reader035/viewer/2022062820/589b53641a28ab4a398b6e3f/html5/thumbnails/55.jpg)
Summary
Tools1. sphinx - documentation generator2. docutils - base of sphinx3. sphinx-intl - support utility for sphinx i18n4. transifex-client - file transfer tool for
Transifex
Services5. Transifex - translation support service6. Drone.io - continuous integration service
55
4. Automated translation process with several services
![Page 56: Easy contributable internationalization process with Sphinx @ pyconmy2015](https://reader035.vdocuments.pub/reader035/viewer/2022062820/589b53641a28ab4a398b6e3f/html5/thumbnails/56.jpg)
5. Tips, tricks, traps
56
![Page 57: Easy contributable internationalization process with Sphinx @ pyconmy2015](https://reader035.vdocuments.pub/reader035/viewer/2022062820/589b53641a28ab4a398b6e3f/html5/thumbnails/57.jpg)
TIP: Drone.io limits 15mins for a build
Drone.io limits 15mins for a build.Install from wheel package may help you
57
5. Tips, tricks, traps
1. curl -L -s https://example.com/wheelhouse.tgz | tar vzxf -
2. export PIP_FIND_LINKS=./wheelhouse3. pip install sphinx sphinx-intl transifex-client==0.8run.sh
ex. https://bitbucket.org/sphinxjp/docutils-translation/
![Page 58: Easy contributable internationalization process with Sphinx @ pyconmy2015](https://reader035.vdocuments.pub/reader035/viewer/2022062820/589b53641a28ab4a398b6e3f/html5/thumbnails/58.jpg)
TRAP: Version of transifex-client
transifex-client 0.11b3 is not stable (for me)Especially for Windows users
If you have encountered trouble with using newer version, please try:
58
5. Tips, tricks, traps
$ pip install "transifex-client=0.8"
![Page 59: Easy contributable internationalization process with Sphinx @ pyconmy2015](https://reader035.vdocuments.pub/reader035/viewer/2022062820/589b53641a28ab4a398b6e3f/html5/thumbnails/59.jpg)
Drone.io only list-up repositories which you have admin permission.
Prepare a empty repository to create a drone.io project.
59
TRICK: Preparing Drone.io project5. Tips, tricks, traps
![Page 60: Easy contributable internationalization process with Sphinx @ pyconmy2015](https://reader035.vdocuments.pub/reader035/viewer/2022062820/589b53641a28ab4a398b6e3f/html5/thumbnails/60.jpg)
Examples
Sphinx-1.3 doc for "ja" translationhttps://drone.io/bitbucket.org/shimizukawa/sphinx-doc13/admin
Sphinx-1.4 doc for "ja" translationhttps://drone.io/bitbucket.org/shimizukawa/sphinx-doc14/admin
Docutils doc for "ja" translationhttps://drone.io/bitbucket.org/sphinxjp/docutils-translation/admin
60
5. Tips, tricks, traps
![Page 61: Easy contributable internationalization process with Sphinx @ pyconmy2015](https://reader035.vdocuments.pub/reader035/viewer/2022062820/589b53641a28ab4a398b6e3f/html5/thumbnails/61.jpg)
Questions?@shimizukawa
Grab me after the session :)
61
![Page 62: Easy contributable internationalization process with Sphinx @ pyconmy2015](https://reader035.vdocuments.pub/reader035/viewer/2022062820/589b53641a28ab4a398b6e3f/html5/thumbnails/62.jpg)
Thanks :)
62