Review Request 113218: Enable translation functions for js script loaded through Kross

Luigi Toscano luigi.toscano at
Mon Oct 14 22:28:27 BST 2013

This is an automatically generated e-mail. To reply, visit:

(Updated Oct. 14, 2013, 9:28 p.m.)


This change has been marked as submitted.

Review request for kdelibs.

Repository: kdelibs


Bit of background: Account Wizard in kmail uses few js/es scripts (QScriptEngine) which are loaded using Kross. They expose one string each (but there could potentially more strings) which are visibile in the user interface but not translated. See for example:

QScriptEngine supports functions using functions like qsTr:
but the engine should be initialized, otherwise they are not recognized. The patch addresses this problem.

I think this is a bugfix which should go into Platform 4.11.

Frameworks: currently Kross uses QScriptEngine, so this should be easily merged there (I didn't try). If QScriptEngine is replace by QJSEngine, this issue should be addressed as well; a brief check in the documentation does not show any installTranslatorFunctions() method, but maybe the translation functions are now always exposed in the JS engine.


  kross/qts/script.cpp 41d46b2 
  kross/qts/main.cpp 041c306 



It compiles, and qsTr is recognized when loading the scripts in kmail.


Luigi Toscano

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the kde-core-devel mailing list