Escaping string arguments in i18n

Chusslove Illich caslav.ilic at
Sun Jun 15 18:04:57 BST 2008

> [: Oswald Buddenhagen :]
> a halfways clean solution would be introducing explicitly auto-escaping
> i18n variants (yay, even more of them). not sure though [...]

That would move from current 8 of them to 16 :)

And if programmer anyway has to think of when to use it, is Qt::escape
really that verbose? I.e. I'd say keeping the difference in mind and making
a choice is much more difficult than particular syntax afterwards.

> [...] as to handling it on a case-by-case basis, i think a krazy check
> should be reasonably simple to create.

Krazy checks would make it that more easier, but I've no idea how it could
be done reliably :)

A bit relaxed unconditional auto-escaping should work though, with some
wriggling in order of replacements for rare cases. I mean, this is not
general placeholder replacement like for QString, but every final i18n'd
string should be made out of proper markup, or escaped. It's the behavioral
change to 4.0 that concerns me the most.

Chusslove Illich (Часлав Илић)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
URL: <>

More information about the kde-core-devel mailing list