i18n in SportsTracker
---------------------

The internationalization is done using the Catalog class from Edd Dumbill, the latest
version can be downloaded at: http://usefulinc.com/edd/blog/contents/2004/05/Catalog.cs .
All the text resources in the GUI needs to be get with Catalog.GetString (). 

The following steps needs to be done for preparing and creating the translations:

- Extraction of the text from source code and glade file:
  => call "make pot" 
  ("xgettext src/SportsTracker/Gui/*.cs resource/sportstracker.glade -o po/sportstracker.pot")

- Create a copy of "sportstracker.pot" for each locale, e.g "de.po".

- Fill the header of the .po file, the charset needs to be UTF-8,
  also save the file in this format with the editor !!!

- Translate the complete .po file.

- Compile .po file (message catalog) to .gmo file (binary format).
  => call "make gmo" 
  (e.g. "msgfmt po/de.po -o po/de.gmo")

- Move the generated .gmo file to /usr/share/locale/$LOCALE/LC_MESSAGES/sportstracker.mo,
  where $LOCALE is for the translated locale (e.g. de). The file name needs to be the same
  as the name used for gettext initialization (e.g. sportstracker.mo).
  => call "make install" for it 
  
When the source code or the glade file was changed:

- create a new .pot file first => call "make pot"

- use the tool msgmerge to combine the old .po file with the new created .pot file
  => call e.g. "msgmerge -o de-new.po de.po sportstracker.pot"

- update the new .po file:
  - update header informations
  - translate all new (empty msgstr) strings
  - check and correct all translations marked as fuzzy (remove the fuzzy marks after that)

- replace the old .po file with the new one and create new .gmo file for it ("make gmo")

Open questions:

- Why is it not possible to copy the mo files to /usr/share/locale/de/LC_MESSAGES 
  when the application is installed in /usr/local/bin ?

  In e.g. Python there's also a bindTextDomain() method for glade, so libglade works 
  fine there. Such a method is not in Mono.
  Edd Dumbill also does not know a solution, I should ask on the libglade mailing list.


Stefan Saring
2004/07/05

