Wrapping up about KI18n and UIC

Chusslove Illich caslav.ilic at gmx.net
Sun Nov 17 18:39:30 UTC 2013


> [: Stephen Kelly :]
> If such calls are generated by uic, then that is a bug in Qt (which should
> have been reported years ago), and should be fixed in Qt, right?

Maybe, I'm not sure of the conventions of Qt Linguist. For Gettext-based
system, empty string will not result in empty translation, but in the
complete PO header, which is almost never intended. Certainly never within
an UI file.

> How would anyone know what to define it to? You said before it is not
> always the target name. How would someone know whether to make it the
> target name or not?

The programmer picks the translation domain name however desired (only it
must not match any other translation domain anywhere in the world; just like
an executable name). For a small application named with single pure-ASCII
word, for example, it is typically chosen as the all-lowercase name of the
application. The programmer may choose to have any number of translation
domains, covering different parts of the code, depending on its size and
organization.

> When should semantic markup be used or not? I mean, how would someone
> using the macro know whether to specify that tr2i18n or tr2xi18n should be
> used?

The programmer decides whether to use semantic markup or not, based on
personal convenience and aesthetics. The default should be no semantic
markup (tr2i18n), hence the flag type argument to activate it if desired.

(Of course, everywhere above "the programmer" can be replaced with "the
maintainer" or "the developer consensus".)

-- 
Chusslove Illich (Часлав Илић)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20131117/05120fb9/attachment.sig>


More information about the Kde-frameworks-devel mailing list