7019937: Translatability bug - Remove Unused String - String ID , read end of file
authormullan
Tue, 29 Mar 2011 10:39:00 -0400
changeset 9011 c08eb9697ee4
parent 8994 ef946d820d04
child 9012 c9c62baa6302
7019937: Translatability bug - Remove Unused String - String ID , read end of file 7019938: Translatability bug - Remove Unused String - String ID can not specify Principal with a 7019940: Translatability bug - Remove unused string - String ID: provided null name 7019942: Translatability bug - String ID: trustedCertEntry, 7019945: Translatability bug - Translatability issue - String ID: * has NOT been verified! In order to veri 7019947: Translatability bug - Translatability issue - String ID: * The integrity of the information stored i 7019949: Translatability bug - Translatability issue - String ID: * you must provide your keystore password. Reviewed-by: weijun, wetmore
jdk/src/share/classes/com/sun/security/auth/PolicyParser.java
jdk/src/share/classes/sun/security/tools/JarSigner.java
jdk/src/share/classes/sun/security/tools/JarSignerResources.java
jdk/src/share/classes/sun/security/tools/KeyTool.java
jdk/src/share/classes/sun/security/util/AuthResources.java
jdk/src/share/classes/sun/security/util/Resources.java
--- a/jdk/src/share/classes/com/sun/security/auth/PolicyParser.java	Wed Mar 23 18:26:58 2011 +0800
+++ b/jdk/src/share/classes/com/sun/security/auth/PolicyParser.java	Tue Mar 29 10:39:00 2011 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2011, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -30,13 +30,14 @@
 import java.net.MalformedURLException;
 import java.net.SocketPermission;
 import java.net.URL;
+import java.security.GeneralSecurityException;
+import java.text.MessageFormat;
 import java.util.Enumeration;
 import java.util.Hashtable;
 import java.util.LinkedList;
 import java.util.ListIterator;
 import java.util.Vector;
 import java.util.StringTokenizer;
