This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 158135

Summary: I18N : mnemonic key for "Activate" is always set to the 1st character
Product: ide Reporter: Masaki Katakai <masaki>
Component: Features On DemandAssignee: Pavel Flaska <pflaska>
Status: RESOLVED FIXED    
Severity: blocker Keywords: I18N
Priority: P2    
Version: 6.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:
Attachments: proposed patch, could you evaluate?

Description Masaki Katakai 2009-02-08 00:28:04 UTC
It seems that the mnemonic key is always set as the 1st character for "Activate" button.

ide.ergonomics/src/org/netbeans/modules/ide/ergonomics/fod/ConfigurationPanel.java:

        downloadButton.setText(btnMsg);
        downloadButton.setMnemonic(btnMsg.charAt(0));

It will not be valid when the label is localized. Please use '&' and org.openide.awt.Mnemonics.setLocalizedText()
to set mnemonic like

org/netbeans/modules/ide/ergonomics/fod/Bundle.properties:

+LBL_Download=&Download and Install
+LBL_Enable=&Activate

org/netbeans/modules/ide/ergonomics/fod/ConfigurationPanel.java:

+        org.openide.awt.Mnemonics.setLocalizedText(infoLabel, lblMsg);
+        org.openide.awt.Mnemonics.setLocalizedText(downloadButton, btnMsg);
Comment 1 Masaki Katakai 2009-02-08 00:31:50 UTC
Created attachment 76699 [details]
proposed patch, could you evaluate?
Comment 2 Tomas Pavek 2009-02-09 15:03:28 UTC
Note that according to the latest UI spec the Activate button should be removed...
Comment 3 Pavel Flaska 2009-03-03 10:56:20 UTC
I will apply the patch for the time being. Bear in mind that Activate button will be perhaps removed, as Tomas noted. Thanks for the patch.
Comment 4 Pavel Flaska 2009-03-03 14:38:37 UTC
Thanks for the patch. Applied.

5eed8ddb3276
Comment 5 Quality Engineering 2009-03-04 09:02:53 UTC
Integrated into 'main-golden', will be available in build *200903040201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/5eed8ddb3276
User: Pavel Flaska <pflaska@netbeans.org>
Log: #158135: Mnemonic. Applied Masaki's patch.