It is possible to read the HTML version of the documentation for many languages here:
- English: http://documentation.qgis.org/user_guide/html/en
- French: http://documentation.qgis.org/user_guide/html/fr
- German: http://documentation.qgis.org/user_guide/html/de
- Italian: http://documentation.qgis.org/user_guide/html/it
- Japanese: http://documentation.qgis.org/user_guide/html/ja
- Portuguese: http://documentation.qgis.org/user_guide/html/pt
- Russian: http://documentation.qgis.org/user_guide/html/ru
- Spanish: http://documentation.qgis.org/user_guide/html/es
It is available also the subdomain docs.qgis.org, for example for the German language: http://docs.qgis.org/user_guide/html/de/
It is possible to read the HTML English version of the documentation here: http://readthedocs.org/docs/qgis/en/latest/
In the qgis.org site the documentation is scheduled to be built every 30 minutes. In the readthedocs.org site it is built every time something is committed at this repository.
- git clone the project
- create the internationalization directory structure
- compile the message (make compile_messages)
- build the documentation (make html)
- translators edit the files
- administrator update the template files for each master document release
Git clone this project.
Now create a virtualenv, source it and install latest requirements:
virtualenv --no-site-packages qgis-doc-env . qgis-doc-env/bin/activate pip install -r requirements.txt
Project administrators must generate .pot files (and update them every time the master document has been updated). He/she must generate .pot files for each directory containing .rst files. For example:
$ sphinx-build -b gettext -c source source/others/ source/translated/pot $ sphinx-build -b gettext -c source source/introduction/ source/translated/pot $ sphinx-build -b gettext -c source source/plugins/ source/translated/pot/ $ sphinx-build -b gettext -c source source/print_composer/ source/translated/pot/ $ sphinx-build -b gettext -c source source/server/ source/translated/pot/ $ sphinx-build -b gettext -c source source/working/ source/translated/pot/
To add a new language the administrator need to copy the source/translated/pot directory to source/transated/language-code directory, where your-language-code is the ISO language code with 2 digits, and rename the files .pot to .po.
For example, for the Italian version of the User Guide:
mkdir source/translated/it mkdir source/translated/it/LC_MESSAGES cp source/translated/pot/* source/translated/it/ cd source/translated/it/ for f in *.pot; do mv $f `basename $f .pot`.po; done;
This is how it should look the directory tree:
translated/ ├── it │ ├── conventions.po │ ├── foreword.po │ ├── help_and_support.po │ ├── index.po │ ├── introduction.po │ ├── LC_MESSAGES │ ├── plugins.po │ ├── preamble.po │ ├── print_composer.po │ ├── server.po │ └── working.po └── pot ├── conventions.pot ├── foreword.pot ├── help_and_support.pot ├── index.pot ├── introduction.pot ├── plugins.pot ├── preamble.pot ├── print_composer.pot ├── server.pot └── working.pot
You can build the documentation in the following way:
first compile all the messages for getting updated translations in the build:
make compile_messages
You should have the following structure now:
translated/ ├── it │ ├── conventions.po │ ├── foreword.po │ ├── help_and_support.po │ ├── index.po │ ├── introduction.po │ ├── LC_MESSAGES │ │ ├── conventions.mo │ │ ├── foreword.mo │ │ ├── help_and_support.mo │ │ ├── index.mo │ │ ├── introduction.mo │ │ ├── plugins.mo │ │ ├── preamble.mo │ │ ├── print_composer.mo │ │ ├── server.mo │ │ └── working.mo │ ├── plugins.po │ ├── preamble.po │ ├── print_composer.po │ ├── server.po │ └── working.po └── pot ├── conventions.pot ├── foreword.pot ├── help_and_support.pot ├── index.pot ├── introduction.pot ├── plugins.pot ├── preamble.pot ├── print_composer.pot ├── server.pot └── working.pot
then clean the build directory:
make clean
then compile the project to the desired output. For html:
make html
for pdf:
make pdf
Every time a new master document is released, the translators can start translating the .po files of competence.
Translators must edit the .po files using the web application, based on Pootle, or an offline editor, with QtLinguist being the highly recommended choice.
As soon as they finish editing one or more of the .po files, they should commit as soon as possible the edits to the git repository, in order to minimize the possibility of conflicts.
When a new version of the master document is released, the administrator must produce the new version of the template files (.pot). At this point the administrator should also use the msgmerge command, for identifing the differences that each .po files has with the master document.
This is a basic usage of the msgmerge command:
msgmerge source/translated/it/introduction.po \ source/translated/pot/introduction.pot -U