From: Bjoern V. <bj...@cs...> - 2006-03-28 21:03:34
|
Hello! Vincent van Adrighem <adr...@gn...> wrote: > This simple translation problem is slowly turning into a fundamental > problem, eh? Hmmm, just thinking out loud here: Would it be possible > to pipe the server message through gettext? We could then, for > example, translate the three most used messages. And when they change, > they will be English again, but the user might be able to do something > with the info. that, in combination with some hiding, would be a > (albeit very hackish) workable situation, right? I repeat, just > thinking out loud. Yes, this is possible. I tried to explain it in my first mail in this thread: | (4) write a dummy translation string for this message |=20 | (something like=20 | | char *server_comment_dummy=3DN_("Find a contact [...] wild " | "card searches (%)"); | if(instructions =3D=3D=3D server_comment_dummy)=20 | instructions2=3D_(server_comment_dummy); | else | instructions2=3Dinstructions; | | of course this is pseudo code, not C) | | This only makes sense, if the server search comment is more or less | a standard comment. Also we can look for a list of "standard" Jabber server comments and translate them. Can someone give me a good list of Jabber User Directories? (I only know users.jabber.org). It's not much work to query all this servers for their User search comments using Gaim.=20 Gettext automatically selects the original language (in most projects this is English) if it doesn't find the translation of the string in the catalog. Gettext needs to do this because often translations are more or less incomplete (look at http://gaim.sf.net/i18n for example) and programs normally should not crash on an incomplete string. (A little i18n story: I recently visited a bug tracking system with a browser with German language preference. The web-site crashed with a Java exception. The web-master told me, that a missing translation caused the Java exception. gettext() silently ignores missing translations, Java's standard localization method throws an exception which _can_ crash the whole application if not handled.) So in German locale gettext("Hello World") is "Hallo Welt" if the German translator has translated "Hello World". Otherwise gettext("Hello World") returns "Hello World". Greetings, Bj=F6rn |