-import java.security.GeneralSecurityException;
 import sun.security.util.PropertyExpander;
 
 /**
@@ -368,8 +369,8 @@
                                 "WILDCARD class but no WILDCARD name");
                     throw new ParsingException
                         (st.lineno(),
-                        rb.getString("can.not.specify.Principal.with.a.") +
-                        rb.getString("wildcard.class.without.a.wildcard.name"));
+                        rb.getString("can.not.specify.Principal.with.a." +
+                                     "wildcard.class.without.a.wildcard.name"));
                 }
 
                 try {
@@ -525,9 +526,10 @@
                                         rb.getString("number.") +
                                         String.valueOf(st.nval));
         case StreamTokenizer.TT_EOF:
-           throw new ParsingException
-                (rb.getString("expected.") + expect +
-                rb.getString(".read.end.of.file"));
+            MessageFormat form = new MessageFormat(
+                    rb.getString("expected.expect.read.end.of.file."));
+            Object[] source = {expect};
+            throw new ParsingException(form.format(source));
         case StreamTokenizer.TT_WORD:
             if (expect.equalsIgnoreCase(st.sval)) {
                 lookahead = st.nextToken();
--- a/jdk/src/share/classes/sun/security/tools/JarSigner.java	Wed Mar 23 18:26:58 2011 +0800
+++ b/jdk/src/share/classes/sun/security/tools/JarSigner.java	Tue Mar 29 10:39:00 2011 -0400
@@ -1238,8 +1238,6 @@
                 // Provide a helpful message when TSA is beyond a firewall
                 error(rb.getString("unable.to.sign.jar.") +
                 rb.getString("no.response.from.the.Timestamping.Authority.") +
-                rb.getString("When.connecting.from.behind.a.firewall.an.HTTP.or.HTTPS.proxy.may.need.to.be.specified.") +
-                rb.getString("Supply.the.following.options.to.jarsigner.") +
                 "\n  -J-Dhttp.proxyHost=<hostname>" +
                 "\n  -J-Dhttp.proxyPort=<portnumber>\n" +
                 rb.getString("or") +
--- a/jdk/src/share/classes/sun/security/tools/JarSignerResources.java	Wed Mar 23 18:26:58 2011 +0800
+++ b/jdk/src/share/classes/sun/security/tools/JarSignerResources.java	Tue Mar 29 10:39:00 2011 -0400
@@ -181,11 +181,9 @@
         {"TSA.location.", "TSA location: "},
         {"TSA.certificate.", "TSA certificate: "},
         {"no.response.from.the.Timestamping.Authority.",
-                "no response from the Timestamping Authority. "},
-        {"When.connecting.from.behind.a.firewall.an.HTTP.or.HTTPS.proxy.may.need.to.be.specified.",
-                "When connecting from behind a firewall an HTTP or HTTPS proxy may need to be specified. "},
-        {"Supply.the.following.options.to.jarsigner.",
-                "Supply the following options to jarsigner: "},
+                "no response from the Timestamping Authority. When connecting"
+                + " from behind a firewall an HTTP or HTTPS proxy may need to"
+                + " be specified. Supply the following options to jarsigner:"},
         {"or", "or"},
         {"Certificate.not.found.for.alias.alias.must.reference.a.valid.KeyStore.entry.containing.an.X.509.public.key.certificate.for.the",
                 "Certificate not found for: {0}.  {1} must reference a valid KeyStore entry containing an X.509 public key certificate for the Timestamping Authority."},
--- a/jdk/src/share/classes/sun/security/tools/KeyTool.java	Wed Mar 23 18:26:58 2011 +0800
+++ b/jdk/src/share/classes/sun/security/tools/KeyTool.java	Tue Mar 29 10:39:00 2011 -0400
@@ -1740,16 +1740,19 @@
                 KeyStore.TrustedCertificateEntry.class)) {
             // We have a trusted certificate entry
             Certificate cert = keyStore.getCertificate(alias);
+            Object[] source = {"trustedCertEntry"};
+            String mf = new MessageFormat(
+                    rb.getString("Entry.type.type.")).format(source) + "\n";
             if (verbose && (cert instanceof X509Certificate)) {
-                out.println(rb.getString("Entry.type.trustedCertEntry."));
+                out.println(mf);
                 printX509Cert((X509Certificate)cert, out);
             } else if (rfc) {
-                out.println(rb.getString("Entry.type.trustedCertEntry."));
+                out.println(mf);
                 dumpCert(cert, out);
             } else if (debug) {
                 out.println(cert.toString());
             } else {
-                out.println(rb.getString("trustedCertEntry."));
+                out.println("trustedCertEntry, ");
                 out.println(rb.getString("Certificate.fingerprint.SHA1.")
                             + getCertFingerPrint("SHA1", cert));
             }
@@ -1837,10 +1840,6 @@
             System.err.println(rb.getString
                 (".The.integrity.of.the.information.stored.in.the.srckeystore."));
             System.err.println(rb.getString
-                (".has.NOT.been.verified.In.order.to.verify.its.integrity."));
-            System.err.println(rb.getString
-                (".you.must.provide.the.srckeystore.password."));
-            System.err.println(rb.getString
                 (".WARNING.WARNING.WARNING."));
             System.err.println();
         }
@@ -3187,10 +3186,6 @@
         System.err.println(rb.getString
             (".The.integrity.of.the.information.stored.in.your.keystore."));
         System.err.println(rb.getString
-            (".has.NOT.been.verified.In.order.to.verify.its.integrity."));
-        System.err.println(rb.getString
-            (".you.must.provide.your.keystore.password."));
-        System.err.println(rb.getString
             (".WARNING.WARNING.WARNING."));
         System.err.println();
     }
--- a/jdk/src/share/classes/sun/security/util/AuthResources.java	Wed Mar 23 18:26:58 2011 +0800
+++ b/jdk/src/share/classes/sun/security/util/AuthResources.java	Tue Mar 29 10:39:00 2011 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -111,17 +111,15 @@
 
         // com.sun.security.auth.PolicyParser
         {"expected.keystore.type", "expected keystore type"},
-        {"can.not.specify.Principal.with.a.",
-                "can not specify Principal with a "},
-        {"wildcard.class.without.a.wildcard.name",
-                "wildcard class without a wildcard name"},
+        {"can.not.specify.Principal.with.a.wildcard.class.without.a.wildcard.name",
+                "can not specify Principal with a wildcard class without a wildcard name"},
         {"expected.codeBase.or.SignedBy", "expected codeBase or SignedBy"},
         {"only.Principal.based.grant.entries.permitted",
                 "only Principal-based grant entries permitted"},
         {"expected.permission.entry", "expected permission entry"},
         {"number.", "number "},
-        {"expected.", "expected "},
-        {".read.end.of.file", ", read end of file"},
+        {"expected.expect.read.end.of.file.",
+                "expected {0}, read end of file"},
         {"expected.read.end.of.file", "expected ';', read end of file"},
         {"line.", "line "},
         {".expected.", ": expected '"},
@@ -136,6 +134,9 @@
         {"SolarisNumericUserPrincipal.",
                 "SolarisNumericUserPrincipal: "},
         {"SolarisPrincipal.", "SolarisPrincipal: "},
+        // provided.null.name is the NullPointerException message when a
+        // developer incorrectly passes a null name to the constructor of
+        // subclasses of java.security.Principal
         {"provided.null.name", "provided null name"}
 
     };
--- a/jdk/src/share/classes/sun/security/util/Resources.java	Wed Mar 23 18:26:58 2011 +0800
+++ b/jdk/src/share/classes/sun/security/util/Resources.java	Tue Mar 29 10:39:00 2011 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -304,8 +304,6 @@
         {"Certificate.chain.length.", "Certificate chain length: "},
         {"Certificate.i.1.", "Certificate[{0,number,integer}]:"},
         {"Certificate.fingerprint.SHA1.", "Certificate fingerprint (SHA1): "},
-        {"Entry.type.trustedCertEntry.", "Entry type: trustedCertEntry\n"},
-        {"trustedCertEntry.", "trustedCertEntry,"},
         {"Keystore.type.", "Keystore type: "},
         {"Keystore.provider.", "Keystore provider: "},
         {"Your.keystore.contains.keyStore.size.entry",
@@ -378,21 +376,15 @@
         {"No.certificate.from.the.SSL.server",
                 "No certificate from the SSL server"},
 
-        // Translators of the following 5 pairs, ATTENTION:
-        // the next 5 string pairs are meant to be combined into 2 paragraphs,
-        // 1+3+4 and 2+3+5. make sure your translation also does.
         {".The.integrity.of.the.information.stored.in.your.keystore.",
-            "* The integrity of the information stored in your keystore  *"},
+            "* The integrity of the information stored in your keystore  *\n" +
+            "* has NOT been verified!  In order to verify its integrity, *\n" +
+            "* you must provide your keystore password.                  *"},
         {".The.integrity.of.the.information.stored.in.the.srckeystore.",
-            "* The integrity of the information stored in the srckeystore*"},
-        {".has.NOT.been.verified.In.order.to.verify.its.integrity.",
-            "* has NOT been verified!  In order to verify its integrity, *"},
-        {".you.must.provide.your.keystore.password.",
-            "* you must provide your keystore password.                  *"},
-        {".you.must.provide.the.srckeystore.password.",
+            "* The integrity of the information stored in the srckeystore*\n" +
+            "* has NOT been verified!  In order to verify its integrity, *\n" +
             "* you must provide the srckeystore password.                *"},
 
-
         {"Certificate.reply.does.not.contain.public.key.for.alias.",
                 "Certificate reply does not contain public key for <{0}>"},
         {"Incomplete.certificate.chain.in.reply",