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

Albert Astals Cid aacid at kde.org
Sat Oct 12 16:30:00 BST 2013


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


Makes sense to me, personally i'd like someone else to give a ship it, but if noone does in some time, just ping me and i'll do :D

- Albert Astals Cid


On Oct. 12, 2013, 3:09 p.m., Luigi Toscano wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/113218/
> -----------------------------------------------------------
> 
> (Updated Oct. 12, 2013, 3:09 p.m.)
> 
> 
> 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
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20131012/5c152ea2/attachment.htm>


More information about the kde-core-devel mailing list