Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6375587

French translation for the Tab key is wrong in AWT

    XMLWordPrintable

    Details

    • Subcomponent:
    • Resolved In Build:
      b72
    • CPU:
      x86
    • OS:
      windows_xp

      Description

      FULL PRODUCT VERSION :
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.6.0-internal-java2d_19_jan_2006_03_49-b00)

      ADDITIONAL OS VERSION INFORMATION :
      Microsoft Windows XP [Version 5.1.2600]

      EXTRA RELEVANT SYSTEM CONFIGURATION :
      fr_FR locale

      A DESCRIPTION OF THE PROBLEM :
      AWT reports the wrong name for the TAB key when the user's locale is fr_FR. A tab can be a widget (in a tabbed pane) or a key. In French, a tab widget is called an "onglet. The tab key is called "tab" or "tabulation".

      The following call prints "Onglet" on the standard output stream:

      System.out.println(KeyEvent.getKeyText(KeyEvent.VK_TAB));

      The output should be "Tab" or "Tabulation" (preferrably "Tab"). This bug affects every Java application using this API to display key shortcuts in menus or help files. It affects for instance IntelliJ IDEA 5.

      Only a GUI developer would be able to make the connection between a shortcut like "Ctrl+Onglet" and the actual Tab key on the keyboard. This bug is confusing for any other user.

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      Execute System.out.println(KeyEvent.getKeyText(KeyEvent.VK_TAB));

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      The result should be the word Tab or Tabulation on the standard output stream.
      ACTUAL -
      The actual result is the word "Onglet".

      REPRODUCIBILITY :
      This bug can be reproduced always.

      ---------- BEGIN SOURCE ----------
      class TestTabAndTab {
        public static void main(String... args) {
          System.out.println(KeyEvent.getKeyText(KeyEvent.VK_TAB));
        }
      }
      ---------- END SOURCE ----------

      CUSTOMER SUBMITTED WORKAROUND :
      Use java.lang.String replace methods to replace the occurrences of "Onglet" by "Tab" in a String returned by KeyEvent.getKeyText().

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              jtusla Jiri Tusla (Inactive)
              Reporter:
              ndcosta Nelson Dcosta (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: