-
Enhancement
-
Resolution: Fixed
-
P3
-
7
-
b106
-
generic
-
generic
-
Verified
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-2201292 | 6u25 | Michael Fang | P2 | Resolved | Fixed | b03 |
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
-------------------------------------
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
- backported by
-
JDK-2201292 NLS: convert the anonymous arrays to named arrays in Java List Resource files
- Resolved
- relates to
-
JDK-6979016 sun/tools/jconsole/ResourceCheckTest.sh failed on 1.7.0-ea-b106 but passed on b105
- Closed
-
JDK-6980510 Fix for 6959252 broke JConsole mnemonic keys
- Closed