Translation documentation for Developers: Difference between revisions

From OpenPetra Wiki
Jump to navigation Jump to search
No edit summary
Line 1: Line 1:
= Online Translation at Launchpad =
= Documentation for Translators =
Please go to https://translations.launchpad.net/openpetraorg and register yourself. Unfortunately this is not provided by Sourceforge, so you will need a separate account. Launchpad is a free service from the company Canonical which develops Ubuntu.
There is a separate page with [[Documentation for Translators]].


== Synchronising Launchpad with version in Git ==
= Synchronising Launchpad with version in Git =
The synchronisation process needs to be done by someone of the Core development team. The goal is to get the latest translations into the official packaged version, and to update the template on Launchpad with new strings to translate.
The synchronisation process needs to be done by someone of the Core development team. The goal is to get the latest translations into the official packaged version, and to update the template on Launchpad with new strings to translate.


Line 18: Line 18:
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.
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.


= Online Translation with Pootle (NOT IN USE ANYMORE) =
= Testing a translation =
Pootle is an online translation tool for translating the po files.
* TODO: describe how to use nant to generate the appropriate resource dll containing the translations
 
* TODO: describe how to set the Environment Variables to switch to another language than the system language to test other language files
We have now switched to Launchpad, see above.
* TODO: this might be interesting for translators too so that they can test their translation even before a release? but it is probably too complicated to configure and use nant?
 
= Local Translation with Poedit =
== Poedit ==
Please download the [http://www.poedit.net/ Poedit Editor] that allows easy editing of language files. It is available for all major operating systems.
 
This is a screenshot of the editor (click on it to see the fullsize picture):
 
[[Image:poedit.png|200px]]
 
== Get the language files ==
The easiest is to work with Launchpad, you can edit the translations online, or download the translation file.
 
Alternatively, you can check the Git repository online for the language file:
* http://openpetraorg.git.sourceforge.net/git/gitweb.cgi?p=openpetraorg;a=tree;f=i18n;hb=HEAD
 
There is another file for the internationalisation of the installer; this file can be edited in a normal text editor:
* http://openpetraorg.git.sourceforge.net/git/gitweb.cgi?p=openpetraorg;a=tree;f=setup/petra0300/language;hb=HEAD
The easiest is to download the english version, and rename the file, and replace the texts with the new language.
 
== Try and test your language file ==
You will find that Poedit in the default setting will create a file with extension .mo in the same directory where you have your .po file. It is for example called de.mo. Please rename this file to i18n.mo and move it to your OpenPetra.org installation (eg. C:\Program Files\OpenPetra.org), subdirectory bin30\locale\de\LC_MESSAGES.
 
For example, the file is now called: <code>C:\Program Files\OpenPetra.org\bin30\locale\de\LC_MESSAGES\i18n.mo</code>
 
If your Windows system is running in that language, it will automatically use that language when you start the OpenPetra.org Client (and Server).
 
If you are running a German Windows System and want to test the Russian translation, you need to add the Environment variable LANGUAGE with value ru. You can do this in Control Panel, System, Advanced Tab, button Environment Variables, and add the new variable in the user variable section. You can see a demonstration with screenshots [http://www.chem.gla.ac.uk/~louis/software/faq/q1.html on this external page].

Revision as of 09:50, 10 December 2010

Documentation for Translators

There is a separate page with Documentation for Translators.

Synchronising Launchpad with version in Git

The synchronisation process needs to be done by someone of the Core development team. The goal is to get the latest translations into the official packaged version, and 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.po. Rename it to template.pot and commit 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.

Testing a translation

  • TODO: describe how to use nant to generate the appropriate resource dll containing the translations
  • TODO: describe how to set the Environment Variables to switch to another language than the system language to test other language files
  • TODO: this might be interesting for translators too so that they can test their translation even before a release? but it is probably too complicated to configure and use nant?