Semantic marking for i18n
Chusslove Illich
caslav.ilic at gmx.net
Sun Apr 22 22:33:31 BST 2007
Some time ago, there was a discussion(*) about marking arguments to i18n'd
messages in a way that allows automatic formatting features, for better
visual consistency. E.g. a file paths could be always displayed bold, and so
on. The desired convergence would be to formatting-free messages (having no
rich text tags, and no quotes).
The discussion was a bit of a furball, but either way we need to decide on one
thing: how will the programmers mark arguments? I present two options:
i18n("Delete %1?", i18nFilename(file)); // by wrappers
i18n("Delete <filename>%1</filename>?", file); // by tags
Wrappers mean support from the compiler for the programmers, and tags mean
giving extra context to the translators. Tags may also be introduced for
non-argument related stuff, e.g. "<emphasis>Really</emphasis> delete
<filename>%1</filename>?".
I'm in favor of tags because they are more general and expandable. They could
also be a subset of Docbook tags, so that there is nice match for translators
between messages and docs.
Finally, is semantic marking too big a bite at programmers' habits? Krazy
scripts could easily hunt visual formatting, i18n implementation could easily
strip it out with debug warnings. But, it is impossible to batch convert the
current code (grep through stable branch shows ~8000 messages with
tags/quotes).
(*) http://lists.kde.org/?t=115191373600001&r=1
--
Chusslove Illich (Часлав Илић)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20070422/f9c627e7/attachment.sig>
More information about the kde-core-devel
mailing list