Wrapping up about KI18n and UIC
Chusslove Illich
caslav.ilic at gmx.net
Fri Nov 15 20:49:07 UTC 2013
> [: Aleix Pol :]
> I have been going through the list looking for what we should we do when
> it comes to .ui file generation and i18n.
I am confused by that too. Stephen's projected solution seems to me more
elegant in principle, but I couldn't quite get if (when) it would be able to
do all that is necessary.
> I'd suggest to revive jeremy's patch and adapting it to KF5 [1], I could
> help with that, but I'd like to know first if we agree that it's the best
> solution he have at the moment.
For this solution I would have the following points.
There is no need for separate ki18nuic.cmake file. Jeremy took this from KDE
4, but for this purpose that does more than necessary. The whole macro
should be located in KI18NMacros.cmake, and do only this on generated files:
* Make sure no empty-string calls appear, namely tr2i18n(""),
tr2i18n("", ""), tr2xi18n(""), tr2xi18n("", "")). I don't know if this still
needs post-generation search-replace or not.
* Include klocalizedstring.h.
* Define TRANSLATION_DOMAIN if requested (for library code). I meant this to
be an optional argument to the macro, but it could be done on the higher
level with add_definitions(-DTRANSLATION_DOMAIN=...). No idea which is
better.
* Select whether strings use ki18n semantic markup or not. I meant this to
be controlled through an optional flag-type argument to the macro, named
KUIT. If missing, uic would get -tr tr2i18n, and if present -tr tr2xi18n.
I would name the macro ki18n_qt_wrap_ui, because it is essentially a wrapper
for qt_wrap_ui.
--
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/20131115/bce0112c/attachment.sig>
More information about the Kde-frameworks-devel
mailing list