[Kde-games-devel] Cannot get i18n() to translate stringscontaining UTF-8 bytes

Ian Wadham ianw at netspace.net.au
Fri Dec 5 22:32:52 CET 2003


----- Original Message ----- 
From: "Albert Astals Cid" <tsdgeos at terra.es>
> Maybe this is a bug, i'm not sure, but is this a problem to you? I mean,
Marco
> Krüger is the name of a person, AFAIK people's names should not be
> translated, so maybe you found a bug but i don't see why do you want
"help".
> Am i missing something?
>
When KGoldrunner is running, the game names and descriptions and
level names and hints are retrieved from data-files and stored temporarily
in variables.  The variables are displayed on-screen whenever required.
Those strings are not parsed or interpreted by KGoldrunner.

You can write KMessageBox::...(..., i18n(aboutGame)); and it works ...
the description of the game gets translated if a translation is available,
otherwise it is displayed in English.  But one game description contains
Marco Krüger's name (he and his friends wrote those levels) and that
string does not get translated, even when a translation is available.
There is a similar problem with KMessageBox::...(..., i18n(levelHint));
One of the levels (Initiation, level 97, Das Boot) is dedicated to Marco.

Of course, I could remove Marco from those data files and say
something in the About box ... or I could mis-spell his name as "Krueger"
(he occasionally uses that spelling himself on emails).  But I am trying
to be "international" and culturally sensitive here.

I gave examples using literals and just one name in my previous email
because I have narrowed the problem down to that level.  String
literals containing UTF-8 characters do not get translated, it appears,
even when a translation exists.  It's not a bug in the way I cast and
encode the string types in my variables.

All the best, Ian W.



More information about the kde-games-devel mailing list