Author Topic: README  (Read 10339 times)

mean

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 10946
README
« on: July 12, 2007, 05:21:02 PM »
Please use this forum to post a link to new translations or translation updates (http://www.mytempdir.com offers free file hosting).

If a thread doesn’t already exist for your translation, please create a new thread with the name of your translation as the subject heading, e.g. Serbian (Cyrillic).

Below are instructions on how to create and update an Avidemux translation.


Translation prerequisites
To create or update an Avidemux translation you first need a gettext catalogue editor.

The GNU gettext toolset contains everything you will need for creating and updating translations.  You will also need gettext-tools if your system differentiates it from gettext-runtime.  Windows users can find pre-compiled versions of gettext at any GNU mirror.

If you prefer to use a graphical user interface then poEdit should be adequate for most tasks.  However, these instructions only cover the GNU gettext toolset.


Translation template
All translatable messages for Avidemux are stored in a template file called avidemux.pot, which is available in the Avidemux SVN repository.  Due to the dynamic nature of this file, it can’t always be kept up to date and therefore you should update this file yourself before creating or updating your translation.

If you have downloaded the Avidemux source code from SVN and your system has a Bourne shell installed, run the update_pot.bash script from the avidemux/po folder.  This will create a new avidemux.pot file in the same folder.

Alternatively, you can download a recent version of avidemux.pot from here: http://www.razorbyte.com.au/avidemux.


Creating a translation
You will need to create a message catalogue for your translation, known as a po file.  Use gettext’s msginit tool to initialise a new message catalogue for your locale.  The following command creates a new message catalogue for a French language translation.

Quote
msginit –locale=fr –-input=avidemux.pot
A list of locale codes can be found here: ISO 639: 2-letter codes.

Open your po file with a text editor (or a translation tool like poEdit) and translate all the msgstr entries.  For example:

Before:
Quote
#: avidemux/ADM_audio/audiotimeline.cpp:83
#: avidemux/ADM_audio/audiotimeline.cpp:94
msgid \"Building VBR map\"
msgstr \"Building VBR map\"
After:
Quote
#: avidemux/ADM_audio/audiotimeline.cpp:83
#: avidemux/ADM_audio/audiotimeline.cpp:94
msgid \"Building VBR map\"
msgstr \"Construire le Time Map VBR\"

Updating a translation
As Avidemux changes over time your translation will become out of date.  To update your translation, make sure your avidemux.pot file is up to date and then run msgmerge to merge the message template into your po file.

Quote
msgmerge fr.po avidemux.pot –o fr.po

Compiling a translation
To try out your translation with Avidemux, compile it using the msgfmt tool.

Quote
msgfmt fr.po –o avidemux.mo
Copy your compiled translation, avidemux.mo to the appropriate locale folder.

For Linux, the French translation would be copied here: /usr/local/share/locale/fr/LC_MESSAGES
For Windows, the French translation would be copied to here: C:\\Program Files\\Avidemux 2.4\\share\\locale\\fr\\LC_MESSAGES