Hi Richard (and all),
I'm still fighting with the menu translation of the plugin..

I read the Qt Documentation and other related questions in forums, but
I'm still struggling.

It seems that, as you said, the tr function should do the magic, but it
won't..

I found out that with the main menu the method
QCoreApplication.translate is used while with the submenus nothing is
used.. for example:


#main menu
self.menu.ModelSetUp_menu =
QMenu(QCoreApplication.translate("my_plugin", "Model Setup"))

#submenu of menu "model Setup"
self.actionProgramLocations = QAction( "&Program &Locations",
self.iface.mainWindow())



I tried to add the tr function in both, like

self.menu.ModelSetUp_menu = QMenu(self.tr("my_plugin", "Model Setup"))

#submenu of menu "model Setup"
self.actionProgramLocations = QAction( self.tr("&Program &Locations"),
self.iface.mainWindow())


and then updated pro file.. but in the final ts, these strings are not
taken into account..


I also tried to find other plugins that maybe have implemented this menu
translation function, but I did not find anything (just the UIs and
their strings translated, but not the menus)...

Somebody has an idea on how to implement that?

Thanks for the help

Cheers

Matteo
_______________________________________________
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer

Reply via email to