TRANSLATIONS OF MASHUP

The instructions here apply to the GUI interface (menus and dialogs).
For user guide translations, see below.

INTRODUCTION TO TRANSLATION FILES

Translation files for mashup are located as follows:
   /usr/share/mashup/locales/translate-lc.po.gz
   /home/<user>/.mashup/locales/translate-lc.po

The first file is the installed translation file for language "lc". 
It may be compressed (.gz ending). The 2nd file is an uncompressed 
copy that is placed in the user area when fotoxx is started for the
user <user> using the language "lc".

"lc" is a standard 2-character language code, e.g. "de" for German, 
or a combination language and region code formatted "lc_RC", e.g. 
"de_AT" for Austrian German. This code normally corresponds to the
locale of the computer, as shown by the command: $ echo $LANG

If there is no installed translation file for "lc", the user area
file /home/<user>/.mashup/locales/translate-lc is created for you.
This is a dummy file that translates English to English. You can use 
it as a template to replace English with your target language.

The file /home/<user>/.mashup/locales/translate-lc is the one you
should work with. It is user-owned and can be edited.

The .po file contains the English phrases used by mashup, with the
corresponding translations for language "lc" (or "lc_RC"). It can be 
edited with any text editor.

A typical translation in the .po file looks like this:
   msgid "The file name is: %s \n"
   msgstr "Der Dateiname ist: %s \n"

"msgid" is an English text needing a translation. "msgstr" is the
translation (German in this case). The special codes "%s" and "\n" 
are for inserted data and formatting. They must match in both type 
and sequence. 

A missing translation looks like this: 
   msgid "The file name is: %s \n"
   msgstr ""

TO REVISE A TRANSLATION

   1. Edit translate-lc.po to add or update translation strings.
   2. Save the modified .po file, replacing the original
      (rename the original to .po.old if you want to keep it).
   3. Option: compile the .po file to check for errors:
      $ cd /home/<user>/.mashup/locales
      $ msgfmt -v --check-format -o /dev/null translate-lc.po
   4. Run mashup and check how the translations look. If the 
      computer locale is not "lc" you can start mashup in the 
      target language with the command: $ mashup -l lc
   5. Send the modified .po file to kornelix2@gmail.com 
      so it can be included in future releases.

Step 3 is optional. The usual binary translation files (.mo) that are 
output by msgfmt are not needed by mashup. The translation source 
files (.po) are read directly by mashup, and changes made to a .po 
file are effective the next time mashup is started. Step 3 is useful 
to find errors (e.g. missing or non-matching format codes).

Whenever mashup is started from a terminal, missing translations 
are listed. 

PROBLEMS WITH LONG TRANSLATIONS

English can be terse compared to other languages (e.g. "undo" is
"Rückgängig machen" in German), and this can cause ugliness in the 
GUI layouts. Therefore try to make dialog labels and buttons short,
and look closely at the resulting GUI layout.

CONTEXT DEPENDENT TRANSLATIONS

Sometimes the same English text will need multiple translations that
depend on context. A simple example is "save file" when used on a
toolbar button or in a menu. On the button the translation should be
short, but there is no limit for the menu. In German, this could be
"speichern" for the button and "in eine Datei speichern" for the menu.
The standard method to do this in Gnu gettext is fairly horrible, but
since mashup reads the source translations (.po files) instead of
the binaries (.mo files), a simpler method is available. The English
text may include an extra string to distinguish different contexts.
This context string is removed from the GUI output, so the user does 
not see it. The context string is any short string followed with the
special marker "::". To continue our example, the translate-lc.po 
file might look like this:
   msgid "save file"
   msgstr "in eine Datei speichern"
   msgid "toolbar::save file"
   msgstr "speichern"
In English, mashup would show "save file" for both cases, and in 
German "in eine Datei speichern" or "speichern".

USER GUIDE TRANSLATION

The user guide is normally found here:
   /usr/share/mashup/data/userguide-lc.html  (or -lc_RC.html)

The file is a text HTML file, which may be edited with any HTML editor.

If a file with the region code is present, this file is used by mashup, 
otherwise the standard language version is used. If this is not found, 
the English file (userguide-en.html) is used.

If you make a new or revised translation, please send it to 
kornelix2@gmail.com  so it can be included in future releases.


