Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 333914 - Application menu is not localized correctly
Summary: Application menu is not localized correctly
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 3.6   Edit
Hardware: Macintosh Mac OS X - Carbon (unsup.)
: P3 normal (vote)
Target Milestone: 3.7 M5   Edit
Assignee: Scott Kovatch CLA
QA Contact: Silenio Quarti CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-01-10 15:57 EST by Sakis Kotisis CLA
Modified: 2011-01-12 13:09 EST (History)
3 users (show)

See Also:


Attachments
Eclipse application menu if German is set as preferred language (26.95 KB, image/png)
2011-01-10 16:00 EST, Sakis Kotisis CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Sakis Kotisis CLA 2011-01-10 15:57:23 EST
Build Identifier: 3.6 Helios Release

The Cocoa application menu obeys the "-nl" argument only for the "About", "Quit" and "Hide" menu items. The rest of the items, as well as the "Help>Search" menu item are shown in the preferred system language.

Reproducible: Always

Steps to Reproduce:
1. Set a language different from English (e.g. Greek) as system default from Preferences
2. Open Eclipse with -nl en_US
3. Notice the application menu
Comment 1 Sakis Kotisis CLA 2011-01-10 16:00:24 EST
Created attachment 186428 [details]
Eclipse application menu if German is set as preferred language
Comment 2 Felipe Heidrich CLA 2011-01-11 09:37:18 EST
Scott, would you know if the untranslate menu items are created by the OS ?
Comment 3 Scott Kovatch CLA 2011-01-11 11:36:57 EST
About, Quit and Hide are all controlled by Platform UI, and they load the strings from a resource bundle, which uses the default Java locale.

SWT is not -- we just call the pathForResource variant that doesn't specify a locale, and that just loads the right nib for the current OS language. We should get the Java locale and use that, as it gets overridden by -nl and falls back to the OS by default.
Comment 4 Sakis Kotisis CLA 2011-01-11 11:42:19 EST
Don't know if this is of any help, but this bug does not seem to happen on Carbon.
Comment 5 Scott Kovatch CLA 2011-01-11 14:30:13 EST
(In reply to comment #4)
> Don't know if this is of any help, but this bug does not seem to happen on
> Carbon.

The Java VM syncs the Java locale to the OS locale. In Carbon the menu manager gives you an application menu, fully localized. In Cocoa, however, the application loads the menu, so we have to do the work ourselves.

This is now fixed > 20110111. We'll now pick up whatever you specify with -nl, and fall back to the OS language if the specified language isn't available. We fall back to English if neither the language picked with -nl nor the OS language have no translation of the default nib. See /System/Library/Frameworks/JavaVM.framework/Resources for the localizations provided by Apple for the application menu.
Comment 6 Sakis Kotisis CLA 2011-01-12 07:03:06 EST
Thank you, Scott. Any idea what target this could be included in?
Comment 7 Scott Kovatch CLA 2011-01-12 13:09:54 EST
(In reply to comment #6)
> Thank you, Scott. Any idea what target this could be included in?

3.7M5, but look for an I-build soon to see it sooner.