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

NLS: convert the anonymous arrays to named arrays in Java List Resource files

    Details

    • Subcomponent:
    • Resolved In Build:
      b106
    • CPU:
      generic
    • OS:
      generic
    • Verification:
      Verified

      Backports

        Description

        The resource file translation is going to be handled by Oracle Translation Factory in the near future. Oracle translation factory does not support anonymous arrays in Java List Resource files. Following content will not be translated in Oracle TF:

        -------------------------------------
        public Object[][] getContents() {
            return new Object[][] {
                { "key1", "translatable text"},
                { "key2", "another text" }
            };
        }
        -------------------------------------

        We should convert the anonymous arrays to named arrays. The previous example can be changed this way:

        -------------------------------------
        private static final Object[][] contents = {
                { "key1", "translatable text" },
                { "key2", "another text" }
            };

        public Object[][] getContents() {
            return contents;
        }
        -------------------------------------

        Impacted files:

        jdk/jdk/src/share/classes/com/sun/tools/example/debug/tty/TTYResources.java
        jdk/jdk/src/share/classes/sun/tools/jconsole/resources/JConsoleResources.java
        jdk/jdk/src/share/classes/sun/applet/resources/MsgAppletViewer.java
        jdk/jdk/src/share/classes/sun/tools/native2ascii/resources/MsgNative2ascii.java

          Issue Links

            Activity

            Hide
            yhuang Yong Huang added a comment -
            BT2:EVALUATION

            needs to figure out who will review the webrev since it affects the English resource file.
            Show
            yhuang Yong Huang added a comment - BT2:EVALUATION needs to figure out who will review the webrev since it affects the English resource file.

              People

              • Assignee:
                yhuang Yong Huang
                Reporter:
                yhuang Yong Huang
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Imported:
                  Indexed: