|
Site Admin
Joined: 08 Nov 2005
Posts: 451
|
This is a (hopefully) helpful howto for existing, or wannabe translators. I am using i18n for localisation in liquid weather ++, so translation production should be very simple. The fact that I'm using i18n means that you can use standard tools, like kbabel, to do the translation work.
So on with the howto ...
1. Get the latest .pot, or .po file for your locale.
(a) Instructions for starting a new translation:
In order to start the translation, you need the .pot file for liquid weather ++. The latest .pot file is in a tarball that you can download from http://liquidweather.net/Locales.tar.bz2. Once you've downloaded it, untar it like this:
Code: $ mkdir lwp_locales
$ mv Locales.tar.bz2 lwp_locales
$ cd lwp_locales
$ tar -jxpf Locales.tar.bz2
You should then find a file called liquid_weather.pot.
(b) Instructions for editing an existing translations:
If you want to edit an existing translation, then open up the tarball as in (a) above. However, once inside the locale directory, you will need to change to the directory for your language inside the locale directory. So:
Code: $ cd locale
$ ls
ca cs da de es fi fr hu it nl pl pt ru sk sl sr sr@Latn sv
You will note that there are a bunch of directories with two letter names. These are the i18n two letter codes for various languages. For example German is "de" (ie "de" for Deutsch) and French is "fr". Choose the directory for your language. Inside that directory you'll find another directory, called LC_MESSAGES. Change to that directory, and inside you'll find a file called liquid_weather.po. That's the file we want.
2. Edit the .po or .pot file.
Now you've found the .po/.pot file, you need to edit it. Luckily for you, kde comes with a fantastic tool for this. It's called kbabel. If you don't have this tool, your distribution should have it somewhere. It should be in the kde-sdk package. Install it.
Start up kbabel. You may need to enter some information the first time you use it. Don't worry too much about this. Use the file menu to open the .po file or the .pot file. You should then be confronted with an interface with three panels on the left, and two panels on the right. The panels on the right aren't particularly useful, so we'll ignore those for the moment. The three panels on the left is where all the action happens.
The top panel has a summary of each phrase that needs translating. It shows the phrase number, the English phrase, and the translated phrase (if it's not translated, then it'll be blank). The middle panel shows the English Phrase for the particular phrase you are on. The bottom panel is where the action happens.
Now, the best way to navigate is to use the buttons with the diagonal arrows in the toolbar. The best button to use is the button with a diagonal down arrow and a question mark. This will find the next untranslated or fuzzy translation.
Now a quick word about fuzzy translations. Sometimes, kbabel will translate phrases of its own accord. It finds similar words or phrases that have already been translated, or are in other translations in liquid weather, and guess a translation for your language. WARNING: fuzzy translations are ignored when the .po file is converted into the final format that liquid weather uses. If you are happy with a fuzzy translation, you must remove the "fuzzy" status. You can tell if a translation is fuzzy, because the fuzzy box on the bottom panel will be red. Either click that box to turn it black, or press Ctrl + U to toggle the fuzziness off. PLEASE PLEASE PLEASE make sure you remove the fuzzy tag from all phrases that you have translated.
Back to navigation. Using the "next untranslated or fuzzy" button will move you from phrase to phrase which has not been translated or is fuzzy. Then for each one, go to the bottom panel, and enter the translation. Keep going until there are no fuzzy or untranslated phrases in the .po file.
The final thing to do is to set the encoding for the file. Go to the edit menu. At the bottom of this menu should be an "Edit header..." item. Click this, and you'll get a small window. You should find a line like this:
Code: Content-Type: text/plain; charset=
Put the encoding that you are using for your language after the "=". For example, if you are using unicode, put UTF-8. If you are just using standard latin characters, then put ISO-8859-1. There are more exotic encodings, but if you are using one of these, I'm sure you'll know about this.
3. Final Step.
The final step is to email me the file. Email it to me at matt@liquidweather.net. I'll then perform a little magic on it, and include it in the next release.
That's it - you've completed a liquid weather translation .  |
_________________ Cheers
Matt
liquidweather.net
Administrator |
|