Translating scripted applets

Petri Damstén petri.damsten at
Fri May 29 07:25:40 CEST 2009


Continuing testing python applets and trying to get translations working. I 
tried contents/locale/fi/LC_MESSAGES/ but it didn't work before I 
added following code. Is this correct fix or should I use something else for 
po file names?


Index: applet.cpp
@@ -2271,6 +2275,7 @@
         //FIXME: we should _probably_ use a KComponentData to segregate the 
         //       from each other; but I want to get the basics working first 
         KGlobal::dirs()->addResourceDir("locale", translationsPath);
+        KGlobal::locale()->insertCatalog(package->metadata().pluginName());

     QString xmlPath = package->filePath("mainconfigxml");

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
Url : 

More information about the Plasma-devel mailing list