source: branches/PublicaMundi_David-devel/docs/contribute/translate.rst @ 689

Last change on this file since 689 was 679, checked in by nbozon, 10 years ago

various doc enhancements

File size: 2.5 KB
RevLine 
[679]1.. _contribute_trans:
2
3Contribute translation
4===============
5
6Anybody can take part to the `ZOO-Project <http://zoo-project.org>`__ translation and is welcome to:
7
8 * Translate ZOO-Services configuration files
9   
10 * Translate documentation
11   
12
13ZCFG translation
14--------------------------
15
16First of all, use the following commands from your Services Provider directory in order to extract all the messages to translate from the ZCFG files :
17
18  ::
19 
20      #!/bin/bash
21      for j in cgi-env/*zcfg ;
22        do
23          for i in Title Abstract;
24           do
25            grep $i $j | sed "s:$i = :_(\":g;s:$:\"):g" ;
26           done;
27       done > locale/.cache/my_service_string_to_translate.c
28   
29
30Then generate the 'messages.po' file based on the Services Provider source code using the following command :
31
32  ::
33 
34      #!/bin/bash
35      xgettext service.c locale/.cache/my_service_string_to_translate.c -o message.po -p locale/po/ -k_
36
37Once 'messages.po' is created, use the following command to create the po file for the targeted language for translation. We will use the French language here as an example :
38
39  ::
40 
41      #!/bin/bash
42      cd locale/po/
43      msginit -i messages.po -o zoo_fr_FR.po -l fr
44
45Edit the zoo_fr_FR.po file with your favorite text editor or using one of the following tools :
46
47 * [http://www.poedit.net/ poedit]
48 * [http://translate.sourceforge.net/wiki/virtaal/index virtaal]
49 * [https://www.transifex.net/projects/p/grass6/c/grass64/ transifex]
50 
51Once the zoo_fr_FR.po file is completed, you can generate and install the corresponding *mo* file using the following command :
52
53  ::
54 
55      #!/bin/bash
56      msgfmt locale/po/zoo_fr_FR.po -o /usr/share/locale/fr/LC_MESSAGES/zoo-services.mo
57
58
59In order to test the Services Provider ZCFG and internal messages
60translation, please add the language argument to you request. As an
61example, such a request:
62
63[http://youserver/cgi-bin/zoo_loader.cgi?request=GetCapabilities&service=WPS]
64
65would become the following:
66
67[http://youserver/cgi-bin/zoo_loader.cgi?request=GetCapabilities&service=WPS&language=fr-FR]
68
69The following command may also be useful in order to pull all the translations already available for a specific language.
70
71  ::
72 
73      #!sh
74      msgcat -o compilation.po $(find ../../ -name fr_FR.utf8.po)
75      msgfmt compilation.po -o /usr/share/locale/fr/LC_MESSAGES/zoo-services.mo
76
77
78Documentation translation
79--------------------------
80
81Translate the `ZOO-Project <http://zoo-project.org>`__ documentation in your language !
82
83Please refer to the :ref:`<contribute_doc>` section to learn more.
Note: See TracBrowser for help on using the repository browser.

Search

Context Navigation

ZOO Sponsors

http://www.zoo-project.org/trac/chrome/site/img/geolabs-logo.pnghttp://www.zoo-project.org/trac/chrome/site/img/neogeo-logo.png http://www.zoo-project.org/trac/chrome/site/img/apptech-logo.png http://www.zoo-project.org/trac/chrome/site/img/3liz-logo.png http://www.zoo-project.org/trac/chrome/site/img/gateway-logo.png

Become a sponsor !

Knowledge partners

http://www.zoo-project.org/trac/chrome/site/img/ocu-logo.png http://www.zoo-project.org/trac/chrome/site/img/gucas-logo.png http://www.zoo-project.org/trac/chrome/site/img/polimi-logo.png http://www.zoo-project.org/trac/chrome/site/img/fem-logo.png http://www.zoo-project.org/trac/chrome/site/img/supsi-logo.png http://www.zoo-project.org/trac/chrome/site/img/cumtb-logo.png

Become a knowledge partner

Related links

http://zoo-project.org/img/ogclogo.png http://zoo-project.org/img/osgeologo.png