This directory is customized contents from the blender_docs SVN repository.
Note
Currently, this repository is for testing:
- to make the steps how to make i18ned documentation workflow.
Caution
Do not commit files to original BF documentation repogitory from this repo.
(on OS X 10.10 & Python 2.7)
below is a sample for adding 'ja' locale. you can try translation to your own Sphinx project.
- svnroot
~/GitHub/blender_docs
- projectroot
~/GitHub/blender-manual_i18n
- documentroot
~/GitHub/blender-manual_i18n/manual
- pot files
~/GitHub/blender-manual_i18n/build/locale/pot
- po files(ja)
~/GitHub/blender-manual_i18n/build/locale/ja
- html files(en)
~/GitHub/blender-manual_i18n/build/html/en
- html files(ja)
~/GitHub/blender-manual_i18n/build/html/ja
Note
BUILDDIR = build
After installation blender manual steps, IInstall sphinx-intl package for translation
- ::
$ pip install sphinx-intl
Run a svn command to download files from svn repository.
$ cd ~/GitHub/ $ svn checkout https://svn.blender.org/svnroot/bf-manual/trunk/blender_docs
Change locale directory and gettext option in manual/conf.py
locale_dirs = ['../build/locale/'] # path is example but recommended. gettext_compact = False # optional.
Chanege output folder in Make file
all: FORCE # './' (input), './html/en' (output) QUICKY_CHAPTERS=$(QUICKY_CHAPTERS) \ $(SPHINXBUILD) -b html $(SPHINXOPTS) ./manual $(BUILDDIR)/html/en @echo "firefox" $(shell pwd)"$(BUILDDIR)/html/en"
after add 'gettext' target , run make gettext
command.
$ cd ~/GitHub/blender-manual_i18n $ sphinx-build -b gettext ./manual ./build/locale/pot
To sync messages to ja locale, run the command
$ cd ~/GitHub/blender-manual_i18n $ sphinx-intl update -d ./locale/ -p ./build/locale/pot -l ja
You can translate message text (.po file ).
Before
#: ../manual/contents.rst:3 msgid "Blender Manual contents" msgstr ""
After
#: ../manual/contents.rst:3 msgid "Blender Manual contents" msgstr "Blenderマニュアルコンテンツ"
Bulid mo files:
Note
please make sure if current directory is "~/GitHub/blender-manual_i18n" before run these commands.
$ sphinx-intl build -d ./build/locale/
Bulid html files(ja)
$ sphinx-build -D language='ja' -b html ./manual ./build/html/ja
Bulid html files(en)
$ make all
Note
This is temporarily change to access two language page.
/Library/Python/2.7/site-packages/sphinx_rtd_theme/breadcrumbs.html
<li>{{ title }}</li> <li class="wy-breadcrumbs-aside"> <a href="{{ url_root +'../en/contents.html' }}"> [EN]</a> | <a href="{{ url_root +'../ja/contents.html' }}"> [JA]</a> |
Blender-Manual is Blender's official project to provide the user with a clear, concise and up-to-date description of Blender's functioning in the current version.
Complementary projects are the Python API as a reference, StackExcange for question answering and Blender Cloud for training.
There are some left over TODOs from the MediaWiki migration and sections on the process of being reviewed. See also the current open tasks and the section overview
See install.rst for how to build and the Getting Started section for an explanation on the full workflow and other tips.