Duplicate :
|
|
Duplicate :
|
|
Duplicate :
|
|
Relates :
|
|
Relates :
|
ADDITIONAL SYSTEM INFORMATION : java version "11.0.2" 2019-01-15 LTS Java(TM) SE Runtime Environment 18.9 (build 11.0.2+9-LTS) Java HotSpot(TM) 64-Bit Server VM 18.9 (build 11.0.2+9-LTS, mixed mode) A DESCRIPTION OF THE PROBLEM : The String describing the extended modifier keys and mouse buttons returned by java.awt.event.InputEvent.getModifiersExText( int ) is no longer localized, but always returns the English modifier keys and mouse button names. Tested with Locale.GERMAN and Locale.ITALIAN Might be related to https://bugs.java.com/bugdatabase/view_bug.do?bug_id=8214574 REGRESSION : Last worked in version 8u201 STEPS TO FOLLOW TO REPRODUCE THE PROBLEM : Compile and run the given code EXPECTED VERSUS ACTUAL BEHAVIOR : EXPECTED - "CTRL in German: Strg" is printed to the console ACTUAL - "CTRL in German: Ctrl" is printed to the console ---------- BEGIN SOURCE ---------- import java.awt.event.InputEvent; import java.util.Locale; public class InputEventTest { public static void main(String[] args) { Locale.setDefault(Locale.ITALIAN); System.out.println("CTRL in German: " + InputEvent.getModifiersExText(InputEvent.CTRL_DOWN_MASK)); } } ---------- END SOURCE ---------- CUSTOMER SUBMITTED WORKAROUND : Patching java.desktop module with sun.awt.resources.awt_[LANGUAGE_CODE].java from Java 10 or earlier FREQUENCY : always
|