Andy Huang Home Page
To translate the user interfaces of KP Typing Tutor series, you need these tools:
It is assumed that you will use PoEdit.
Get Text: http://dybdahl.dk/dxgettext/
Mostly you will need only PoEdit. If you want advanced features of Get Text for translation, you may download dxgettext which a set of command-line tools and Windows Shell applications.
Schema of PO
The basic format of a po file is text, the schema of the text is described by GNU GetText manual. When you open a po file with a text editor, you will see things like the following:
As you might notice, "msgid" represents the original content, and "msgstr" is
the translation. Meta data like "X-Poedit-Language: Chinese\n" is the language
setting of the pofile.
When you open a po file with PoEdit, you will have the following view
With PoEdit, you need no worry about the schema of the po file. PoEdit will maintain the schema for you.
After translating the po file, you need to convert the po file into a mo file that will be used by KP Typing Tutor. When you save a po file using PoEdit, PoEdit will create/update the mo file stored in the same folder. If you used a text editor to edit the po file, you might need other command-line utilities to convert the po file into a mo file.
Unless you are a programmer, it is better just to use PoEdit.
Folder Structures of KP TT
As you might notice, the translation of each language is stored in a relevant folder. For example, the translation in Spanish is in "default.mo" under "\locale\es\LC_MESSAGES". If your computer run Windows in Spanish, KP TT will pick up the Spanish translation.
Steps of Translation
What to translate
Not every items in the po file need to be translated. You may refer to existing po files with translation to find out. During the translation, you may find texts like:
%s is a bookmark for KP TT to replace with string, and %d is to replace with number. Please leave them as they are. Though you may change the locations of these bookmarks, but you need to keep the total number and the order of the bookmarks.
The copy of the po file with empty translation is "c:\Program Files\kp\tutor\locale\EmptyTranslation.po", if you installed KP TT in "c:\Program Files\kp\tutor\".
Assuming you are going to translate into German, you need to create a sub folder under "\locale\" called "de", then create "LC_MESSAGES" under "de".
Copy the EmptyTranslation.po into "\locale\de\LC_MESSAGES" and rename it to "default.po".
Open "default.po" in "\locale\de\LC_MESSAGES". Click on [Main menu -> Catalog -> Settings], and define settings.
Then you may translate the texts line by line.
After saving the po file, PoEdit will create a mo file under the same folder. This file will be used by KP TT if your computer is running Windows in German.
Run KP TT to see the effects of translation. You might need to test the translation a few times.
After you have made a translation file, you may send either the po file or the mo file to the author of KP TT.
Alternatively you may make an installation program with translation and courses in only your language, similar to the English only editor of KP Typing Tutor. The author of KP TT might provide you tools and scripts to make such installation program.
Although KP TT only need mo files for translation, it is better to keep the po file in the same folders.