[Kde-games-devel] Parsing and translating XML game-data
Ian Wadham
ianw2 at optusnet.com.au
Sun Dec 3 01:42:43 CET 2006
Oops! Sorry Burkhard and Jason. My email program is
misbehaving and doubling up on replies to the list.
Thanks for your suggestions about escapes and CDATA,
but I had already looked at those alternatives before I
started this thread. Basically I like Josef's solution of
using output to a QString via a QTextStream, with the
refinement of using QDomElement::save() to omit
indentation spaces.
That gives me programming that is simple, straightforward
and easy to read and maintain. More importantly, the text
is always in the same simple and reasonably readable form
(for humans), whether it is in my game file, in a .po file
extracted for the translators or in a C string to be passed
to i18n(), translated if required and then displayed.
I do not think "<b>not</b>" is either simple or
readable and I found the CDATA syntax a bit strange too.
Josef has raised a doubt as to whether translators will find
the occasional piece of HTML "rich text" difficult, but I
have already had a few instances in the program messages
in KGoldrunner for several years and there has been no
problem in translating them so far. Mind you, if word
order or phrasing has to change during translation, the
tags might have to be re-arranged ... e.g.
It is <em>not</em> possible. (English)
Ce <em>n'est pas</em> possible. (my fractured French)
Ce n'est <em>pas</em> possible. (a Frenchman might say)
And maybe some human language scripts cannot have
emphasised forms (Chinese? Hindi? Arabic?). Dunno.
All the best, Ian W.
More information about the kde-games-devel
mailing list