Bug 461026

Summary: Translation for tool and menu item not working if command uses translation
Product: [Eclipse Project] Platform Reporter: Lars Vogel <Lars.Vogel>
Component: UIAssignee: Dirk Fauth <dirk.fauth>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: dirk.fauth, halo1, heiko.neuweger, Lars.Vogel, max, MichaelGerlich
Version: 4.5Keywords: greatfix
Target Milestone: 4.5 M6   
Hardware: PC   
OS: Windows 8   
See Also: https://git.eclipse.org/r/42888
https://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=81d5449bd87bd5604d0e988fdc910796cf6c725e
Whiteboard:

Description Lars Vogel CLA 2015-02-27 04:13:00 EST
The command uses translation for example %commands.save

The HandledToolItem refers to the command (without defining its text again, Label is empty) and without defining a icon.

-> The key is not replaced.
Comment 1 Lars Vogel CLA 2015-02-27 04:13:39 EST
Dirk, can you have a look?
Comment 2 Lars Vogel CLA 2015-02-27 04:21:40 EST
Same for menu entries without label
Comment 3 Dirk Fauth CLA 2015-02-27 04:33:07 EST
Sorry, I don't understand that.

If I create a menu entry without a label, e.g. HandledMenuItem in a File menu in the main menu, then nothing will be shown. I am not aware of a feature that automatically sets the name of the command as label of a menu item.

I'm testing on Windows 7 and an empty menu entry is shown in that case. AFAIK you always have to specify the label of a menu or tool item.
Comment 4 Lars Vogel CLA 2015-02-27 04:37:33 EST
(In reply to Dirk Fauth from comment #3)
> Sorry, I don't understand that.
> 
> If I create a menu entry without a label, e.g. HandledMenuItem in a File
> menu in the main menu, then nothing will be shown. I am not aware of a
> feature that automatically sets the name of the command as label of a menu
> item.
> 
> I'm testing on Windows 7 and an empty menu entry is shown in that case.
> AFAIK you always have to specify the label of a menu or tool item.

Without translation the text from the command is used, if you do not specify a text on the menu / toolitem.
Comment 5 Eclipse Genie CLA 2015-02-27 06:03:40 EST
New Gerrit change created: https://git.eclipse.org/r/42888
Comment 7 Lars Vogel CLA 2015-02-27 08:11:37 EST
Thanks Dirk, looks good.