Author: markt
Date: Mon Feb  4 14:53:07 2019
New Revision: 1852923

URL: http://svn.apache.org/viewvc?rev=1852923&view=rev
Log:
Fix https://bz.apache.org/bugzilla/show_bug.cgi?id=63143
Ensure that the Manager web application respects the language preferences of 
the user as configured in the browser when the language of the default system 
locale is not English.

Modified:
    tomcat/trunk/java/org/apache/tomcat/util/res/StringManager.java
    tomcat/trunk/webapps/docs/changelog.xml

Modified: tomcat/trunk/java/org/apache/tomcat/util/res/StringManager.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/res/StringManager.java?rev=1852923&r1=1852922&r2=1852923&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/util/res/StringManager.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/res/StringManager.java Mon Feb  4 
14:53:07 2019
@@ -72,6 +72,13 @@ public class StringManager {
         String bundleName = packageName + ".LocalStrings";
         ResourceBundle bnd = null;
         try {
+            // The ROOT Locale uses English. If English is requested, force the
+            // use of the ROOT Locale else incorrect results may be obtained if
+            // the system default locale is not English and translations are
+            // available for the system default locale.
+            if (locale.getLanguage().equals(Locale.ENGLISH.getLanguage())) {
+                locale = Locale.ROOT;
+            }
             bnd = ResourceBundle.getBundle(bundleName, locale);
         } catch (MissingResourceException ex) {
             // Try from the current loader (that's the case for trusted apps)

Modified: tomcat/trunk/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1852923&r1=1852922&r2=1852923&view=diff
==============================================================================
--- tomcat/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/trunk/webapps/docs/changelog.xml Mon Feb  4 14:53:07 2019
@@ -58,6 +58,11 @@
         start with <code>OK -</code> where expected by the associated Ant 
tasks.
         (markt)
       </fix>
+      <fix>
+        <bug>63143</bug>: Ensure that the Manager web application respects the
+        language preferences of the user as configured in the browser when the
+        language of the default system locale is not English. (markt)
+      </fix>
     </changelog>
   </subsection>
   <subsection name="Tribes">



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to