GNOME Bugzilla – Bug 324343
Applet context menu options are not translated
Last modified: 2005-12-24 00:05:35 UTC
Distribution/Version: Ubuntu Breeze Steps to reproduce: 1- Add the applet to the GNOME panel 2- Right click on the applet icon 3- The context menu opens but the specific applet options are not translated to my system locale. General options like "Quit from panel" or "Move" are however translated correctly. In src/gnome-schedule-applet.xml the strings are marked for localization. In my locale (es.po) these strings are translated. So the problem must be other.
In reply to: bug 324547#2 One cannot use the same rules as the desktop file; with @INTLTOOL_DESKTOP_RULES@. I also tried @INTLTOOL_XML_RULE@ but this gives the wrong result(resulting in a long list with all translations in a list). I don't think it is the meaning that this should be done the same way. I don't know the syntax of a translated context file. In some way all the translations have to go into that file since we are not loading the text in any function. Perhaps the easiest would be to just set the label text in scheduleapplet.py and let it be translated there?
Well if you take a look to .xml files in gnome-applets, you can see that the file is <Root> <popups> <popup name="button3"> ... </popup> </popups> <Root> while in gnome schedule here is only <popup name="button3"> --- </popup> And maybe .server and .xml file should have the same name (well, it's all applets in gnome-applets do it, so...) PS please add a <separator/> between add and help items
Changing it to: <Root> <popups> <popup name="button3"> <menuitem name="show_main" verb="show_main" _label="_Manage tasks" pixtype="stock" pixname="gtk-properties"/> <menuitem name="add" verb="add" _label="_Add a task" pixtype="stock" pixname="gtk-new"/> <seperator /> <menuitem name="help" verb="help" _label="_Help" pixtype="stock" pixname="gtk-help" /> <menuitem name="about" verb="about" _label="A_bout" pixtype="stock" pixname="gtk-about" /> </popup> </popups> </Root> creates an empty context menu.
It loads the menu when using 'setup_menu_from_file' but it doesn't translate it.
Gaute I am testing several things and I am in a deadlock. Is setup_menu_from_file a function? From where do you call it? Anyway, I had a look at a similar applet (ontv). It doesn't use @INTLTOOL_XML_RULE@ and the xml file is installed as is, without merged translations. So I suppose the translations are linked at execution time.
yes, it is a function. It is called from the function 'create_menu' in src/scheduleapplet.py line 122. http://cvs.gnome.org/viewcvs/gnome-schedule/src/scheduleapplet.py?rev=1.11&view=markup
Fixed. Thanks to johans at #gnome-hackers at gimpnet.