[Qgis-developer] translate shortcuts

Richard Duivenvoorde rdmailings at duif.net
Tue Sep 8 01:54:46 PDT 2015


On 07-09-15 16:50, jawensi wrote:
> Hello.
> 
> I want to translate a menu name which has a shortcuts when Alt key is
> pressed. 
> 
> /self.templMenu.setTitle(self.tr('&Templates'))/
> 
> The letter of shortcuts is defined with symbol '&'. In my example the menu
> name is 'templates' and when 'Alt + t' is pressed the menu is opened.
> 
> When I write the 'my_plugin_es.ts' file to translate it and then compile to
> 'my_plugin_es.qm', it desn't work. Any idea how I have to write the menu
> name in the 'my_plugin_es.ts' file?

Have a look in the 'QGIS plugin builder'-plugin sources or in it's
makefile. I had that one working with translations some time ago.

Regards,

Richard



More information about the Qgis-developer mailing list