Bug 351033 - "In Binding View" label for Keys Preferences unexternalized
Summary: "In Binding View" label for Keys Preferences unexternalized
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.1   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 4.2 M7   Edit
Assignee: Oleg Besedin CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-07-03 17:15 EDT by Kit Lo CLA
Modified: 2012-05-01 14:16 EDT (History)
5 users (show)

See Also:


Attachments
Screen capture (38.41 KB, image/png)
2011-07-03 17:15 EDT, Kit Lo CLA
no flags Details
InBindingView (26.78 KB, image/png)
2012-03-08 20:26 EST, Kit Lo CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Kit Lo CLA 2011-07-03 17:15:44 EDT
Created attachment 199016 [details]
Screen capture

Build ID: 4.1 I20110630-1005

Scenario
- Navigate to General>Keys page on Preferences dialog
- Click on the dropdown arrow for the "When:" field
- "In Binding View" selection label is unexternalized
- This only happens in Eclipse 4.1
Comment 1 Paul Webster CLA 2011-07-05 18:19:50 EDT
It's defined in the LegacyIDE.e4xmi in org.eclipse.ui.workbench and org.eclipse.platform plugins.

PW
Comment 2 Kit Lo CLA 2011-07-05 18:33:29 EDT
How should we externalize this string and other strings in the .e4xmi file for translation?
Comment 3 Thomas Schindl CLA 2011-07-05 19:03:48 EDT
If you have the ModelTooling installed, bring up the context menu in the tree on the left and click "Externalize Strings".

One can naturally also do that manually:
a) replace string value with %mykey
b) create OSGI-INF/l10n/bundle.properties and put the key-value-pair there
Comment 4 Paul Webster CLA 2011-07-05 20:15:40 EDT
(In reply to comment #2)
> How should we externalize this string and other strings in the .e4xmi file for
> translation?

Kit, it's definitely work on our part to change the strings to externalized keys and provide the .properties file.

Then it can be translated.

PW
Comment 5 Eric Moffatt CLA 2011-09-15 12:52:48 EDT
M2 is done...
Comment 6 Curtis Windatt CLA 2012-02-09 17:30:32 EST
The externalize wizard does not check the binding context names. Not sure what I'm missing, but changing the text in the properties file didn't update the keys preference page. I thought it might be the model state being saved, but it happened even with a fresh target workspace.

https://github.com/CWindatt/eclipse.platform.ui/commit/e5807a4dd9d9d3db88eeeb8bb4cb65aa2541d4ac

https://github.com/CWindatt/eclipse.platform/commit/7954f46971b2e8225ca70e68ab1b5eab9e0c26a1
Comment 8 Eric Moffatt CLA 2012-03-01 11:44:26 EST
Pushed in >20120301.

commit f2ccac5dc6fb91cbcea0353609784c5d16b5db8b

NOTE: This is *only* the 'workbench' part of the fix...Paul, could you please check in the corresponding 'platform' part?

Thanks Curtis !
Comment 10 Curtis Windatt CLA 2012-03-02 12:02:54 EST
Looks like both parts of the fix have been pushed.  Closing as FIXED.
Comment 11 Kit Lo CLA 2012-03-08 20:26:55 EST
Created attachment 212342 [details]
InBindingView

Looks like it's half way fixed. In 4.2 eclipse-SDK-I20120306-2200-win32 build, a variable is now displayed, instead of the externalized string being loaded.
Comment 12 Kit Lo CLA 2012-03-08 20:28:16 EST
reopen, please investigate
Comment 13 Curtis Windatt CLA 2012-03-09 10:22:32 EST
(In reply to comment #8)
> Pushed in >20120301.
> 
> commit f2ccac5dc6fb91cbcea0353609784c5d16b5db8b

I can't find this commit on git.eclipse.org or in the history.  Paul, can you look into this?

(In reply to comment #9)
> Released as
> http://git.eclipse.org/c/platform/eclipse.platform.git/commit/?id=eef66c64193ed222ef9d7812b020ac51a12cffbc
> 
> PW

This fix looks like it was put in fine.  The names match up correctly in the properties.  The fact that the string was changed, but isn't translated points to there being a bug in how we are getting the string. I'll try debugging through it.
Comment 14 Paul Webster CLA 2012-03-09 10:34:52 EST
(In reply to comment #13)
> (In reply to comment #8)
> > Pushed in >20120301.
> > 
> > commit f2ccac5dc6fb91cbcea0353609784c5d16b5db8b
> 
> I can't find this commit on git.eclipse.org or in the history.  Paul, can you
> look into this?

I couldn't quite find it either.  I've cherrypicked e5807a4dd9d9d3db88eeeb8bb4cb65aa2541d4ac and pushed that to master.

Curtis, does that look correct now?

PW
Comment 15 Curtis Windatt CLA 2012-03-09 10:43:06 EST
(In reply to comment #14)
> (In reply to comment #13)
> > (In reply to comment #8)
> > > Pushed in >20120301.
> > > 
> > > commit f2ccac5dc6fb91cbcea0353609784c5d16b5db8b
> > 
> > I can't find this commit on git.eclipse.org or in the history.  Paul, can you
> > look into this?
> 
> I couldn't quite find it either.  I've cherrypicked
> e5807a4dd9d9d3db88eeeb8bb4cb65aa2541d4ac and pushed that to master.
> 
> Curtis, does that look correct now?
> 
> PW

Fix looks good now, thanks.

I don't think the missing change was the cause of the mismatch, still investigating.
Comment 16 Curtis Windatt CLA 2012-03-09 16:21:13 EST
I am using the same build on linux and not seeing the issue.
Comment 17 Oleg Besedin CLA 2012-04-09 16:49:36 EDT
This turned out to be an interesting bug.

Unlike extension registry, labels in the model have to be explicitly translated. The labels for command contexts weren't translated.

The reason only one of them was showing up non-translated is that it was the only one specific to e4. For the rest of command contexts, their names were overwritten by ContextToModelProcessor.generateContexts() and used extension-registry-translated names from 3.x command contexts.

I added code to perform localization to ContextProcessingAddon:

http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=21fd001ce9dd1ea4da8adf6810526ba45624c172
Comment 18 Oleg Besedin CLA 2012-05-01 14:16:46 EDT
Verified in I20120430-1800.