Difference between revisions of "Talk:Live GIS Translate"

From OSGeo
Jump to navigation Jump to search
(added video)
(→‎Implementation: added thread in QGIS Translation mailing list)
 
(2 intermediate revisions by the same user not shown)
Line 2: Line 2:
 
* [https://github.com/qgis/QGIS-Documentation QGIS-Documentation] [https://www.transifex.com/qgis/qgis-documentation translation]
 
* [https://github.com/qgis/QGIS-Documentation QGIS-Documentation] [https://www.transifex.com/qgis/qgis-documentation translation]
 
* [https://github.com/opengisch/QField-docs QField-Documentation] [https://www.transifex.com/opengisch/qfield-documentation translation]
 
* [https://github.com/opengisch/QField-docs QField-Documentation] [https://www.transifex.com/opengisch/qfield-documentation translation]
 +
 +
== 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. [http://www.sphinx-doc.org/en/1.5.1/intl.html 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 ==
 
== Implementation ==
  
This [https://lists.osgeo.org/pipermail/live-demo/2016-August/011644.html mail] already explains some basic steps and demonstrates it in this [https://github.com/ThomasG77/OSGeoLive-doc/tree/transifex fork]. Moreover the [https://docs.transifex.com/integrations/sphinx-doc/ documentation] on the Transifex website is useful as well. [http://www.sphinx-doc.org/en/1.5.1/intl.html Sphinx] provides instructions as well. This [https://www.youtube.com/watch?v=Nz8zutA55fI video] gives a good overview about Sphinx and Transifex.
+
This [https://lists.osgeo.org/pipermail/live-demo/2016-August/011644.html mail] already explains some basic steps and demonstrates it in this [https://github.com/ThomasG77/OSGeoLive-doc/tree/transifex fork]. Moreover the [https://docs.transifex.com/integrations/sphinx-doc/ documentation] on the Transifex website is useful as well. [http://www.sphinx-doc.org/en/1.5.1/intl.html Sphinx] provides instructions as well. This [https://www.youtube.com/watch?v=Nz8zutA55fI video] gives a good overview about Sphinx and Transifex. This [https://lists.osgeo.org/pipermail/live-demo/2017-January/011741.html mail] provides some findings about the implementation. There is [https://lists.osgeo.org/pipermail/qgis-tr/2017-January/000797.html contact] to the QGIS translation community.
  
== Current State 2017-01-02 ==
+
== Current State ==
  
 
I used this branch https://github.com/ThomasG77/OSGeoLive-doc/tree/transifex . Then I did this commands:
 
I used this branch https://github.com/ThomasG77/OSGeoLive-doc/tree/transifex . Then I did this commands:
Line 13: Line 23:
 
First it is necessary to change these lines in the conf.py file https://github.com/OSGeo/OSGeoLive-doc/blob/master/conf.py#L25 .
 
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 automatical reading of the verion number causes troubles. So the the version number should simply be "hard-coded":
+
The automatic reading of the version number causes troubles. So the the version number should simply be "hard-coded":
  
 
  version = '10.5'
 
  version = '10.5'
Line 24: Line 34:
 
  sphinx-intl update-txconfig-resources --pot-dir _build/locale --transifex-project-name osgeolive
 
  sphinx-intl update-txconfig-resources --pot-dir _build/locale --transifex-project-name osgeolive
 
  tx push -s
 
  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.
 
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.
 
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 ==
 
== Tipps and Tricks ==
  
It is possible to delete a lot of ressources on Transifex using this command:
+
It is possible to delete a lot of resources on Transifex using this command:
  
 
  tx delete -r osgeolive.de--*
 
  tx delete -r osgeolive.de--*

Latest revision as of 11:36, 30 January 2017

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.