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

Ian Wadham ianw at netspace.net.au
Fri Dec 5 08:33:11 CET 2003


Can anyone help me with this?  Or have I found a bug?

One of the translators has recently pointed out that
strings appearing in KGoldrunner, which is due for
release in KDE 3.2, are -not- appearing in the .pot
and .po files.  That is because they are names and
descriptions of games or names and hints for levels.
Those strings are in data files and don't get into the
make-messages processing for .cpp files.  That's not
the problem.  I am generating a data_mesages.cpp
file from the data files and that file goes into the .pot
and .po OK when I am testing.

I've set up an environment for "translating" from en
(US English) to en_GB (UK English) and the system
translates correctly according to what I have put in
my test en_GB.po file, as long as the strings are pure
ASCII.  If I write i18n("Krueger") in my code, it
comes back translated to something else, as expected.

If I write i18n("Krüger"), it comes back -untranslated-
as "Krüger" and is displayed as "Krüger".  "ü"
is UTF-8 code for "ü", and i18n requires UTF-8 code
as input (see /opt/kde3/include/klocale.h).

It appears that -no- English string containing the name
of KGoldrunner's original author will get translated to
another language.  That may also be true if I write a
borrowed word with its correct accent (e.g. resume
with an e-acute).  Is there an example somewhere in
KDE of an English message containing a non-English
non-ASCII word getting translated into other languages?

Can anybody help?  I don't think there's much time
left to solve this problem.  I am using KDE 3.1.1
and Qt 3.1.1.

All the best, Ian W.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.kde.org/pipermail/kde-games-devel/attachments/20031205/3cb46553/attachment.html


More information about the kde-games-devel mailing list