[Qgis-developer] plugin translation

matteo matteo.ghetta at gmail.com
Sun Mar 20 12:06:17 PDT 2016


Hi Richard,

> Hi Matteo,
> does your plugin have something as a helper function like this one
> (created by the plugin builder):

actually yes.. the plugin has been created with the plugin creator..
I have both the code lines you posted.. but it seems that the ts files
doesn't read all the Menu and Submenus..

I tried to do something like that:

* old string

self.actionProgramLocations = QAction(u"&Program &Locations",
self.iface.mainWindow())

* new string (with self.tr)
self.actionProgramLocations = QAction( self.tr(u"&Program &Locations"),
self.iface.mainWindow())

re-run lupdate but in Qt Linguist I cannot see the new entry...

should I investigate in this way or do you think I am completely wrong?

Thanks for the help!

Matteo


More information about the Qgis-developer mailing list