TRANSLATIONS OF FOTOXX

The instructions here apply to the GUI interface (menus and dialogs).

There are two GUI translation files (assuming a default installation):
   /usr/local/share/fotoxx/locales/xx/fotoxx.po
   /usr/local/share/fotoxx/locales/xx/zfuncs.po

"fotoxx" is the main program and "zfuncs" is a collection of utility 
programs. "xx" is the 2-character language code: de, es, fr, etc.  
These two .po files contain the English phrases used by fotoxx and 
zfuncs with their corresponding translations. They can be edited with 
any text editor or one of the special editors for .po files.

GNU "gettext" tools can be used to initialize translations (.po files) 
and audit them for errors. The translation source files (.po) are read 
directly by fotoxx, and the compiled binary files (.mo) are not needed. 
Changes made in a .po file are immediately effective.

To change or add-to existing translation files:

1. Edit fotoxx.po and zfuncs.po to add or update translation text.
2. Open a terminal window and go to the location of these files.
3. Compile the .po files to check for errors (optional):
   $ msgfmt -v --check-format  -o /dev/null  fotoxx.po
   $ msgfmt -v --check-format  -o /dev/null  zfuncs.po

After testing how the translations look in the fotoxx GUI, please send 
the modified .po files back to me to be included in the next release.
(kornelix@yahoo.de)

To add a new language:

1. Move the source program files fotoxx-N.N.cpp and zfuncs.cpp from 
   the release tarball into some convenient directory.
2. Create template files (.pot) from source programs (.cpp)
      $ xgettext -s --keyword=ZTX -o fotoxx.pot fotoxx-N.N.cpp
      $ xgettext -s --keyword=ZTX -o zfuncs.pot zfuncs.cpp
3. Convert template files to format used for translation (.po):
      $ msginit -l xx -o fotoxx.po -i fotoxx.pot
      $ msginit -l xx -o zfuncs.po -i zfuncs.pot
   "xx" is the 2-character code for the new language.
   If asked for an e-mail address, reply with Enter to ignore this.
4. Edit the two .po files to insert translations for all text strings.
5. Create an installation directory for the translation files:
      /usr/local/share/fotoxx/locales/xx
6. Move the two .po files into the installation location:
       /usr/local/share/fotoxx/locales/xx/fotoxx.po
       /usr/local/share/fotoxx/locales/xx/zfuncs.po
7. Run fotoxx and inspect the GUI outputs.

English can be terse compared to other languages (e.g. "undo" becomes 
"rückgängig machen" in German), and this can cause ugliness in the 
GUI layout. Therefore try to make the menus and buttons short.

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 toolbar button and "Datei speichern" for the menu.
The standard method to do this in Gnu gettext is fairly horrible, but
since fotoxx reads the source translations (.po files) instead of
the binaries (.mo files), a simpler method is available. The English
text may have a context string pre-pended, which can be used to 
distinguish multiple translations. The context string is suppressed in
the GUI output, so the user does not see it. To continue our example,
the two text strings "save file" and "toolbar::save file" would be
included in the fotoxx.po file, with their respective translations
"Datei speichern" and "speichern". The user would see "save file" and
"save file" in English, and "Datei speichern" and "speichern" in
German.

User Guide translation:

Translation of the User Guide would be welcome, but this is a big job. 
It also needs to be done with an HTML editor (I used SeaMonkey). 
An option would be to translate the "Quick Guide" section at the 
beginning (< 100 lines), and leave the rest in English. You could also
use any text editor and send me the text, and I would do the HTML part.


