Translations
From QtMoko
Deutsch •
English •
Esperanto •
Français •
Italiano •
Nederlands •
Sardu •
Español
Contents |
[edit] How To Translate
[edit] Before start (some advices)
Translating QtMoko is not different from translating Qt Extended.
The only thing you need is some patience and a text editor ('vim' is more than sufficient). Steps to translate QtMoko are as follows and are not dificult. If Rex can do an Italian Translation, you can be sure you can do better! Thus, if you can read this page without having a panic attack you can translate Qt Moko even in your friend sland. (I mean.. Isn't funny read some words that are not usually to find in a phone? - Like munda (clean) in sardinian language..)
You have to use some shell commands to find everything you need. Even a newbie can do that.. :)
[edit] Executing 'configure' script
First step to make is configure Qt Moko. I wont explain what is written in Installation page because this kind of hack is different from user hacks. Before following GITs installation instruction you have to create some stuff. I mean..
user@Zero [/] : cd $QTOPIA_DEPOT_PATH user@Zero [qtmoko] : cd i18n/ user@Zero [i18n] : cp -Rf en_US/ xx_YY
Create folder xx_YY with 2 files inside: DESCRIPTION and .directory . Both of them describe the title of your language. Let's read an example:
user@Zero [i18n] : cat it_IT/.directory [Translation] File=QtopiaI18N Context=Italian [Desktop Entry] Name[]=Lingua Italiana user@Zero [i18n] : cat it_IT/DESCRIPTION Lingua Italiana
You first have to describe your language. This new folder will become the place where QtMoko will put translation files before compiling.
Now, when you'll run configure script you will be able to add your personal language to your QtMoko. DO NOT REMEMBER to use -languages en_US,xx_YY or --add-language xx_YY to your configure command. If you wish to translate have your Neo Freerunner in your favourite language.
You can take a look on :
user@Zero [qtmoko] : cat devices/neo/configure-common # ### These are Neo Regis settings. Something may be not compatible with YOUR NEO!! # This device uses the mobile UI -ui-type mobile # Turn on features. -dynamic-rotation -ssl -dbus -libamr -pictureflow # NB: ==== # With this selection I tell QtMoko to use just Italian, Sardinian, Nuorese # (I do not use en_US cause i cannot speak that lang) -languages it_IT,nu_IT,sar_IT # FIXME: Enable this once it actually works -add-mediaengine gstreamer # Features that are controlled via modules. -add-mediaengine cruxus -add-module bluetooth -add-module cell -add-module connectivity -add-module devtools -add-module essentials -add-module games -add-module inputmethods -add-module location -add-module media -add-module messaging -add-module pim -add-module pkgmanagement -add-module telephony -add-module ui # Device config -add-displaysize 480x640 -add-font dejavu_sans_condensed:8,10,12,13,16,28:50 -add-font dejavu_sans_condensed:8,10,13,14,15,16,20,21,23,32,36:75
[edit] Running 'make'
After configure script will finish its job you have to run make. This command will take a lot of time and a lot of your host resource.
Hack: If you use an old processor like the one Rex uses (AMD 2200 1.8 Ghz with 1GB RAM) it could be possible that you can spend till six hours to have your QtMoko. Rex suggest to enter runlevel 3 while compiling.
When make will finish you'll have inside your xx_YY folder some new files. These are the files you have to translate. Let's have a look at that. You can find lot of strings and definitions but to understand where to write your translation is simple:
Tips: if .ts files are not generated, you should try (in your qtmoko/ path) : ./bin/qbuild lupdate
user@Zero [qtmoko] : cat i18n/it_IT/QtopiaRingTones.ts
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS>
<TS version="2.0">
<context>
<name>Content</name>
<message>
<location filename="../../src/server/main/tr26862.cpp" line="1"/>
<source>alarm</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../src/server/main/tr26862.cpp" line="2"/>
<source>phonering</source>
<translation type="unfinished"></translation>
</message>
</context>
</TS>
You have to insert you translation where translation tag is shown. Thus your new file may be like this:
user@Zero [qtmoko] : cat i18n/it_IT/QtopiaRingTones.ts
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS>
<TS version="2.0">
<context>
<name>Content</name>
<message>
<location filename="../../src/server/main/tr26862.cpp" line="1"/>
<source>alarm</source>
<translation>Suoneria Allarme</translation>
</message>
<message>
<location filename="../../src/server/main/tr26862.cpp" line="2"/>
<source>phonering</source>
<translation>Suoneria Telefono</translation>
</message>
</context>
</TS>
To help you on translating you can use linguist application. You can launch it form your shell if a desktop link is not present in you menu.
The files in xx_YY are not the only files you need to translate. There are lot of applications that provides a .ts file to translate. At the end of make you can count these files to count and find them.
# To count files: user@Zero [qtmoko] : find . -name "*xx_YY.ts" | wc -l 71 # To locate files: user@Zero [qtmoko] : find . -name "*xx_YY.ts"
Translation takes long time. You have to buy some patience if yours is not sufficient. :) This step is so long... Hope you'll reach the end. If Rex did.. you can do it too..
[edit] Running 'make lupdate'
This command will generate some new files called .qm from your hacked .ts files. Qm file rappresents the correct way for QtMoko to read translations. You need to run this step everytime you change your translations.
[edit] Running 'make image'
If everything goes well this command will create your new QtMoko Image. This new image will be configured to use the languages you choosed on configure step. If you forgot to use -languages xx_YY as you wished please go back and read what you missed to do.
[edit] About international naming convention
I'm not an hero. Thus i SUGGEST to use a name folder composed by :
- first part: some chars of your language.
- second part: Country in which your language is spoken.
As example I take sardinian language. I mean.. Sardinia is a isle of Repubblica Italiana. There (here) you can talk in various languages like mine (Nuorese). If someone living in Sassari likes to translate in his slang I suggest him/her to use ss_IT. Something like this for a Casteddaio (Cagliari people) who can use something like ca_IT or something similar. Italy is my example, but I'm sure [radekp] or [fale] may translate Qt Moko in they own slang. :)
[edit] What else... ?
Nothing more. I hope you find useful this page and you can find some time to write me back what's your thinking on it or what your experience will be on doing translations.

