[ghemical-devel] [ghemical-users] Translate Ghemical
Tommi Hassinen
Tommi.Hassinen at uku.fi
Fri Aug 29 05:25:39 EDT 2008
From: Jean Bréfort [jean.brefort at normalesup.org]
Sent: Friday, August 29, 2008 11:30 AM
To: Tommi Hassinen
Cc: Vlado Peshov; ghemical-devel at bioinformatics.org
Subject: RE: [ghemical-devel] [ghemical-users] Translate Ghemical
Just one question before starting: does ghemical/libghemical always use
glib (which have macros making things easier), I never played with that
without glib. Quicly reading configure.ac, seems that libghemical don't
use at all and ghemical only uses if built with gtk+ support.
Hello.
First about ghemical : it is designed to be a portable application, and it's good to try to keep it that way. Some time in the past I even had a win32-api-version of ghemical, but I have seen that I don't have enough time for keeping multiple versions of ghemical floating around. So now it's gtk+ only and that's enough because gtk+ is ported to windows (works fine I have tested that myself) and to Macs too (haven't tested this yet). But in ghemical, all source files with names gtk_* are gtk+ related and it's safe to use glib there. These files also contain code for the most visible GUI elements so it's natural to start there. For the rest of the source files, I just need to figure out something. I will probably add a "translator" class and force all texts go through it before displaying them ; then it can be either translated (if glib is available) or passed through as it is (in English).
Still getting everything translated takes time, because the text is now generated using "streams", for example like this:
cout << "Hello my name is " << my_name << " and I live in " << my_country << "." << endl;
And this is poorly suitable for translation! The text must be generated (correct me if I'm wrong) in printf-style like this:
printf("Hello my name is %s and I live in %s.", my_name, my_country);
And this is why the (complete) translation is going to take it's time : all texts must be converted to printf-style full sentences first, which then can be translated.
Then about libghemical : let's just leave it all into the future. The code in libghemical can display notice/warning/error dialogs and it can print information into the text log window. I will probably use the same solution in libghemical as for the non-gtk+ code in the ghemical application.
So in the beginning we could start the translation work from ghemical only.
Regards,
Tommi
More information about the ghemical-devel
mailing list