Warning: Can't use blame annotator:
svn blame failed on branches/PublicaMundi_David-devel/docs/contribute/translate.rst: 200029 - Couldn't perform atomic initialization
20014 - Can't find a temporary directory: Internal error

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

Last change on this file since 697 was 696, checked in by djay, 9 years ago

Small fixes in the main documentation.

  • Property svn:keywords set to Date Author
File size: 2.5 KB
RevLine 
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 = :_ss(\":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_ss
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 * `poedit <http://www.poedit.net/>`__
48 * `virtaal <http://translate.sourceforge.net/wiki/virtaal/index>`__
49 * `transifex <https://www.transifex.net/>`__
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
63http://youserver/cgi-bin/zoo_loader.cgi?request=GetCapabilities&service=WPS
64
65would become the following:
66
67http://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

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