Translation

From MythTV

Jump to: navigation, search

I use as an example the German translation file. Dont forget to use it also for the plugins.

Contents

Checkout the svn version

svn co http://svn.mythtv.org/svn/trunk

Go to the mythtv/i18n directory. All remaining steps will be done in this directory.

Update translation files

Run lupdate translate.pro. This will ensure that all translatable strings in the source code are included in the .ts file we will work on later.

Translate

Translate .ts file, e.g. mythfrontend_de.ts (for German)

You can use any editor for this, but it is most convenient to use the tool Linguist included in Qt (on Debian, this is found in the qt4-dev-tools package).

linguist mythfrontend_de.ts

Compile translation

lrelease translate.pro

make install

After restarting the frontend, you can test your translations. If all is OK you can proceed.

Create Diff

svn diff mythfrontend_de.ts > translation.diff

Submit the Patch

Submit the Diff to trac, via the URL: http://svn.mythtv.org/trac/newticket

Summary: [PATCH i18n] $LANGUAGE translation

Translate the plugins

Now back out of the mythtv directory, enter mythplugins, and each plugin's i18n directory, eg:

cd ../..
cd mythplugins/mythvideo/i18n

and repeat the above steps (beginning with "Update Translation Files") to translate each plugin.

Translate the Menus

Translation of menus are now done through QT/Linguist as well. However, in the past, menus were translated through individual *.xml theme files.

Translation in *.xml files are now deprecated, but these deprecated translations still exists for a lot of languages in MythTV. Since the *.xml translations have higher priority than the QT/Linguist translations, the old translations should be deleted from the *.xml files in order to let the new QT/Linguist translation become active.

You can find the XML-translations in:

mythtv/themes/*/*.xml
mythplugins/*/theme/menus/*.xml

You can use the following grep command to find these old translations (this example uses Germany - "DE"):

mythtv:

grep -H -i 'lang="DE"' mythtv/themes/*/*.xml

mythplugins:

grep -H -i 'lang="DE"' mythplugins/*/theme/menus/*.xml

If you get no output from the above commands, all old XML-translations are already deleted.

Personal tools