How to Translate BasKet Note Pads to Your Language

BasKet Note Pads is translated in some languages and you just have to install it to have it translated in yours.
If BasKet Note Pads is not yet translated into your native language, you can help to make this happens. This page explains how to do.

Requirements

You should have downloaded and installed BasKet Note Pads from sources.
Go to the download page if you have not done it this way, and download the official source archive.
Then compile and install BasKet Note Pads.
You are ready to translate it.

Create Your Language File

Go to http://i18n.kde.org/teams/ and locate your language code.
For instance, if you want to translate BasKet Note Pads into Afrikaans, your language code is "af".

Go to the src/ folder where BasKet Note Pads was unarchived and from where you compiled it.
You will see a file basket.pot: copy it to your language code with the extension ".po".
In our exemple, you have to copy basket.pot to af.po and this is this file that you will translate.

How to Translate BasKet Note Pads

Just open this .po file with KBabel (should be the default). If KBabel is not installed you can find it in kdesdk package.
KBabel is pretty simple to use, even if it seems complicated, you will not use every tools it provides.

The bassis: KBabel provides you the original message on top, you should translate it on bottom (nothing difficult :-) ).
Use PageUp and PageDown keys to go to the next/previous untranslated message.

Sometimes there is a %1, %n... in the messages, they will be replaced by BasKet Note Pads at runtime (by other messages or by numbers): just put those %s things in your translations...

When a message begins with "_n: " it indicates that the message is in two forms: singular and plural.
Depending on a number (eg. the number of items to delete) BasKet Note Pads will use the singular form or the plural form. The first line is the singular form and the second is the plural one. In those sentences, "%n" will be replaced by the number (...of items to delete, in our example).
Important: you should translate the message without the "_n: " prefix.

There are also messages like: "_: e.g. \"18 items, 10 founds, 5 selecteds\"\n%1, %2, %3".
The "_: " token indicate that the first line is a clue given to you by the programer because the message in itself is not very meaningful.
You should not translate the first line.

In the translations, the '&' symbol is not ampersand but it is for accelerator keys (see below).
eg. "&Title:" indicate that if the user press Alt+T he will be ready to enter a title (focus will move to the Title field). The accelerator can be any letter in messages. When translating, you can put the ampersand before any letter (see below).
If you need an ampersand symbol, use a double & symbol when translating (like "Notes && Clips"): in any case you just have to put the same amount of & than in the sentence to translate.

Tip: Avoid Accelerators Clashes

Accelerators are underlined lettres in windows, eg. "Title:". Pressing Alt and the underlined letter (Alt+T in this exemple) will move the keyboard focus to the corresponding field for immediate input. It helps to really speed up actions for peoples who want to use mouse the least possible and prefers the use of a keyboard (or to guys who have disabilities).

So, the tip: you can enable a thing called "Dr. Klash".
When hitting F12 in an application it will say you what widgets do not have accelerators (also called mnemonics) and which are clashing!
That is very interesting to provide seamless keyboard navigation for peoples who are using it.

To enable this Dr. Klash, edit the file ~/.kde/share/config/kdeglobals in a text editor and add the following lines in order to use the F12 feature:

[Development]
CheckAccelerators=F12

And voilà!
A non-negligeable part of KDE users will like a good translated BasKet Note Pads with accelerators enabled.

If you want, you can add "AutoCheckAccelerators=true" line to enable the dialog to popup automatically if a conflict exists and "AlwaysShowCheckAccelerators=true" to enforce the dialog to popup always.

Get the Translation Integrated in BasKet Note Pads

Once the translation is done, you just have to do a "make" and "make install" in a console like the first time you installed BasKet Note Pads by compiling it!
Restart BasKet Note Pads and it will be translated.
When the translation is OK, mail me it and I will integrate it in the next downloadable archive.

Translating Next Versions

It is simple: when a new version of BasKet Note Pads is to be released I will mail you (if you want to be the official translator of BasKet Note Pads into your language, of course) and you will just need to re-edit your .po file.
Previously translated messages are of course kept translated and will only be asked to translate the new messages.
However, some english messages can have changed a little (to correct english errors, for example): the system try to match old and new sentences. Those matches result in so called "fuzzy mesages" and are provided for you to avoid to re-translate them from scratch (but sometimes matches are very wrong). If they are OK mark them as translated, if not just correct them to mirror the corrected english message.