I think the mails on the list show that there is a lot of confusion about
how intltool (former xml-i18n-tools) works and how it can be used for our
purposes. We seem to agree that a simple XML format for the tips would be 
nice and extensible enough for future additions. What remains is the 
question how to translate the tips. I have looked at intltool in CVS and
it seems to me that the best way to handle i18n of tips is the following:

Keep the original english tips in a file gimp_tips.xml.in using a slightly
different format as the one we already outlined:

<?xml version="1.0" encoding="UTF-8"?>
  <tip name="welcome">
    <_content>Welcome to The GIMP</_content>

By using intltool-extract we can extract an intermediate header format 
listing the translatable strings. xgettext can then create po files from 
this header that can easily be translated using standard tools. These po 
files are then merged backed into gimp_tips.xml using intltool-merge. 
The result would look very much like the format Daniel proposed:

<?xml version="1.0" encoding="UTF-8"?>
  <tip name="welcome">
    <content>Welcome to The GIMP</content>
    <content xml:lang="de_DE">Willkommen zu GIMP</content>
    <content xml:lang="fr_FR">Bienvenue s<C3><A0>r GIMP</content>

The advantage is that translators can use their standard tools and can
decide to edit the po file in whatever encoding they like. The parser to
read this file should be pretty much straightforward including the 
language handling. This solution will require some Makefile fiddling, 
but as soon as everything is in place, it should work almost transparently.

The format I've outlined above still has one problem unrelated to i18n:
Do we want to allow paragraphs in tips for nicer layouting and how do 
we represent them? By adding a <para>...</para> tag ?!

Salut, Sven
Gimp-developer mailing list

Reply via email to