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 18638

Summary: L10N - mnemonic key doesn't work with translated message.
Product: java Reporter: Hiroshi Nakatsubo <hn131207>
Component: I18NAssignee: issues@java <issues>
Status: CLOSED INVALID    
Severity: blocker CC: issues, jf4jbug
Priority: P4 Keywords: I18N
Version: 3.x   
Hardware: Sun   
OS: Solaris   
Issue Type: DEFECT Exception Reporter:
Attachments: Image1.gif
Image2.gif
Image3.gif

Description Hiroshi Nakatsubo 2001-12-14 04:28:06 UTC
Mnemonic Keys which was mistaken on the Japanese is attached.

<Select Resource Bundles dialog>
1. Create a Swing Form newly. 
2. Choose a title with the Properties tab of a Component Inspector. 
3. A property editor window displays. 
4. Choose a Resource Bundle by the Select mode pull down list.
5. Push a Browsing button.
6. Display a Select Resource Bundles dialog.
7. If it translates into Japanese, mnemonic will not function.
   The Mnemonic Keys of "Select".(Image1.gif)

<New Bundle dialog>
1.from 4. is the same procedure as the <Select Resource Bundles dialog>.
5. Push a New button.
6. Display a New Bundle dialog.
7. If it translates into Japanese, mnemonic will not function.
   The Mnemonic Keys of "Filesystem".(Image2.gif)

<Replace Code Format Editor dialog>
1.from 4. is the same procedure as the <Select Resource Bundles dialog>.
5. Push a Format button.
6. Display a Replace Code Format Editor dialog.
7. If it translates into Japanese, mnemonic will not function.
   The Mnemonic Keys of "Replace Code Format".(Image3.gif)
Comment 1 Hiroshi Nakatsubo 2001-12-14 04:32:31 UTC
Created attachment 3818 [details]
Image1.gif
Comment 2 Hiroshi Nakatsubo 2001-12-14 04:33:39 UTC
Created attachment 3819 [details]
Image2.gif
Comment 3 Hiroshi Nakatsubo 2001-12-14 04:34:40 UTC
Created attachment 3820 [details]
Image3.gif
Comment 4 Tomas Pavek 2001-12-14 11:19:30 UTC
reassigning
Comment 5 _ pkuzel 2001-12-14 13:11:41 UTC
From my point of view it looks like localization issue.
Comment 6 Keiichi Oono 2001-12-27 12:29:46 UTC
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).

I guess other many objects are implemented like above.
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.

myButton.setMnemonic(myResourceBundle.getString("Example").charAt(0));
Comment 7 Marian Petras 2002-01-02 16:31:00 UTC
Some buttons need not have mnemonics. See Java Look and Feel design
guidelines
(http://java.sun.com/products/jlf/ed2/book/HIG.Behavior3.html#35796).
All buttons mentioned in this bug report are either OK/Cancel buttons
which do not need mnemonics. Mnemonics are present neither in English
nor in Japanese version.
Comment 8 Jesse Glick 2002-12-23 16:55:54 UTC
Consistent use of the I18N keyword.
Comment 9 Quality Engineering 2003-07-01 09:51:16 UTC
Resolved for 3.3.x or earlier, no new info since then -> closing.
Comment 10 Quality Engineering 2003-07-01 09:52:25 UTC
Resolved for 3.4 or earlier, no new info since then -> closing.