[mythtv] i18n german

Leandro Dardini ldardini at tiscali.it
Fri May 16 22:45:09 EDT 2003


----- Original Message ----- 
From: "Peter" <l-case at gmx.net>
To: <mythtv-dev at snowman.net>
Sent: Friday, May 16, 2003 4:43 PM
Subject: [mythtv] i18n german


> Hello,
>
> can someone point me how i can make a german translation for the xml
files??
>
> Perhaps it would nice to make an general doc how to make a translation for
> mythtv :) so every user can contribute his language.
>
> Bye Peter

There isn't any guide on "how to add a translation", but it is fairly
simple:
Choose the module you want to internationalize, go into the i18n directory
and edit the file "translate.pro" adding your preferred language in the very
last row. For German, you'll get something like:

TRANSLATIONS = mythfrontend_it.ts mythfrontend_es.ts mythfrontend_ca.ts
mythfrontend_de.ts

I assume you want to translate the main module, mythtv.

Now you have to let "lupdate" generate the mythfronted_de.ts file. Just
issue a:

lupdate translate.pro

and you get a mythfronted_de.ts full of "unfinished tag" like...

<!DOCTYPE TS><TS>
<context>
    <name>GuideGrid</name>
    <message>
        <source>Recording Once</source>
        <translation type="unfinished"></translation>
    </message>
    <message>

Now erase the type="unfinished" part and add the translated text between
<translation> and </translation>

Refer to other *.ts file if you have trouble.

After editing all or partly the file, compile it with a

lrelease translation.pro

Now you have a translate_de.qm ready to be copied in
/usr/local/share/mythtv/i18n (or whatever is your configuration path).

If you plan to release a patch for your language, edit Makefile and add the
following line (for german) in the install_trans: section

 -$(COPY_FILE) "mythfrontend_de.qm"
"$(INSTALL_ROOT)/usr/local/share/mythtv/i18n/"

Now you have done half of your work. You have translated the c++ part of
mythcode, now you have to translate the xml part.
Go in the themes directory and for each theme you'd like to translate edit
the *.xml file and look for tag like "<value lang=" and add the row for your
language.

Now a make install will copy the modified theme file in the configuration
directory.

Before this, edit the file at

programs/mythfrontend/globalsettings.cpp

and look for the "addSelection("Italian", "IT");" rows and add the one for
your language.

make && make install

Ramon, point out if I miss something... my little baby is screaming and I
have to cut shortly

Leandro








More information about the mythtv-dev mailing list