8030698: Several GUI labels in jconsole need correction
authorigerasim
Mon, 30 Dec 2013 16:34:06 +0400
changeset 22094 1c154d8a9a96
parent 22093 741504ef3df7
child 22095 e613710a08a6
8030698: Several GUI labels in jconsole need correction Reviewed-by: sla
jdk/src/share/classes/sun/tools/jconsole/Messages.java
jdk/src/share/classes/sun/tools/jconsole/SummaryTab.java
jdk/src/share/classes/sun/tools/jconsole/ThreadTab.java
jdk/src/share/classes/sun/tools/jconsole/resources/messages.properties
jdk/src/share/classes/sun/tools/jconsole/resources/messages_ja.properties
jdk/src/share/classes/sun/tools/jconsole/resources/messages_zh_CN.properties
--- a/jdk/src/share/classes/sun/tools/jconsole/Messages.java	Mon Dec 30 11:51:19 2013 +0800
+++ b/jdk/src/share/classes/sun/tools/jconsole/Messages.java	Mon Dec 30 16:34:06 2013 +0400
@@ -36,7 +36,7 @@
         Resources.initializeMessages(Messages.class, BUNDLE_NAME);
     }
     // TODO:
-    // The names of some of the constants below looks strange.
+    // The names of some of the constants below look strange.
     // That's because they  were generated programmatically
     // from the messages. They should be cleaned up,
     // ___ should be removed etc.
@@ -269,6 +269,7 @@
     public static String SUMMARY_TAB_TAB_NAME;
     public static String SUMMARY_TAB_VM_VERSION;
     public static String THREADS;
+    public static String THREAD_TAB_INFO_LABEL_FORMAT;
     public static String THREAD_TAB_THREAD_INFO_ACCESSIBLE_NAME;
     public static String THREAD_TAB_THREAD_PLOTTER_ACCESSIBLE_NAME;
     public static String THREAD_TAB_INITIAL_STACK_TRACE_MESSAGE;
--- a/jdk/src/share/classes/sun/tools/jconsole/SummaryTab.java	Mon Dec 30 11:51:19 2013 +0800
+++ b/jdk/src/share/classes/sun/tools/jconsole/SummaryTab.java	Mon Dec 30 16:34:06 2013 +0400
@@ -213,8 +213,8 @@
                 String[] strings2 = formatKByteStrings(u.getCommitted());
                 append(Messages.COMMITTED_MEMORY,  strings2[0]);
                 append(Messages.SUMMARY_TAB_PENDING_FINALIZATION_LABEL,
-                       Messages.SUMMARY_TAB_PENDING_FINALIZATION_VALUE,
-                       memoryBean.getObjectPendingFinalizationCount());
+                       Resources.format(Messages.SUMMARY_TAB_PENDING_FINALIZATION_VALUE,
+                                        memoryBean.getObjectPendingFinalizationCount()));
                 append(endTable);
 
                 append(newTable);
--- a/jdk/src/share/classes/sun/tools/jconsole/ThreadTab.java	Mon Dec 30 11:51:19 2013 +0800
+++ b/jdk/src/share/classes/sun/tools/jconsole/ThreadTab.java	Mon Dec 30 16:34:06 2013 +0400
@@ -66,9 +66,6 @@
 
     private static final Border thinEmptyBorder  = new EmptyBorder(2, 2, 2, 2);
 
