Translation documentation for Developers: Difference between revisions

From OpenPetra Wiki
Jump to navigation Jump to search
m (small typos)
m (formatting the mediawiki way)
Line 5: Line 5:
There are actually 3 different ways to provide some translation.
There are actually 3 different ways to provide some translation.


1.) Using the [https://translations.launchpad.net/openpetraorg/trunk/+pots/template1 launchpad-platform]. To be able to make changes on the translation a registration is needed. If you are not sure with a translation please check "Someone should review this translation".
== Using Launchpad for translation ==
Using the [https://translations.launchpad.net/openpetraorg/trunk/+pots/template1 launchpad-platform]. To be able to make changes on the translation a registration is needed. If you are not sure with a translation please check "Someone should review this translation".




2.) Using poedit: The following steps are needed.
== Using Poedit for translation ==
Using poedit: The following steps are needed.


- Download poedit. The Version 1.4.6 is available [http://prdownloads.sourceforge.net/poedit/poedit-1.4.6-setup.exe here]
* Download Poedit. The Version 1.4.6 is available [http://prdownloads.sourceforge.net/poedit/poedit-1.4.6-setup.exe at Sourceforge]


- Download the .po-file (not .mo!!) . For Spanish it is available [https://translations.launchpad.net/openpetraorg/trunk/+pots/template1/es/+export here] (after a registration at launchpad)
* Download the .po-file (not .mo!!) . For Spanish it is available [https://translations.launchpad.net/openpetraorg/trunk/+pots/template1/es/+export here] (after a registration at launchpad)


- Edit the .po-file offline
* Edit the .po-file offline


- Upload it again [https://translations.launchpad.net/openpetraorg/trunk/+pots/template1/es/+upload here] (for Spanish)
* Upload it again [https://translations.launchpad.net/openpetraorg/trunk/+pots/template1/es/+upload here] (for Spanish)


Poedit allows working faster than the first alternative. In order to avoid that work is done double by several translators please contact the translation team before starting: [mailto:joejoe2010(at)users.sourceforge.net joejoe2010@users.sourceforge.net]
Poedit allows working faster than the first alternative. In order to avoid that work is done double by several translators please contact the translation team before starting: [mailto:joejoe2010(at)users.sourceforge.net joejoe2010@users.sourceforge.net]


 
== Using Excel or LibreOffice Calc for translation ==
3.) Converting the po-file to csv and open it eg. with Microsoft Excel
Converting the po-file to csv and open it eg. with Microsoft Excel:


This might be the easiest way to provide the items for translators which are not familiar with 1.) or 2.)
This might be the easiest way to provide the items for translators which are not familiar with 1.) or 2.)
Line 27: Line 29:
Please follow these steps:
Please follow these steps:


- Download an actual version of toolkit [http://sourceforge.net/projects/translate/files/Translate%20Toolkit/ here]. The file should be named translate-toolkit-…-setup.exe.  
* Download an actual version of toolkit [http://sourceforge.net/projects/translate/files/Translate%20Toolkit/ from Sourceforge]. The file should be named translate-toolkit-…-setup.exe.  


- Install toolkit
* Install toolkit


- Open a windows command line (Win+R) and adapt your path: for example with PATH=%PATH%;E:\Program Files\Translate Toolkit
* Open a windows command line (Win+R) and adapt your path: for example with PATH=%PATH%;E:\Program Files\Translate Toolkit


- Download the actual .po-file (not .mo!!) . It is available [https://translations.launchpad.net/openpetraorg/trunk/+pots/template1/es/+export here] (for Spanish). You need to registrate first at launchpad.
* Download the actual .po-file (not .mo!!) . It is available [https://translations.launchpad.net/openpetraorg/trunk/+pots/template1/es/+export here] (for Spanish). You need to registrate first at launchpad.


- On the windows command line, move to the folder where the file is saved
* On the windows command line, move to the folder where the file is saved


- Execute po2csv. For example po2csv template1_template1-es.po template1_template1-es.csv --progress=verbose --errorlevel=message
* Execute po2csv. For example po2csv template1_template1-es.po template1_template1-es.csv --progress=verbose --errorlevel=message


- eventually: save the csv as xls
* eventually: save the csv as xls


- provide the csv or xls-file to your translators
* provide the csv or xls-file to your translators


- when you get it back you need to save the file as csv (using UTF-8); this is especially necessary for ú, é etc used eg. in Spanish
* when you get it back you need to save the file as csv (using UTF-8); this is especially necessary for ú, é etc used eg. in Spanish


- Execute csv2po. For example csv2po template1_template1-es.csv template1_template1-es_rückkonvertiert.po --progress=verbose --errorlevel=message
* Execute csv2po. For example csv2po template1_template1-es.csv template1_template1-es_rückkonvertiert.po --progress=verbose --errorlevel=message


- Upload the po-file [https://translations.launchpad.net/openpetraorg/trunk/+pots/template1/es/+upload here] (for Spanish)
* Upload the po-file [https://translations.launchpad.net/openpetraorg/trunk/+pots/template1/es/+upload here] (for Spanish)


- Then launchpad checks the file and adds it to the launchpad-platform. This can take 1 or 2 days.
* Then launchpad checks the file and adds it to the launchpad-platform. This can take 1 or 2 days.


In order to avoid that work is done double by several translators please contact the translation team before starting: [mailto:joejoe2010(at)users.sourceforge.net joejoe2010@users.sourceforge.net]
In order to avoid that work is done double by several translators please contact the translation team before starting: [mailto:joejoe2010(at)users.sourceforge.net joejoe2010@users.sourceforge.net]

Revision as of 06:13, 9 August 2012

Documentation for Translators

There is a separate page with Documentation for Translators.

The translation process

There are actually 3 different ways to provide some translation.

Using Launchpad for translation

Using the launchpad-platform. To be able to make changes on the translation a registration is needed. If you are not sure with a translation please check "Someone should review this translation".


Using Poedit for translation

Using poedit: The following steps are needed.

  • Download the .po-file (not .mo!!) . For Spanish it is available here (after a registration at launchpad)
  • Edit the .po-file offline
  • Upload it again here (for Spanish)

Poedit allows working faster than the first alternative. In order to avoid that work is done double by several translators please contact the translation team before starting: joejoe2010@users.sourceforge.net

Using Excel or LibreOffice Calc for translation

Converting the po-file to csv and open it eg. with Microsoft Excel:

This might be the easiest way to provide the items for translators which are not familiar with 1.) or 2.)

Please follow these steps:

  • Download an actual version of toolkit from Sourceforge. The file should be named translate-toolkit-…-setup.exe.
  • Install toolkit
  • Open a windows command line (Win+R) and adapt your path: for example with PATH=%PATH%;E:\Program Files\Translate Toolkit
  • Download the actual .po-file (not .mo!!) . It is available here (for Spanish). You need to registrate first at launchpad.
  • On the windows command line, move to the folder where the file is saved
  • Execute po2csv. For example po2csv template1_template1-es.po template1_template1-es.csv --progress=verbose --errorlevel=message
  • eventually: save the csv as xls
  • provide the csv or xls-file to your translators
  • when you get it back you need to save the file as csv (using UTF-8); this is especially necessary for ú, é etc used eg. in Spanish
  • Execute csv2po. For example csv2po template1_template1-es.csv template1_template1-es_rückkonvertiert.po --progress=verbose --errorlevel=message
  • Upload the po-file here (for Spanish)
  • Then launchpad checks the file and adds it to the launchpad-platform. This can take 1 or 2 days.

In order to avoid that work is done double by several translators please contact the translation team before starting: joejoe2010@users.sourceforge.net

Testing a translation

We provide a Nightly Build of OpenPetra. This integrates the changes on launchpad that has been made on the last 24 hours. You can get the Nightly Build here. Please download the exe-file OpenPetraSetup-x.x.xx.xxxx.exe and install it on your computer to see your new translations. (There is a branch on bazaar that gets the translations once a day from launchpad. You can find it here.)

Update launchpad template

The synchronisation process needs to be done by someone of the Core development team. The goal is to update the template on Launchpad with new strings to translate.

First download the latest translations, in this case for german, in .po format:

https://translations.launchpad.net/openpetraorg/trunk/+pots/template1/de/+export

You will get an email once the download is ready.

Then generate a new template file:

  1. Delete the file i18n/template.po, if it exists
  2. make sure that your OpenPetra.build.config has <property name="Translation.TargetLanguage" value="template"/>
  3. nant translation will create the file U:\openpetraorg\i18n\template.pot
  4. Upload the new template.pot file to Launchpad, using https://translations.launchpad.net/openpetraorg/trunk/+pots/template1/+upload
  5. a few hours later, the new template will be available (if it needs a manual review, it might take a day)

All .po files in the i18n directory will be added to the installer automatically. OpenPetra will use the language settings on the workstation for determining which language file should be used.

Reviewing the launchpad template

Please have a look at Reviewing the launchpad template