Page 1 of 1

How to really build a translated manual

PostPosted: Sat Oct 10, 2015 7:12 pm
by JosepMa
Hello.

I've been having problems to generate a translated manual. After much trying, I think I've found the proper way to do it.

It is fine to follow the instructions defined here, but the build steps should be the ones I describe below
https://github.com/mixxxdj/manual



1) Start from scratch. From the root of the manual git repository do
make clean

1.5) Note: with the options described here, the locales are not deleted.
To forcibly delete them, remove the locale folder from the source folder, like this:
rm -Rf source/locale

2)Generate the pot files
make gettext

3) update .tx/config file. I place the locale sources into the source dir because else, make html doesn't see them.
sphinx-intl update-txconfig-resources --config source/conf.py --pot-dir build/locale --locale-dir source/locale --transifex-project-name mixxxdj-manual

The file that generates is erroneous. I don't know why.
Concretely, the header of each document should be like:
[mixxxdj-manual.chaptersadvanced_topicspot]
instead of
[mixxxdj-manual.chapters--advanced_topics]

You might also need to delete some entries, if they are not in transifex. Else, a "Exception Found" message appears
Right now, such cases are the todolist and the manual_guidelines

4) Get the language files from internet. Replace language_to_download by the appropiate locale, like de, ja, fr, ca..
tx pull -l language_to_download

5) Generate the .mo files corresponding to the locales.
sphinx-intl --pot-dir build/locale --locale-dir source/locale build

6) Generate the html documentation. Replace language_to_build by the appropiate locale, like de, ja, fr, ca..
make -e SPHINXOPTS="-D language='language_to_build'" html

6.5) If you are executing this from Windows, the last one doesn't work (the make.bat file is not properly made to accept parameters). So, on Windows do this instead:
set SPHINXOPTS="-D language='language_to_build'"
make html

Hope the main instructions can be corrected and help others that would want to translate it too.

Re: How to really build a translated manual

PostPosted: Wed Nov 25, 2015 9:15 pm
by rryan
Thanks JosepMa,

I put some work into the manual documentation -- hopefully things are clearer now:
http://github.com/mixxxdj/manual