i18n in Plasma [Was Re: Minutes Monday Plasma hangout]

Martin Gräßlin mgraesslin at kde.org
Mon May 5 12:39:12 UTC 2014


On Monday 05 May 2014 13:10:44 Sebastian Kügler wrote:
>   - Discovered problems in Kwin and Plasma localization (to be discussed on
> mailinglist)

ok, so with frameworks i18n changed a bit. I highly recommend to read the 
documentation in [1].

Things to be done are:
* set KLocalizedString::setApplicationDomain [2] in the application, never in 
libs
* for libraries (this includes plugins!) set in CMakeLists.txt:
   add_definitions(-DTRANSLATION_DOMAIN=\"nameofcatalog\")
   for an example see [3]
* for ui files one needs to use ki18n_wrap_ui - for an example also see [3]
* ensure that every component has Messages.sh

Things I do not know yet:
* how to handle qml, this also needs the translation domain, but no idea how 
to set it.
* how to handle ui files which are loaded at runtime
* how to test an application with translations

After adjusting KWin I have a bad feeling that we have to audit all components 
for i18n usage. Everything will need adjustments, especially the plugins. 
Though this should be said: it's way simpler and more intuitive than it used 
to be in kde4.

Cheers
Martin

[1] http://api.kde.org/frameworks-api/frameworks5-apidocs/ki18n/html/prg_guide.html
[2] http://api.kde.org/frameworks-api/frameworks5-apidocs/ki18n/html/classKLocalizedString.html#ad866b11bf396b9d93b7dc313a1930b7b
[3] http://commits.kde.org/kwin/1c2f27945c8c50612a75cec6cb773a710b6fad15
-------------- 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/plasma-devel/attachments/20140505/f0621982/attachment-0001.sig>


More information about the Plasma-devel mailing list