Hi all, I have written together a suggestion for integrating i10n into the CouchDB source. Pleas take this as a draft. I have no deeper insights into the organization of the build process of CouchDB yet so I expect that some of my suggestions are not working. But I want to get things rollin' ;-)
prerequisites: / install sphinx-intl 1.) add the following to share/doc/src/conf.py locale_dirs = ["../locale/"] gettext_compact = False 2.) create the folder share/doc/locale 3.) create .pot files in share/doc/locale/pot cd share/doc/src sphinx-build -b gettext . ../locale/pot 4.) create language target folders in share/doc/locale sphinx-intl update -p ../locale/pot -l de -l fr Now we have a lot of .po files. These files are needed for translation. As we want to use the pootle service we need to transfer the .po files to https://translate.apache.org/projects/CouchDB/. I am not sure how this has to be done as I don't know the service there. 5.) when the .po files are translated, we put them back into the folder locale and convert them into a binary format .mo sphinx-intl build 6.) the last step is to create the html files. I suggest to have them in a language folder under share/www share/www <- en share/www/de share/www/fr This is where share/doc/build/makefile.am has to be adjusted. It can be done with this (from share/doc/src): sphinx-build -b html -d src/doctrees . ../www/en sphinx-build -b html -D language='de' -d src/doctrees . ../www/de sphinx-build -b html -D language='fr' -d src/doctrees . ../www/fr Now we have made translated html files from one source. You can see a little translation in share/doc/www/de/contributing.html (just to prove that it works ;-) ). 7.) If we added new sources (.rst) to the documentation we create .pot files with sphinx-build -b gettext . ../locale/pot as seen in 1.). Then we have to update the .po files with this command: sphinx-intl update -p ../locale/pot If we add a new language, we invoke: sphinx-intl update -p ../locale/pot -l 'es' I have put the result into the branch l10n at [email protected]: andywenk/couchdb.git I would love to get your feedback, thoughts, ideas and finally somebody who is doing the implementation or helping me to do it so that I can send a PR. Cheers Andy -- Andy Wenk Hamburg - Germany RockIt!