-    private static final String infoLabelFormat = "ThreadTab.infoLabelFormat";
-
-
     /*
       Hierarchy of panels and layouts for this tab:
 
@@ -692,7 +689,7 @@
 
         private void updateThreadsInfo(long tlCount, long tpCount, long ttCount, long timeStamp) {
             getPlotter().addValues(timeStamp, tlCount);
-            getInfoLabel().setText(Resources.format(infoLabelFormat, tlCount, tpCount, ttCount));
+            getInfoLabel().setText(Resources.format(Messages.THREAD_TAB_INFO_LABEL_FORMAT, tlCount, tpCount, ttCount));
         }
     }
 }
--- a/jdk/src/share/classes/sun/tools/jconsole/resources/messages.properties	Mon Dec 30 11:51:19 2013 +0800
+++ b/jdk/src/share/classes/sun/tools/jconsole/resources/messages.properties	Mon Dec 30 16:34:06 2013 +0400
@@ -227,6 +227,7 @@
 SUMMARY_TAB_TAB_NAME=VM Summary
 SUMMARY_TAB_VM_VERSION={0} version {1}
 THREADS=Threads
+THREAD_TAB_INFO_LABEL_FORMAT=<html>Live: {0}    Peak: {1}    Total: {2}</html>
 THREAD_TAB_THREAD_INFO_ACCESSIBLE_NAME=Thread Information
 THREAD_TAB_THREAD_PLOTTER_ACCESSIBLE_NAME=Chart for number of threads.
 THREAD_TAB_INITIAL_STACK_TRACE_MESSAGE=[No thread selected]
@@ -249,7 +250,7 @@
 UNREGISTER=Unregister
 UPTIME=Uptime
 USAGE_THRESHOLD=Usage Threshold
-REMOTE_TF_USAGE=<b>Usage</b>: &lt;hostname&gt;:&lt;port&gt; OR service:jmx:&lt;protocol&gt;:&lt;sap&gt;
+REMOTE_TF_USAGE=<b>Usage</b>: &&lt;hostname&&gt;:&&lt;port&&gt; OR service:jmx:&&lt;protocol&&gt;:&&lt;sap&&gt;
 USED=Used
 USERNAME_COLON_=&Username:
 USERNAME_ACCESSIBLE_NAME=User Name
--- a/jdk/src/share/classes/sun/tools/jconsole/resources/messages_ja.properties	Mon Dec 30 11:51:19 2013 +0800
+++ b/jdk/src/share/classes/sun/tools/jconsole/resources/messages_ja.properties	Mon Dec 30 16:34:06 2013 +0400
@@ -227,6 +227,7 @@
 SUMMARY_TAB_TAB_NAME=VM\u30B5\u30DE\u30EA\u30FC
 SUMMARY_TAB_VM_VERSION={0}\u30D0\u30FC\u30B8\u30E7\u30F3{1}
 THREADS=\u30B9\u30EC\u30C3\u30C9
+THREAD_TAB_INFO_LABEL_FORMAT=<html>\u5B9F\u884C\u4E2D: {0}    \u30D4\u30FC\u30AF: {1}    \u5408\u8A08: {2}</html>
 THREAD_TAB_THREAD_INFO_ACCESSIBLE_NAME=\u30B9\u30EC\u30C3\u30C9\u60C5\u5831
 THREAD_TAB_THREAD_PLOTTER_ACCESSIBLE_NAME=\u30B9\u30EC\u30C3\u30C9\u6570\u306E\u30C1\u30E3\u30FC\u30C8\u3002
 THREAD_TAB_INITIAL_STACK_TRACE_MESSAGE=[\u30B9\u30EC\u30C3\u30C9\u304C\u9078\u629E\u3055\u308C\u3066\u3044\u307E\u305B\u3093]
@@ -249,7 +250,7 @@
 UNREGISTER=\u767B\u9332\u89E3\u9664
 UPTIME=\u7A3C\u50CD\u6642\u9593
 USAGE_THRESHOLD=\u4F7F\u7528\u3057\u304D\u3044\u5024
-REMOTE_TF_USAGE=<b>\u4F7F\u7528\u65B9\u6CD5</b>: &lt;hostname&gt;:&lt;port&gt;\u307E\u305F\u306Fservice:jmx:&lt;protocol&gt;:&lt;sap&gt;
+REMOTE_TF_USAGE=<b>\u4F7F\u7528\u65B9\u6CD5</b>: &&lt;hostname&&gt;:&&lt;port&&gt;\u307E\u305F\u306Fservice:jmx:&&lt;protocol&&gt;:&&lt;sap&&gt;
 USED=\u4F7F\u7528\u6E08
 USERNAME_COLON_=\u30E6\u30FC\u30B6\u30FC\u540D(&U):
 USERNAME_ACCESSIBLE_NAME=\u30E6\u30FC\u30B6\u30FC\u540D
--- a/jdk/src/share/classes/sun/tools/jconsole/resources/messages_zh_CN.properties	Mon Dec 30 11:51:19 2013 +0800
+++ b/jdk/src/share/classes/sun/tools/jconsole/resources/messages_zh_CN.properties	Mon Dec 30 16:34:06 2013 +0400
@@ -227,6 +227,7 @@
 SUMMARY_TAB_TAB_NAME=VM \u6982\u8981
 SUMMARY_TAB_VM_VERSION={0}\u7248\u672C {1}
 THREADS=\u7EBF\u7A0B
+THREAD_TAB_INFO_LABEL_FORMAT=<html>\u6D3B\u52A8: {0}    \u5CF0\u503C: {1}    \u603B\u8BA1: {2}</html>
 THREAD_TAB_THREAD_INFO_ACCESSIBLE_NAME=\u7EBF\u7A0B\u4FE1\u606F
 THREAD_TAB_THREAD_PLOTTER_ACCESSIBLE_NAME=\u8868\u793A\u7EBF\u7A0B\u6570\u7684\u56FE\u8868\u3002
 THREAD_TAB_INITIAL_STACK_TRACE_MESSAGE=[\u672A\u9009\u62E9\u7EBF\u7A0B]
@@ -249,7 +250,7 @@
 UNREGISTER=\u6CE8\u9500
 UPTIME=\u8FD0\u884C\u65F6\u95F4
 USAGE_THRESHOLD=\u7528\u6CD5\u9608\u503C
-REMOTE_TF_USAGE=<b>\u7528\u6CD5</b>: &lt;hostname&gt;:&lt;port&gt; \u6216 service:jmx:&lt;protocol&gt;:&lt;sap&gt;
+REMOTE_TF_USAGE=<b>\u7528\u6CD5</b>: &&lt;hostname&&gt;:&&lt;port&&gt; \u6216 service:jmx:&&lt;protocol&&gt;:&&lt;sap&&gt;
 USED=\u5DF2\u7528
 USERNAME_COLON_=\u7528\u6237\u540D(&U):
 USERNAME_ACCESSIBLE_NAME=\u7528\u6237\u540D