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

Provide support for resource picker like tool to automate internationalization

    XMLWordPrintable

Details

    Description

      A DESCRIPTION OF THE REQUEST :
      When you internationalize a portion of Swing UI you tend to set more than one property on each component. It would be much better if this could be automated and integrated with ResourceBundles.

      What I propose is to the the "Name" property that each swing component has to use as a key to look up required values in a provided resource bundle.

      For example I would create a JButton:

      JButton myButton = new JButton();
      myButton.setName("Ok");


      and I would have the following entries in my resource bundle:

      Ok.text = OK
      Ok.mnemonic = O
      Ok.tooltip = Press okay to do something
      Ok.icon = .../images/ok.png

      I provide here details of implementation of this system using jython although I have at various times implemented this sytem in Java. The Java versions are under copyright so I can't reproduce them here.

      http://www.orablogs.com/gdavison/archives/000164.html



      JUSTIFICATION :
      Internationalizing Swing UI can be needlessly complex and not tool friendly. This ResourcePicker system can help automate this process and make it IDE friendly.

      As a side benefit setting the "name" property makes it easier to automate testing of UI elements. It is quite easy to modify the resource picker code in order to build up a table of UI elements.

      Attachments

        Activity

          People

            Unassigned Unassigned
            mmma Marvin Ma (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Imported:
              Indexed: