I've been looking over the gettext implementation, and I'm not sure that I
entirely like it, but let me know if this sounds like I've been programming
to long. (Maybe I'm misreading the document)
The gettext API uses strings as "msgid". What this means is that in order to
get a translated string, you might make a call like this:
char *err = gettext( "Can't mmap, code!\n" );
There would then need to be an entry in the "PO" file with a msgid that
matches this string. Does this sound strange? Not to sound like I'm set in
my ways, or anything (but I am ;-), but I myself would expect msgid to be a
#define'd numeric value.
Here's a condensed example of a gettext PO entry:
...
msgid "This feels strange\n" (this would be used in the gettext call)
msgstr "This feels weird\n" (this line would be what's returned)
and a call to the API would be:
char *label = gettext( "This feels strange\n" );
Sorry, but it just seems weird to me. Couldn't we do a better job of
implementing this, as well as creating a conversion system to convert PO
files to our format? We would not however, be compatible with the API. Is
this a bad thing?
Let me know if it's just me,
Grant M.