Difference between revisions of "Translate Amahi"

From Amahi Wiki
Jump to: navigation, search
Line 1: Line 1:
 
We plan to support localization in the upcoming transition to rails 2.3, which has localization support included.
 
We plan to support localization in the upcoming transition to rails 2.3, which has localization support included.
  
For the time being, here is the  [http://git.amahi.org/?p=amahi.git;a=blob;f=platform/platform/html/config/locales/en.yml;h=05555fc01e55cf7036b1c9cd69c96d843a55683d;hb=HEAD en.yml file] set of sentences to translate (in a format called yml, ready for rails 2.3).
+
= How to Translate Amahi =
 +
 
 +
There are two ways to translate Amahi:
 +
 
 +
* Online
 +
* Offline
 +
 
 +
= Online Translation =
 +
 
 +
For online translation, the team has a site where the strings can be entered, or Google translate can be used to
 +
 
 +
= Offline Translation =
 +
 
 +
This method achieves the same goals, in a more "manual" way.
 +
 
 +
It involves converting a "master" english file (en.yml) to a file in your own language.
 +
 
 +
Here is the  [http://git.amahi.org/?p=amahi.git;a=blob;f=platform/platform/html/config/locales/en.yml;h=05555fc01e55cf7036b1c9cd69c96d843a55683d;hb=HEAD en.yml file] set of sentences to translate (in a format called yml, ready for rails 2.3).
  
 
(that's formatted) the raw file is at [http://git.amahi.org/?p=amahi.git;a=blob_plain;f=platform/platform/html/config/locales/en.yml;hb=HEAD raw en.yml]
 
(that's formatted) the raw file is at [http://git.amahi.org/?p=amahi.git;a=blob_plain;f=platform/platform/html/config/locales/en.yml;hb=HEAD raw en.yml]
Line 7: Line 24:
 
Basically what the translation consists of is this:
 
Basically what the translation consists of is this:
  
* duplicate an original file, change the name to something appropriate (e.g. de.yml for german, fr for french)
+
* duplicate the original file, change the name to something appropriate (e.g. de.yml for german, fr for french)
 
* change the strings after the colon to the end of the line for the new language.
 
* change the strings after the colon to the end of the line for the new language.
  
Line 33: Line 50:
  
 
= Translation Tips =
 
= Translation Tips =
 +
 +
We have some important translation tips that you must read before attempting translation. Sounds simple, but there are a few interesting wrinkles to it:
  
 
[[Translation tips]]
 
[[Translation tips]]

Revision as of 03:28, 3 November 2009

We plan to support localization in the upcoming transition to rails 2.3, which has localization support included.

How to Translate Amahi

There are two ways to translate Amahi:

  • Online
  • Offline

Online Translation

For online translation, the team has a site where the strings can be entered, or Google translate can be used to

Offline Translation

This method achieves the same goals, in a more "manual" way.

It involves converting a "master" english file (en.yml) to a file in your own language.

Here is the en.yml file set of sentences to translate (in a format called yml, ready for rails 2.3).

(that's formatted) the raw file is at raw en.yml

Basically what the translation consists of is this:

  • duplicate the original file, change the name to something appropriate (e.g. de.yml for german, fr for french)
  • change the strings after the colon to the end of the line for the new language.

That's it! you can do it by cut and paste or with git:

   git clone git://git.amahi.org/amahi.git
   cd amahi/platform/platform/html/config/locales
   cp en.yml yourlocale.yml
   [edit the yourlocale.yml file]
   git commit yourlocale.yml

For brownie points, you can also add those to

 amahi/platform/platform/html/app/controllers/setup_controller.rb

To find the code of your language, please visit the iso codes page Columns 6 is the name of the language *in the native language* (we need that) and column 1 is the ISO code

Please put them here in alphabetical order so that the user can more easily find his/hers!

Here is how to submit a patch directly with git or you can send your locale file by email or post it in the forums or amahi-devel list.

Here is the original localization thread in the forums.

Translation Tips

We have some important translation tips that you must read before attempting translation. Sounds simple, but there are a few interesting wrinkles to it:

Translation tips