Author: markt
Date: Thu Aug 15 17:02:48 2013
New Revision: 1514376
URL: http://svn.apache.org/r1514376
Log:
Fix issue reported on users list.
Because the default bundle reports as the ROOT locale rather than as ENGLISH,
the request locale to resource bundle mapping failed.
Modified:
tomcat/tc7.0.x/trunk/ (props changed)
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/res/StringManager.java
tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml
Propchange: tomcat/tc7.0.x/trunk/
------------------------------------------------------------------------------
Merged /tomcat/trunk:r1514368
Modified:
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/res/StringManager.java
URL:
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/res/StringManager.java?rev=1514376&r1=1514375&r2=1514376&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/res/StringManager.java
(original)
+++ tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/res/StringManager.java Thu
Aug 15 17:02:48 2013
@@ -88,7 +88,12 @@ public class StringManager {
bundle = bnd;
// Get the actual locale, which may be different from the requested one
if (bundle != null) {
- this.locale = bundle.getLocale();
+ Locale bundleLocale = bundle.getLocale();
+ if (bundleLocale.equals(Locale.ROOT)) {
+ this.locale = Locale.ENGLISH;
+ } else {
+ this.locale = bundle.getLocale();
+ }
} else {
this.locale = null;
}
Modified: tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml
URL:
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml?rev=1514376&r1=1514375&r2=1514376&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Thu Aug 15 17:02:48 2013
@@ -224,6 +224,12 @@
Remove the experimental label from the AJP NIO connector documentation.
(markt)
</update>
+ <fix>
+ Correctly associated the default resource bundle with the English
locale
+ so that requests that specify an Accept-Language of English ahead of
+ French, Spanish or Japanese get the English messages they asked for.
+ (markt)
+ </fix>
</changelog>
</subsection>
<subsection name="Other">
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]