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 23265 - I18N - mnemonic key doesn't work with translated.
Summary: I18N - mnemonic key doesn't work with translated.
Status: CLOSED FIXED
Alias: None
Product: guibuilder
Classification: Unclassified
Component: Code (show other bugs)
Version: 3.x
Hardware: Sun All
: P4 blocker (vote)
Assignee: Tomas Pavek
URL:
Keywords: A11Y, I18N
Depends on: 23879
Blocks:
  Show dependency tree
 
Reported: 2002-05-09 03:22 UTC by Hiroshi Nakatsubo
Modified: 2003-06-30 18:29 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Image1-1.gif (12.60 KB, image/gif)
2002-05-09 03:33 UTC, Hiroshi Nakatsubo
Details
Image1-2.gif (11.23 KB, image/gif)
2002-05-09 03:34 UTC, Hiroshi Nakatsubo
Details
Image2.gif (5.41 KB, image/gif)
2002-05-09 03:35 UTC, Hiroshi Nakatsubo
Details
Image3.gif (4.77 KB, image/gif)
2002-05-09 03:36 UTC, Hiroshi Nakatsubo
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Hiroshi Nakatsubo 2002-05-09 03:22:25 UTC
Please see attched image file.
Mnemonic Keys which was mistaken on the Japanese
is attached.

To reproduce:

[case1] 
1.New -> GUI Forms -> JFrame.
  JFrame is created. 
  Form Editor displays.
2.JButton of Swing is added to Form.
3.JButton is moved to the North.
4.Connection Mode is chosen, JButton is pushed
  and, next, it pushes except JButton.
  Connection Wizard displays.
  ---The Mnemonic Keys of "Method Name:"
     (Image1-1.gif,Image1-2.gif).

[case2]
1.Right click is carried out on Pallet and 
  Create New Category is chosen.
  New Palette Category displays.
  ---The Mnemonic Keys of "New Category Name:"
     (Image2.gif).

[case3]
1.Right click is carried out on Category
  and Rename is chosen.
  Rename displays.
  ---The Mnemonic Keys of "New Category Name:"
     (Image3.gif).

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.

myButton.setMnemonic(myResourceBundle.getString("Example").charAt(0));

*OS:Solaris 8  
*Orion Build:orion_020507
*JDK:JDK1.4.0
*locale:ja
Comment 1 Hiroshi Nakatsubo 2002-05-09 03:33:02 UTC
Created attachment 5670 [details]
Image1-1.gif
Comment 2 Hiroshi Nakatsubo 2002-05-09 03:34:24 UTC
Created attachment 5671 [details]
Image1-2.gif
Comment 3 Hiroshi Nakatsubo 2002-05-09 03:35:19 UTC
Created attachment 5672 [details]
Image2.gif
Comment 4 Hiroshi Nakatsubo 2002-05-09 03:36:07 UTC
Created attachment 5673 [details]
Image3.gif
Comment 5 Hiroshi Nakatsubo 2002-05-09 03:44:10 UTC
Correction:1
[case3]
     1.Right click is carried out on Category
       and Rename is chosen.
       Rename displays.
 -->   ---The Mnemonic Keys of "New Name:"
          (Image3.gif).

Correction:2
OS:Solaris 8  
 --> *Orion Build:orion_ml_020507
     *JDK:JDK1.4.0
     *locale:ja
Comment 6 Hiroshi Nakatsubo 2002-05-16 06:01:32 UTC
I added the keyword "A11Y" for the bug.
But I did not add the interest list for the bug.
(michele.budris@sun.com) 
Comment 7 Tomas Pavek 2002-05-23 14:56:00 UTC
I've fixed the first case (in 3.4 dev). Case 2 and 3 are 
not bugs in form editor - see issue 23879 which identifies 
the problem in openide. 
Comment 8 Tomas Pavek 2002-06-13 15:43:13 UTC
I've added '&' to the following text labels in bundle:

CTL_NewCategoryName=&New Category Name:
CTL_NewName=&New Name:

Translators should use the mnemonic as described in issue 
24287.
Comment 9 hiroshiy 2002-07-03 10:19:01 UTC
I've verified the fixing in "NetBeans 3.4 Beta2 (Build 200206201555)" 
and "NetBeans 3.4 Trunk (Build 200207020100)"

Thank You.
Comment 10 Jesse Glick 2002-12-23 16:36:48 UTC
Consistent use of the I18N keyword.
Comment 11 Quality Engineering 2003-06-30 18:29:41 UTC
Resolved for 3.3.x or earlier, no new info since then -> closing.