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

Euro: Wrong localization for mnemonics of Swing components.

XMLWordPrintable

    • mantis
    • generic
    • generic

        I think .properties files under
          src/share/classes/com/sun/swing/internal/plaf/metal/resources
        and
          src/share/classes/com/sun/swing/internal/plaf/basic/resources
        should be localized more carefully. In those files, only Text and Label
        have been translated. Because Mnemonic and DisplayedMnemonicIndex have
        been ignored and unchanged on localization, mnemonics of some Swing components
        look wrong for some locales.

        For example,
          ColorChooser.swatchesNameText=\u30b5\u30f3\u30d7\u30eb (S)
          ColorChooser.swatchesMnemonic=83
          ColorChooser.swatchesDisplayedMnemonicIndex=6
        might be better than the following current entries:
          ColorChooser.swatchesNameText=\u30b5\u30f3\u30d7\u30eb
          ColorChooser.swatchesMnemonic=83
          ColorChooser.swatchesDisplayedMnemonicIndex=0
        (basic_ja.properties)

          ColorChooser.swatchesNameText=Muster
          ColorChooser.swatchesMnemonic=77
          ColorChooser.swatchesDisplayedMnemonicIndex=0
        or
          ColorChooser.swatchesNameText=Muster
          ColorChooser.swatchesMnemonic=83
          ColorChooser.swatchesDisplayedMnemonicIndex=2
        might be better than current entries as well:
          ColorChooser.swatchesNameText=Muster
          ColorChooser.swatchesMnemonic=83
          ColorChooser.swatchesDisplayedMnemonicIndex=0
        (basic_de.properties)

        For the above two examples, at the moment, the first character
        (\u30b5 in ja locale, 'M' in de locale) is underlined as if the character
        is a mnemonic. Of course, these fake mnemonics don't work. 'S' works for
        each case.

        I think all localized .properties files under these directory should
        be reviewed and expected behavior for each (localized) mnemonic should
        be verified with testing.

              jtusla Jiri Tusla (Inactive)
              peytoia Yuka Kamiya (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: