[mythtv] Re: i'm willing to help...

Stefan Frank sfr+lists at 6913304088794.gnuu.de
Fri Sep 12 22:26:41 EDT 2003


Hi Daniel,

support is always welcome. Read the howto below, and ask if you have
further questions.


>...but as i'm not a programmer, i only can offer help in translating
>some modules to german. so, i can edit the .ts file, but how can i
>generate a .qm file for testing?

It's recommended to use linguist, a the qt devel tool.
Install qt3-linguist if you use debian unstable.

> i want to test the stuff, before i
>commit it. how can this be done? and then, if it's done, should i commit
>only the .ts file? sorry for those stupid questions ;-)

Afaik you need to compile myth from source in order to use your updated
translations. Once you are finished just send a patch for an existing
.ts file to the -dev list.

This should get you started.

Bye, Stefan


Mini i18n howto:

Steps to add a translation to MythTV:

1.-Very first step, choos the language code.
Every language should match a two letter code, ie: English="EN",
Italian="IT", Spanish="ES". Look which two letter code is the appropiate for
the language that you would like to add. If you don't know you can setup
your own linux to that language and then look at "LANG" environment
variable, that will give you a clue.
2.- i18n directories.
Each part of the MythTV code (currently only mythtv and mythweather are
ready for it) will have a i18n directory. There, to add a translation, you
should:

2.1.-Edit "translate.pro" adding the file to be translated. For example, to
add Catalan (ca):

TRANSLATIONS  = mythfrontend_it.ts mythfrontend_es.ts
should change to:
TRANSLATIONS  = mythfrontend_it.ts mythfrontend_es.ts mythfrontend_ca.ts

Look to the existing entries at "TRANSLATIONS" as an example, ie, if you
want to add french, where do you see "mythfrontend_it.ts
mythfrontend_ca.ts..." add "mythfrontend_fr.ts" at the very ņast (to avoid
conflicts while cdommiting the changes), be carefull not to remove any
existing entry.

2.2.-Follow the same step described above, but for the i18n.pro file, in
this case at the "trans.files" entry, note that there the extension is .qm

2.3.-Having QT installed, execute:

$ lupdate translate.pro

That will create your "<program>_<lang>.ts" file within the working
directory. Now yo can edit it to translate your messages. You can do it
either with any editor, however I would recommend "linguist" from trolltech.
Will be likery already installed in your linux if you did install all Qt
packages.

2.4.-Once you have finished the tranlation, you should execute:

$ lrelease translate.pro

That will create your *.qm file.

2.5.-Install your translations at your mythtv install directory (change the
Makefile if you want) and then test your translation. Note that you have to
manually update the settings table at mythconverg database.
You can do it in any form that mysql accepts (phpMyAdmin, mysqlnavigator...)
however, to give an example from the mysql prompt:

mysql> use mythconverg;
Database changed.
mysql>update settings set data="CA" where value="Language"

Check here that everything is being displayed correctly, no trimmed
messages, etc, repeat from 2.3 if necessary.

3.- ui xml files.
Many messages within the MythTV application are distributed to several .xml
files. That's because MythTV is highly themeable, wich is good, but you
might want to translate those messages as well. To do it
you can simply find all the files hat have .xml as a extension, i.e. within
the mythtv root directory:

$ find . -name "*.xml" -print

That will give a complete list of all the .xml files (menus, ui, themes...).

Just go to each xml file and edit it. You'll probably find already
translated messages there, you can recognize them because they have the
"lang=XX" attribute (where XX is the language code). You can then simply
copy that line and create a new one. Then change the lang code to de new one
and translate the message. As an example:

Find "lang=" at the xml file.

If you find and entry like:
<value lang="IT">Registrazioni</value>
Go to the very end of the translated messages and add your one:
<value lang="IT">Registrazioni</value>
<value lang="CA">Gravaciķ</value>  <--- assuming that this is the new line
you just added.
Again, always add your new line after the last to avoid conflicts.

There is no need for any special modification to the makefiles to install
the new xml files to the working directory, to test you translation you
should simply run the mythtv "make install" as usual and then, test it.

4.-Setup dialog.
Add your language at globalsettings.cpp to be able to choose it from the
setup dialog.

5.-Packing and submiting your translation to the current CVS.
Once you are comfortable with your translation, diff your translated xml
files and patched .pro files with the current cvs. You can do it with:

cvs diff -u <file to be comparted>  > <file to be compared>.diff

Take a look to the generated .diff file to be sure that you are not
affecting by mistake any other translation/part of the code.

Create a compressed tar file with all your .diff, plus the
<program_language.ts> files and submit them to the mythtv developer list
(myth-dev at snowman.net). tar syntax is:

$ tar zcvf <file_to_be_created>.tar.gz <file1...> <file2...>

Note about colorized EPG:
To colorize the EPG accoirdingly to the listed categories in your country,
you might want also setup a color for each category at the ui.xml of each
theme that you would like use.
Personally I want to think on this:  (2 EPG * Languages * Possible
Categories * themes) = hundreds, if not thousands.

Maybe someone can review this (i'm not native english) or clarify some
points. In the meantime, I guess that's a good start for those who wish to
add a new language and therefore help to make the mythtv user community
larger ;-)

Ramon.


----- 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
>
> _______________________________________________
> mythtv-dev mailing list
> mythtv-dev at snowman.net
> http://lists.snowman.net/cgi-bin/mailman/listinfo/mythtv-dev
>
>
>

_______________________________________________
mythtv-dev mailing list
mythtv-dev at snowman.net
http://lists.snowman.net/cgi-bin/mailman/listinfo/mythtv-dev


-- 
It does me no injury for my neighbor to say there are twenty gods or no God.
It neither picks my pocket nor breaks my leg.

                                   -- Thomas Jefferson


More information about the mythtv-dev mailing list