QtScript Internationalization support of amarok script
Sylvain Paré
sylvain.pare at gmail.com
Wed Mar 9 13:53:24 CET 2011
Hello,
I would like to provide translations to my script in a proper way
http://kde-apps.org/content/show.php?content=113293
So I followed this
http://doc.qt.nokia.com/4.5/qtscript.html#internationalization
and I have done this :
replaced all my string in my script "mystring" by qsTr("mystring") in my
main.js file
made a CopyCover2.pro file with this
SOURCES += main.js
FORMS += copycover2.ui
TRANSLATIONS +=main_fr.ts
TRANSLATIONS +=main_es.ts
then
I did lupdate -verbose CopyCover2.pro to generate .ts files
I completed those files and did a lrelease CopyCover2.pro to generate
main_es.qm main_fr.qm
And then a relaunch amarok but I had this error
SCRIPT "CopyCover2" : "ReferenceError: Can't find variable: qsTr"
(it is from this line in my script :
Amarok.Window.addSettingsMenu("cpcoverset",qsTr("CopyCover2
Settings"),"configure"); )
If I remove this qsTr amarok then does not complain about other qsTr but
then I have no translations..
I tried to rename a qm file to main.qm but still no translations!
what is weird is that without the qsTr in Amarok.Window.addSettingsMenu my
script does its work but I have no messages!
So I am looking for some advices.
Thanks by advance.
Regards,
Sylvain Paré (aka GarthPS)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.kde.org/pipermail/amarok-devel/attachments/20110309/77922ba7/attachment.htm
More information about the Amarok-devel
mailing list