Difference between revisions of "En:HOWTO: Translate Sabayon"

From Sabayon Wiki
Jump to: navigation, search
m (changed svn links to git)
 
Line 1: Line 1:
== HOWTO: Translate Entropy ==
+
HOWTO: translate Sabayon
  
== Quick Guide ==
+
Translating sabayon to your native tounge
In this guide we'll supose we are going to translate Entropy to Finnish (language code: fi) - Yes, Finnish, why not?
+
  
=== Obtaining the files ===
 
  
First of all we need to get the file to translate. This file is called entropy.pot and it's very important to get the latest version of this file, that you'll find in entropy git repository: /misc/po/entropy.pot [http://gitweb.sabayon.org/?p=entropy.git;a=tree;f=misc/po;hb=HEAD].
 
  
Now we have the file to translate in our disk, but we don't want to do any extra job, so we should also check if there's an earlier translation of Entropy for Finnish. If it exists we'll find this file in git too /misc/po/fi.po. We have to download also this file.
+
So you decided to help out Sabayon and in short all your country(wo)men by translating this superior distro to your language! Good on you!!! WELL DONE!
  
Note: The template is always called entropy.pot and the translated files are called 'languagecode'.po. (Where 'languagecode' is the standard code for each language)
 
  
=== Translating the file - tools ===
+
I'm gonna try and keep this as short and simple as i can with just a simple step by step guide. in layman terms i'm using the KISS philosophy (Keep it simple stupid)
  
There are several ways to translate a file. We can use a simple text editor (i.e. kate), but it's not the best way, because the files we are going to translate contain more than just some text strings and if we change an incorrect character, the file won't work. So it's always better to use a translation program, that also checks spelling and other things. There are several programs to translate that will help you: Poedit, KBabel, ...). We are going to asume you are going to use Poedit (if it's not already in your system you can install it: it's in Entropy and also in Portage).
 
  
If we have a previous fi.po file, we open it with Poedit. To update the file to the last template we go to Catalog -> Update from POT file and browse to entropy.pot. The program will tell us that there are some new strings and some out-dated strings, we just say OK and the file gets up-to-date.
+
There are 2 main ways in translating and one is the online service and the other by downloading and translating.
 +
I highly recommend you to download the file and translate it using POEDIT.
  
What about if we are going to translate Entropy to a language that doesn't have any older translation? Then we just open the entropy.pot file and we save it as 'languagecode'.po (Where 'languagecode' is the standard code for each language)
+
Pre-steps
  
Poedit is very simple, the window is split in two: right-side and left-side. The left side is the side of the original sentences in English and the right side is the one of the sentences we are going to fill with the translation. If there are already translated strings you we'll see them at the right side. At the bottom you'll see the active sentence and the translation for that sentence.
+
1:First off, what you must do is to head on over to www.transifix.com and create an account
  
=== Translating the file - let's go! ===
+
2:Then you search for Sabayon in the searchbar, click on one of the projects and find your language. Not there? Take the english one and add your language to the translations
  
You'll see there are two kind of translated strings, the 'normal ones' and the 'yellow ones'. The yellow ones have the label of 'fuzzy' translations. It means that these strings have been auto-translated in a basis of a dictionary or previously translated similar strings. Fuzzy strings are usually all bad, though, so don't think it's an easier job to translate this ones. There's a button at the panel that controls the status of that strings (fuzzy/translated): the button with a cloud inside.
+
3:click on it and you'll come to a page where there is a -----> .pot <------ file
  
Another important thing is that fuzzy strings won't be shown as translated when the job is finished, so be sure that any fully translated strings remain as fuzzy when you finish your translation.
+
4:When you click on it a window will open with a number of different options. In that window you click on -----> visit language team <----- and make a request of joining.
  
 +
Once you've been approved of joining by almighty MooCow a.k.a lxnay ;) You're set to start translating.
  
{{Note|When you find strange characters in the middle of the sentences to translate (such as %d, %s, %f, \n, \p, %s/%s,...) you must mantain the exact characters in the translation: they are system symbols and if we change them the system will fail!!!}}
 
  
 +
<<<<<<<>POEDIT<>>>>>>>
  
NOTE: We'll find some strings like "O_ther". What does that mean. It means that the "t" (next letter from the _ symbol) will be a shortcut for the keyboard in that sentence. How to translate it? As far as it's possible, we have to stay with the same letter at the shortcut, but... sometimes it's just impossible, because the translated word doesn't have any letter like the one we want. In that case, we can change the shortcut character, but that means more work: we'll have to check later that there are no repeated shortcut keys!
+
In order to translate the .po file you must have POEDIT installed. Which you can find in the repo! (There are others too)
  
NOTE: po files have an specific beginning that Poedit will fill for you (it's not shown at the Poedit screen). At that beginning stays your name, the number of the revision (not much useful by now), the date, the codification of the language and some other things. We'll check all that later.
+
Translating using POEDIT is fairly self-explanatory but i'm gonna give a few examples so no misunderstandings will be possible.
  
When you think the translation is finished, save the file as fi.po. We'll see that Poedit has created a new file called fi.mo at the same folder where we are working on.
+
As i'm swedish the examples given will be in my language....  
  
=== Checking the translation ===
+
These examples will be from the -----> Rigo intltool .pot file <------
To check the translation we have to copy fi.mo to /usr/share/locale/fi/LC_MESSAGES/fi.mo and change it's name to entropy.mo. Then we can begin working with Entropy: etp-applet, Spritz and Equo and see how is our translation: everything should be shown in Finnish!
+
  
Now: is the translation process over? NO, it's not:
+
On the left side you'll have the original string (english) and on the right is the already translated strings in your language. If any translations have been done, that is!
To check if the translated file is correct we have to go across the menus and options, checking that the translated sentences are correct {{Commandgui|and have the original sense}}. We also have to check everywhere if there are repeated shortcuts at the menus and we'll have to change them if there are. You can also find sometimes strings much longer than the original, and maybe you'll see that some of these strings won't fit the buttons/windows and will appear shortened.
+
  
To repair all that you have to open again Poedit, look for the incorrect sentences and arrange them. This process should be repeated until the translation is as we want.
+
At the bottom of POEDIT you'll also see the strings and at the aboslute bottom is where you edit your string!!
  
Before ending, you should open the file once with 'vi', 'nano', 'kate' or any simple editor (don't use openoffice or any other complex editors, because they add symbols to the sentences!) and check that the beginning of the file contains your name at the 'last-translator' field, your e-mail and the correct encoding for your language. If there was another translator before you, don't erase his/her name just put your one at his/her side.
 
  
As an example, the beginning of the file will be something like that:
+
This is a standard phrased translation.
  
{{File|fi.po| <pre class="clear">
 
# SOME DESCRIPTIVE TITLE.
 
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
 
# This file is distributed under the same license as the PACKAGE package.
 
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
 
#, fuzzy
 
msgid ""
 
msgstr ""
 
"Project-Id-Version: PACKAGE VERSION\n"
 
"Report-Msgid-Bugs-To: \n"
 
"POT-Creation-Date: 2007-12-16 03:48+0100\n"
 
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 
"Language-Team: LANGUAGE <LL@li.org>\n"
 
"MIME-Version: 1.0\n"
 
"Content-Type: text/plain; charset=CHARSET\n"
 
"Content-Transfer-Encoding: 8bit\n"</pre>}}
 
  
{{Commandgui|Don't change anything else than the beginning with an editor: the translation can become unusable if you change some incorrect characters!}}
+
Original string
 +
Click here for more details
  
Once we think the {{Commandgui|po}} file is correct we can send it to the forum, so it can be hanged up in subversion, and be usable for other users :)
+
Translated string
 +
Klicka här för fler detaljer
  
{{Note|That was just a quick guide. If you have any problems ask us, please!}}
+
Now that wasn't tough at at all, right?
 +
 
 +
And these strings has a bit of doodles to them ;) What you must make sure is that your translated string has the exact same doodles!
 +
WARNING!!! IT IS EXTREMLY IMPORTANT THAT ALL THE STRINGS WITH ANY DOODELING IS THE SAME!!!! CAN'T STRESS THIS ENOUGH!!!!
 +
 
 +
Original string
 +
<b>%s</b>\n
 +
cannot be installed at this time due to <b>missing/masked</b> dependencies or dependency <b>conflict</b>
 +
 
 +
translated string
 +
<b>%s</b>\n
 +
Kan inte installeras på grund utav <b>saknade/maskerade</b> beroenden eller beroende <b>konflikt</b>
 +
 
 +
As you see, my translated string looks just the same, only translated. It's just this easy!
 +
 
 +
As long as the the translated string is the same as the original string you'll know it will work. It just might be it's translated badly but that's your fault, but the string works ;)
 +
 
 +
When you're done translating i suggest you test your file. When saving a <<<<< .po >>>>> file in POEDIT it is saved as <<<<< .mo >>>>>> which is the file the system uses!
 +
 
 +
Now you head to /usr/share/locale/YOUR_LANGUAGE_CODE/LC_MESSAGES and locate the <<<< RIGO.mo >>>>> copy it (just in case) and replace it with your translated <<< .mo >>> file!
 +
Fire up RIGO and look around if you need any changing. Once your satisfyed with your work you head on back to www.transifix.com and upload it. REMEMBER!! The goal is 100%
 +
 
 +
 
 +
 
 +
 
 +
<<<<<<ONLINE SERVICE>>>>>>>
 +
 
 +
The online service is even more self-explanatory than using POEDIT. To start translating you just click on the project and then on the translate now button.
 +
I gotta say though, that the online service isn't nearly as good or comfortable using as POEDIT. It has sent me error messages even though i have copied the the original string.
 +
I also recommend that you use the translation yourself before submitting it.
 +
 
 +
Good Luck

Revision as of 18:19, 1 December 2012

HOWTO: translate Sabayon

Translating sabayon to your native tounge


So you decided to help out Sabayon and in short all your country(wo)men by translating this superior distro to your language! Good on you!!! WELL DONE!


I'm gonna try and keep this as short and simple as i can with just a simple step by step guide. in layman terms i'm using the KISS philosophy (Keep it simple stupid)


There are 2 main ways in translating and one is the online service and the other by downloading and translating. I highly recommend you to download the file and translate it using POEDIT.

Pre-steps

1:First off, what you must do is to head on over to www.transifix.com and create an account

2:Then you search for Sabayon in the searchbar, click on one of the projects and find your language. Not there? Take the english one and add your language to the translations

3:click on it and you'll come to a page where there is a -----> .pot <------ file

4:When you click on it a window will open with a number of different options. In that window you click on -----> visit language team <----- and make a request of joining.

Once you've been approved of joining by almighty MooCow a.k.a lxnay ;) You're set to start translating.


<<<<<<<>POEDIT<>>>>>>>

In order to translate the .po file you must have POEDIT installed. Which you can find in the repo! (There are others too)

Translating using POEDIT is fairly self-explanatory but i'm gonna give a few examples so no misunderstandings will be possible.

As i'm swedish the examples given will be in my language....

These examples will be from the -----> Rigo intltool .pot file <------

On the left side you'll have the original string (english) and on the right is the already translated strings in your language. If any translations have been done, that is!

At the bottom of POEDIT you'll also see the strings and at the aboslute bottom is where you edit your string!!


This is a standard phrased translation.


Original string Click here for more details

Translated string Klicka här för fler detaljer

Now that wasn't tough at at all, right?

And these strings has a bit of doodles to them ;) What you must make sure is that your translated string has the exact same doodles! WARNING!!! IT IS EXTREMLY IMPORTANT THAT ALL THE STRINGS WITH ANY DOODELING IS THE SAME!!!! CAN'T STRESS THIS ENOUGH!!!!

Original string %s\n cannot be installed at this time due to missing/masked dependencies or dependency conflict

translated string %s\n Kan inte installeras på grund utav saknade/maskerade beroenden eller beroende konflikt

As you see, my translated string looks just the same, only translated. It's just this easy!

As long as the the translated string is the same as the original string you'll know it will work. It just might be it's translated badly but that's your fault, but the string works ;)

When you're done translating i suggest you test your file. When saving a <<<<< .po >>>>> file in POEDIT it is saved as <<<<< .mo >>>>>> which is the file the system uses!

Now you head to /usr/share/locale/YOUR_LANGUAGE_CODE/LC_MESSAGES and locate the <<<< RIGO.mo >>>>> copy it (just in case) and replace it with your translated <<< .mo >>> file! Fire up RIGO and look around if you need any changing. Once your satisfyed with your work you head on back to www.transifix.com and upload it. REMEMBER!! The goal is 100%



<<<<<<ONLINE SERVICE>>>>>>>

The online service is even more self-explanatory than using POEDIT. To start translating you just click on the project and then on the translate now button. I gotta say though, that the online service isn't nearly as good or comfortable using as POEDIT. It has sent me error messages even though i have copied the the original string. I also recommend that you use the translation yourself before submitting it.

Good Luck