Hello,<br><br>I would like to provide translations to my script in a proper way <a href="http://kde-apps.org/content/show.php?content=113293" target="_blank">http://kde-apps.org/content/show.php?content=113293</a><br>So I followed this <a href="http://doc.qt.nokia.com/4.5/qtscript.html#internationalization" target="_blank">http://doc.qt.nokia.com/4.5/qtscript.html#internationalization</a><br>
and I have done this :<br>replaced all my string in my script "mystring" by qsTr("mystring") in my main.js file <br>made a CopyCover2.pro file with this<br>SOURCES += main.js<br>FORMS += copycover2.ui<br>
TRANSLATIONS +=main_fr.ts<br>TRANSLATIONS +=main_es.ts<br><br>then <br>I did lupdate -verbose CopyCover2.pro to generate .ts files<br>I completed those files and did a lrelease CopyCover2.pro to generate main_es.qm main_fr.qm<br>
And then a relaunch amarok but I had this error<br>SCRIPT "CopyCover2" : "ReferenceError: Can't find variable: qsTr" <br>(it is from this line in my script : Amarok.Window.addSettingsMenu("cpcoverset",qsTr("CopyCover2 Settings"),"configure"); )<br>
<br>If I remove this qsTr amarok then does not complain about other qsTr but then I have no translations..<br>I tried to rename a qm file to main.qm but still no translations!<br>what is weird is that without the qsTr in Amarok.Window.addSettingsMenu my script does its work but I have no messages!<br>
<br>So I am looking for some advices.<br>Thanks by advance.<br>Regards,<br><br>Sylvain Paré (aka GarthPS)<br>