Details
-
Bug
-
Resolution: Fixed
-
P4
-
7
-
b06
-
x86
-
linux_redhat_5.0
Backports
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8018991 | 7u45 | Shi Zhang | P4 | Closed | Fixed | b01 |
JDK-8000981 | 7u40 | Unassigned | P4 | Closed | Fixed | b01 |
Description
As seen in following, 3 mnemonic keys seems to be hardcoded and making them unable to localize. Please consider externalizing them to src/share/classes/com/sun/swing/internal/plaf/metal/resources/metal.properties for example.
src/share/classes/javax/swing/plaf/metal/MetalLookAndFeel.java
"FileChooser.lookInLabelMnemonic", new Integer(KeyEvent.VK_I),
"FileChooser.fileNameLabelMnemonic", new Integer(KeyEvent.VK_N),
"FileChooser.filesOfTypeLabelMnemonic", new Integer(KeyEvent.VK_T),
Similar hardcode also found in motif L&F.
src/share/classes/com/sun/java/swing/plaf/motif/MotifLookAndFeel.java
"FileChooser.pathLabelMnemonic", new Integer(KeyEvent.VK_P), // 'p'
"FileChooser.filterLabelMnemonic", new Integer (KeyEvent.VK_R), // 'r'
"FileChooser.foldersLabelMnemonic", new Integer (KeyEvent.VK_L), // 'l'
"FileChooser.filesLabelMnemonic", new Integer (KeyEvent.VK_I), // 'i'
"FileChooser.enterFileNameLabelMnemonic", new Integer (KeyEvent.VK_N), // 'n'
Since following keys in src/share/classes/com/sun/java/swing/plaf/motif/resources/motif_xx.properties being translated, in some languages mnemonic character is not in label string and won't show up in gui.
FileChooser.pathLabelText=Enter path or folder name:
FileChooser.filterLabelText=Filter
FileChooser.foldersLabelText=Folders
FileChooser.filesLabelText=Files
FileChooser.enterFileNameLabelText=Enter file name:
FileChooser.enterFolderNameLabelText=Enter folder name:
src/share/classes/javax/swing/plaf/metal/MetalLookAndFeel.java
"FileChooser.lookInLabelMnemonic", new Integer(KeyEvent.VK_I),
"FileChooser.fileNameLabelMnemonic", new Integer(KeyEvent.VK_N),
"FileChooser.filesOfTypeLabelMnemonic", new Integer(KeyEvent.VK_T),
Similar hardcode also found in motif L&F.
src/share/classes/com/sun/java/swing/plaf/motif/MotifLookAndFeel.java
"FileChooser.pathLabelMnemonic", new Integer(KeyEvent.VK_P), // 'p'
"FileChooser.filterLabelMnemonic", new Integer (KeyEvent.VK_R), // 'r'
"FileChooser.foldersLabelMnemonic", new Integer (KeyEvent.VK_L), // 'l'
"FileChooser.filesLabelMnemonic", new Integer (KeyEvent.VK_I), // 'i'
"FileChooser.enterFileNameLabelMnemonic", new Integer (KeyEvent.VK_N), // 'n'
Since following keys in src/share/classes/com/sun/java/swing/plaf/motif/resources/motif_xx.properties being translated, in some languages mnemonic character is not in label string and won't show up in gui.
FileChooser.pathLabelText=Enter path or folder name:
FileChooser.filterLabelText=Filter
FileChooser.foldersLabelText=Folders
FileChooser.filesLabelText=Files
FileChooser.enterFileNameLabelText=Enter file name:
FileChooser.enterFolderNameLabelText=Enter folder name:
Attachments
Issue Links
- backported by
-
JDK-8000981 possible hardcoded mnemonic for JFileChooser metal and motif l&f
-
- Closed
-
-
JDK-8018991 possible hardcoded mnemonic for JFileChooser metal and motif l&f
-
- Closed
-