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.
Summary: | L10N - mnemonic key doesn't work with translated message. | ||
---|---|---|---|
Product: | java | Reporter: | Hiroshi Nakatsubo <hn131207> |
Component: | I18N | Assignee: | 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
Created attachment 3818 [details]
Image1.gif
Created attachment 3819 [details]
Image2.gif
Created attachment 3820 [details]
Image3.gif
reassigning From my point of view it looks like localization issue. 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)); 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. Consistent use of the I18N keyword. Resolved for 3.3.x or earlier, no new info since then -> closing. Resolved for 3.4 or earlier, no new info since then -> closing. |