-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/113218/
-----------------------------------------------------------

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


Status
------

This change has been marked as submitted.


Review request for kdelibs.


Repository: kdelibs


Description
-------

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:

https://projects.kde.org/projects/kde/kdepim-runtime/repository/revisions/master/entry/resources/imap/wizard/imapwizard.es#L24

QScriptEngine supports functions using functions like qsTr:
http://qt-project.org/doc/qt-4.8/scripting.html#internationalization
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.


Diffs
-----

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

Diff: http://git.reviewboard.kde.org/r/113218/diff/


Testing
-------

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


Thanks,

Luigi Toscano

Reply via email to