Talk:Live GIS Translate

From OSGeo
Jump to: navigation, search

It would be nice to do the translation with Transifex. In contrast to github, Transifex is much easier for non-technical people. Moreover we can get an good overview how much is translated. Other projects also use Transifex for their translations:

How is the translation handled now?

At the moment each language has its own folder with .rst files. The problem is that is difficult to see if the translation is up to date or not. In order to change files, it is necessary to change it on GitHub.

What is a better way to do translations?

One improvement would be to do the translations using .po files. This site explains how it works. The English source files are still stored in .rst files. Every other language consist of .po files. A .po file contains the English source and its translation. These .po can be updated once the English source language is updated. So it is easy to keep updated.

The translation of the .po files can be done manually in a text editor or with some special desktop programs for .po files. This is the point where Transifex comes into play: The process of translating the .po files can be "outsourced" to Transfex. It has a nice user interface and is free for open source projects (commercial projects have to pay).

Implementation

This mail already explains some basic steps and demonstrates it in this fork. Moreover the documentation on the Transifex website is useful as well. Sphinx provides instructions as well. This video gives a good overview about Sphinx and Transifex. This mail provides some findings about the implementation. There is contact to the QGIS translation community.

Current State

I used this branch https://github.com/ThomasG77/OSGeoLive-doc/tree/transifex . Then I did this commands:

First it is necessary to change these lines in the conf.py file https://github.com/OSGeo/OSGeoLive-doc/blob/master/conf.py#L25 .

The automatic reading of the version number causes troubles. So the the version number should simply be "hard-coded":

version = '10.5'

Then:

make gettext
sphinx-intl update -p _build/locale
tx init
sphinx-intl update-txconfig-resources --pot-dir _build/locale --transifex-project-name osgeolive
tx push -s
# Now the English source language should be pushed to Transifex.
# Do some translation
# Pull the translation to the local repository 
tx pull -l de 
# build the html files for the German translation 
make -e SPHINXOPTS="-D language='de'" html


Now the English source language should be pushed to Transifex.

Changing the language team line by "Language-Team: ENGLISH <https://live.osgeo.org/en/contact.html\n" seems mandatory.

What has been tested so far?

The whole process of translation already works with the command lines:

- creating .pot and .po files

- pushing to Transifex

- translating in Transifex

- pulling translation to the local repo

- creating html for a translated language

Open Challenges

- the whole process should be done completely automatically: In order to do this the "Makefile" should be edited. More commands need to be edited. The "Makefile"s of other projects (QGIS, QField) could be taken as inspiration.


- The folder structure should be cleaned up. At the moment some .rst files are outside the main documentation. This causes troubles and should be fixed.

Tipps and Tricks

It is possible to delete a lot of resources on Transifex using this command:

tx delete -r osgeolive.de--*

It is possible to delete just a single file, but you can also delete a lot of files using the "*".

You might need it if you accidentally upload wrong files.