--===============5139287161940086145== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit ----------------------------------------------------------- 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 > > --===============5139287161940086145== Content-Type: text/html; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit
This is an automatically generated e-mail. To reply, visit: http://git.reviewboard.kde.org/r/113218/

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 October 12th, 2013, 3:09 p.m. UTC, Luigi Toscano wrote:

Review request for kdelibs.
By Luigi Toscano.

Updated Oct. 12, 2013, 3:09 p.m.

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.

Testing

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

Diffs

  • kross/qts/script.cpp (41d46b2)
  • kross/qts/main.cpp (041c306)

View Diff

--===============5139287161940086145==--