-
Enhancement
-
Resolution: Fixed
-
P3
-
7
-
b38
-
generic
-
generic
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-2223921 | 7u6 | Jennifer Godinez | P3 | Closed | Fixed | b10 |
Could you change the mnemonic assignment system to avoid translation issue ?
In Java (J2SE) project, the mnemonic (shortcut key) for menu items are specified in the following structure.
Details are as follows:
File: Systems|Java|JavaProperties|java/j2se/src/share/classes/sun/print/resources/serviceui.properties (there are many examples within this file):
US Text: Print to File
String ID: checkbox.printtofile
US Text: F
String ID: checkbox.printtofile.mnemonic
"Print to File" string will appear on the user interface with "F" underscored. This indicate a user can use "F" key to invoke this menu item instead of using mouse and clicking File.
In many languages other than English, however, the translation of "File" does not include "F". For example, File is "Datei" in German, and ¿¿¿¿ in Japanese.
In such a case, the mnemonic does not appear on the translated menu item.
In Sun translation, we have been translating such a string by adding "(F)" to the end of the translation or change mnemonic word itself to avoid issue.
LafMenu.laf_label=¿¿¿¿(F)
LafMenu.laf_mnemonic=F
or
LafMenu.laf_label=Datei
LafMenu.laf_mnemonic=D
However, on HyperHub, this will cause TM break since "File" will be accepted as ¿¿¿¿(F), and "F" as "D" in this case, and reused for any other string as AutoAccept.
To avoid this problem, isn't it possible to change the method to specify the mnemonic key from the current 2 lines into 1 line where both the menu item and mnemonic are included ?
In Java (J2SE) project, the mnemonic (shortcut key) for menu items are specified in the following structure.
Details are as follows:
File: Systems|Java|JavaProperties|java/j2se/src/share/classes/sun/print/resources/serviceui.properties (there are many examples within this file):
US Text: Print to File
String ID: checkbox.printtofile
US Text: F
String ID: checkbox.printtofile.mnemonic
"Print to File" string will appear on the user interface with "F" underscored. This indicate a user can use "F" key to invoke this menu item instead of using mouse and clicking File.
In many languages other than English, however, the translation of "File" does not include "F". For example, File is "Datei" in German, and ¿¿¿¿ in Japanese.
In such a case, the mnemonic does not appear on the translated menu item.
In Sun translation, we have been translating such a string by adding "(F)" to the end of the translation or change mnemonic word itself to avoid issue.
LafMenu.laf_label=¿¿¿¿(F)
LafMenu.laf_mnemonic=F
or
LafMenu.laf_label=Datei
LafMenu.laf_mnemonic=D
However, on HyperHub, this will cause TM break since "File" will be accepted as ¿¿¿¿(F), and "F" as "D" in this case, and reused for any other string as AutoAccept.
To avoid this problem, isn't it possible to change the method to specify the mnemonic key from the current 2 lines into 1 line where both the menu item and mnemonic are included ?
- backported by
-
JDK-2223921 Please change the mnemonic assignment system to avoid translation issue
-
- Closed
-
- relates to
-
JDK-7093156 NLS: Please change the mnemonic assignment system to avoid translation issue (Swing files)
-
- Closed
-