Translation documentation for Developers: Difference between revisions

From OpenPetra Wiki
Jump to navigation Jump to search
No edit summary
 
(37 intermediate revisions by 2 users not shown)
Line 1: Line 1:
== Poedit ==
= Documentation for Translators =
Please download the [http://www.poedit.net/ Poedit Editor] that allows easy editing of language files. It is available for all major operating systems.
There is a separate page with [[Documentation for Translators]].


This is a screenshot of the editor (click on it to see the fullsize picture):
= Testing a translation =
You can get a test installation, by running


[[Image:poedit.png|200px]]
curl https://get.openpetra.org | bash -s test


== Get the language files ==
Then just replace your language file in /home/op_test/client/locales, and reload your browser.
You are welcome to ask on the forum ([http://sourceforge.net/apps/phpbb/openpetraorg/viewforum.php?f=13 Forum Translations/Internationalisation]) for the empty or current translation file for the language you want to translate.


Alternatively, you can check the Git repository online for the language file:
= Reviewing the translation template =
* http://openpetraorg.git.sourceforge.net/git/gitweb.cgi?p=openpetraorg;a=tree;f=i18n;hb=HEAD
Please have a look at [[Reviewing the translation template]]
 
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
 
== 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].
 
== Send the modified language file ==
Please post the translated or modified language files (extension: .po; and .isl) in the Forum ([http://sourceforge.net/apps/phpbb/openpetraorg/viewforum.php?f=13 Forum Translations/Internationalisation]). We will integrate it into the next release of OpenPetra.org.
 
Thank you very much!

Latest revision as of 06:16, 26 March 2020

Documentation for Translators

There is a separate page with Documentation for Translators.

Testing a translation

You can get a test installation, by running

curl https://get.openpetra.org | bash -s test

Then just replace your language file in /home/op_test/client/locales, and reload your browser.

Reviewing the translation template

Please have a look at Reviewing the translation template