Community
Participate
Working Groups
Build Identifier: e4 M4a Maybe this appear to othar Compatibility action to. I found that the action picks up the correct translation from the translation fragment but still appears as "preferences" in the UI. Maybe the text gets obverwritten somewhere ? Reproducible: Always Steps to Reproduce: 1. Create Preferences Action by ActionFactory 2. Throw in Babel translation 3. put breakpoint in action constructor 4. see that translation gets picked up 5. look at the ui representation - still english
I cannot reproduce this problem in my inner.
Im still confused when you talk about inner and outer. What do you mean with this ? I create the Action in ActionBarAdvisor
(In reply to comment #2) > Im still confused when you talk about inner and outer. What do you mean with > this ? Sorry, it's a terminology we use when developing plug-ins. The "outer" Eclipse is the one that you are actively working on, writing code, setting breakpoints, releasing code, and so on and so forth. The "inner" is the second Eclipse that gets opened when you hit (Ctrl+)F11 that you use for testing your changes to your plug-ins. Does that make sense?
thanks for clearing that up. you can't reproduce ? what can i do to help you ?
(In reply to comment #4) > you can't reproduce ? You can reproduce this in your inner, right? I presume so because you are setting breakpoints and I guess you're probably not doing remote debugging. > what can i do to help you ? At this point I think we should figure out where the string is coming from first. Perhaps set a conditional breakpoint in MenuItem's setText(String) method where the provided parameter contains the string "Preferences" or some variant of it (I say variant because it might be "&Preferences" or "P&references" or whatever, so the ampersand may make the conditional breakpoint slightly more complicated than it needs to be). After you trigger it and see the problem, perhaps poke around yourself or paste the trace here onto this bug.
must wait until weekend. have to create e4 branch because i stepped back on 3.6 for production release
(In reply to comment #6) > must wait until weekend. have to create e4 branch because i stepped back on 3.6 > for production release No problem, Thomas. I'll try to describe what I did to see if I'm missing something. 1. Downloaded BabelLanguagePack-eclipse-ja_3.6.0.v20101211043401.zip and unzipped into my I20101216-1305 4.1 SDK build. 2. Started Eclipse and checked my target platform to ensure the fragments were picked up. 3. Cloned my usual launch configuration and then ticked off all my language fragments. 4. Swapped the '-nl {target.nl}' to '-nl ja_JP' instead. 5. Started my inner and checked my 'Window' menu.
Try creating a minimal rcp app and craete the action in actionbaradvisor by the factory method. I don't know how it gets created in default eclipse.
(In reply to comment #8) > Try creating a minimal rcp app and craete the action in actionbaradvisor by the > factory method. I'll try to whip one up and see how it goes. > I don't know how it gets created in default eclipse. The IDE has a WorkbenchActionBuilder (which extends ActionBarAdvisor) and creates actions that way. ActionFactory.PREFERENCES is used directly. There may be something else that's different.
Created attachment 186181 [details] RCP project zip Here's the RCP project that I used to try to reproduce the problem.
I see. Have to debug this at the weekend. Can't see any difference.
Created attachment 186325 [details] stacktrace
I have a custom MenuManager MenuManager viewMenu = new MenuManager(Messages.getString("ApplicationActionBarAdvisor.window"), "de.eiswind.mango.menu.view"); //$NON-NLS-1$ //$NON-NLS-2$ viewMenu.add(prefAction); The MenuItem is created correctly first, but gets updated with the english text at the moment I click on my viewMenu to open the menu. Attached a screenshot of the call stack.
Thanks for the trace, Thomas. Since you call your menu a 'viewMenu', I just wanted to confirm if your menu is actually part of a menu in the menu bar or if it's a menu for a particular view, the one from the inverted triangle that shows up when you hit Ctrl+F10 (note that that keybinding won't work in 4.x).
Yes its actually a menumanager in the main toolbar
(In reply to comment #13) > I have a custom MenuManager > MenuManager viewMenu = new > MenuManager(Messages.getString("ApplicationActionBarAdvisor.window"), > "de.eiswind.mango.menu.view"); //$NON-NLS-1$ //$NON-NLS-2$ > viewMenu.add(prefAction); Unfortunately, I'm still having troubles reproducing the problem. Does your code get into the createItem(MApplication, ActionContributionItem) method of MenuHelper? Does the command for OpenPreferencesAction have the string in English or the target language? Perhaps you could attach your ActionBarAdvisor subclass's code to this bug or maybe modify the the project from attachment 186181 [details] to reproduce the problem? Or can you already see the problem as-is with the project from attachment 186181 [details]?
Created attachment 186392 [details] ActionBarAdvisor with problem I give give you my messy Advisor class, is from my beginnings on rcp, so don't look to deep in it :) can try to reproduce with your rcp project on wednesday
(In reply to comment #17) > Created attachment 186392 [details] > ActionBarAdvisor with problem I trimmed the code but still can't reproduce the problem. There must be something different in our setups I suppose. > can try to reproduce with your rcp project on wednesday Great! Thanks for your help, Thomas!
Hi Remy, I tried to reproduce that with the sample mail app and a menu thats exactly the same as mine in the larger app. But there the translation works like a charme. If you find a moment can we go back in time and do some more investigations on this ? Really ugly if a single menu item is english. Thanks Thomas
Thomas, in the HandledContributionItem's updateMenuItem() method, is the English string coming from the model or the command? If it's from the command, can you see where someone is calling its define(*) method with the German string first and then the English string?
Hi Remy, if I remember it right, it was coming from the model.
Can you find where the English string is being set from?
Hi Remy, In HandledContibutionItem.updateMenuItem the command is asked for its name. Thats where the english text comes from in my case. Maybe the translation for the command is missing anywhere ?
As far as I can see the define method is called several times (don't have an understanding whats going on there) but always with "Preferences" as a name. Can you tell me in which plugin the preferences command is defined ?
fixed it. somehow the org.eclipse.ui.nl fragment wasnt shown in my launch config and so it wasn't checked. thanks fpr your proper patience with me. its working now
(In reply to comment #25) > fixed it. somehow the org.eclipse.ui.nl fragment wasnt shown in my launch > config and so it wasn't checked. thanks fpr your proper patience with me. its > working now Thanks for letting us know, Thomas! And thanks as always for testing 4.1!