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 23661

Summary: I18N - mnemonic key doesn't work with translated.
Product: obsolete Reporter: Masafumi Matsuda <mmc131206>
Component: vcsgenericAssignee: Martin Entlicher <mentlicher>
Status: CLOSED WONTFIX    
Severity: blocker CC: jf4jbug, mbudris
Priority: P4 Keywords: A11Y, I18N
Version: 3.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:
Attachments: snap shot

Description Masafumi Matsuda 2002-05-17 10:31:20 UTC
Please see attched image file. 
Mnemonic Keys which was mistaken on the Japanese
is attached.
To reproduce:
- Versioning -> Mount Version Control -> Generic
VCS 
- New Wizard - Generic VCS -> STEP4. Environment
-> Insert -> Invert Variable

The Mnemonic Keys of "Variable Name"

Would you check if the first character is not used
as mnemonic key?
By localization, the first character becomes
no-ascii character. As a
result, the mnemonic key doesn't work by
localization. To fix this
problem, we need to set two resource bundle
messages, one is for 
caption, another is for mnemonic.
  Example=TestString
  Example_Mnemonic=T

And we should use like this:
myButton.setText(myBundle.getString("Example"));
myButton.setMnemonic(myBundle.getString("Example_Mnemonic").charAt(0).

The following line does not work with localized
version, because the
first character is not an alphanumeric because
it's replaced to
multi-byte Japanese character.

OS:Solaris 5.9  
Orion Build:orion_ml_020507  fcc Build:20.4
JDK:JDK1.4.0
locale:ja
Comment 1 Masafumi Matsuda 2002-05-17 10:32:51 UTC
Created attachment 5800 [details]
snap shot
Comment 2 Masafumi Matsuda 2002-05-17 10:34:02 UTC
I added the keyword "A11Y" for the bug.
But I could not add the interest list for the bug.
(michele.budris@sun.com) 
Comment 3 Martin Entlicher 2002-05-17 13:25:29 UTC
The input dialog is created by org.openide.NotifyDescriptor.InputLine.
I'm not able to set the mnemonic key for the text directly.

However from the code I realized, that you can use '&' key in the text
to mark the desired letter for the mnemonic. If there is no '&' key,
the first letter is used as the mnemonic.

So just use '&' where appropriate.
Comment 4 Jiri Kovalsky 2002-06-10 15:19:47 UTC
Let us know Masafumi whether it works as Martin suggests. Meanwhile
verifying ...
Comment 5 Jesse Glick 2002-12-23 16:35:16 UTC
Consistent use of the I18N keyword.
Comment 6 Quality Engineering 2003-07-01 13:04:00 UTC
Resolved for 3.4.x or earlier, no new info since then -> closing.