summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSidharth Singh2013-03-25 09:39:10 (EDT)
committerSven Rottstock2013-03-25 09:39:10 (EDT)
commit76247d762f5898a59257ca9fabbfc37d2fd73429 (patch)
treefb6f3dee18830afa8a65c766533444eaadc68c94
parentf843eafaf303da56020efdebf17462a94fcacc56 (diff)
downloadorg.eclipse.stardust.ui.web-76247d762f5898a59257ca9fabbfc37d2fd73429.zip
org.eclipse.stardust.ui.web-76247d762f5898a59257ca9fabbfc37d2fd73429.tar.gz
org.eclipse.stardust.ui.web-76247d762f5898a59257ca9fabbfc37d2fd73429.tar.bz2
Jira-ID: CRNT-28359
Added code to return "en" locale when bundle.getLocale returns emtpy object. git-svn-id: http://emeafrazerg/svn/ipp/product/trunk/stardust/ui.web@63922 8100b5e0-4d52-466c-ae9c-bdeccbdeaf6b
-rw-r--r--portal-common/src/main/java/org/eclipse/stardust/ui/web/common/util/AbstractMessageBean.java10
1 files changed, 8 insertions, 2 deletions
diff --git a/portal-common/src/main/java/org/eclipse/stardust/ui/web/common/util/AbstractMessageBean.java b/portal-common/src/main/java/org/eclipse/stardust/ui/web/common/util/AbstractMessageBean.java
index ba62d71..d72cbfb 100644
--- a/portal-common/src/main/java/org/eclipse/stardust/ui/web/common/util/AbstractMessageBean.java
+++ b/portal-common/src/main/java/org/eclipse/stardust/ui/web/common/util/AbstractMessageBean.java
@@ -140,7 +140,7 @@ public abstract class AbstractMessageBean implements Map<String, String>, Serial
*/
public String getLocale()
{
- String country = bundle.getLocale().getCountry();
+ String country = getLocaleObject().getCountry();
if(StringUtils.isEmpty(country))
country = "US";
@@ -181,7 +181,13 @@ public abstract class AbstractMessageBean implements Map<String, String>, Serial
*/
public Locale getLocaleObject()
{
- return bundle.getLocale();
+ Locale locale = bundle.getLocale();
+ if (StringUtils.isEmpty(locale.toString()))
+ {
+ // When server JVM and client locale are not-translated, return default locale
+ return new Locale("en");
+ }
+ return locale;
}
public void clear()