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 18635 - I18N - mnemonic key doesn't work with translated message.
Summary: I18N - mnemonic key doesn't work with translated message.
Status: CLOSED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Javadoc (show other bugs)
Version: 3.x
Hardware: Sun Solaris
: P4 blocker (vote)
Assignee: issues@java
URL:
Keywords: I18N
Depends on:
Blocks:
 
Reported: 2001-12-14 02:05 UTC by Hiroshi Nakatsubo
Modified: 2003-07-01 13:35 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Image1.gif (12.35 KB, image/gif)
2001-12-14 02:32 UTC, Hiroshi Nakatsubo
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Hiroshi Nakatsubo 2001-12-14 02:05:23 UTC
Mnemonic Keys which was mistaken on the Japanese is attached.

1. Create a Method newly. 
2. Carry out a right click on a method. A property is chosen from a pop up menu.
3. Choose a Properties Window -> Javadoc comment.
4. Display a Property Editor.
5. If it translates into Japanese, mnemonic has stopped moving.
  The Mnemonic Keys of "New".
  The Mnemonic Keys of "Delete".
Comment 1 Hiroshi Nakatsubo 2001-12-14 02:33:00 UTC
Created attachment 3817 [details]
Image1.gif
Comment 2 _ ttran 2001-12-14 08:55:02 UTC
version of the IDE?

BTW the dialog does not belong to core.  It's javadoc module.  Please
try to choose the correct component next time you'll file bug report.
 core is not a kitchen sink for all bugs in the IDE
Comment 3 Keiichi Oono 2001-12-27 12:38:25 UTC
I've reproduced on Build 200112180331.
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 4 Marian Petras 2002-01-02 17:18:40 UTC
This seems to be fixed in NB Beta 6.
Comment 5 Keiichi Oono 2002-02-22 13:04:58 UTC
Verified on FFJ Build 020221_1
Comment 6 Jesse Glick 2002-12-23 16:35:53 UTC
Consistent use of the I18N keyword.
Comment 7 Quality Engineering 2003-07-01 13:35:25 UTC
Resolved for 3.3.x or earlier, no new info since then -> closing.