Author: theute
Date: 2011-03-16 17:01:52 -0400 (Wed, 16 Mar 2011)
New Revision: 6050
Modified:
epp/portal/branches/EPP_5_1_RH_Branch/webui/portal/src/main/java/org/exoplatform/portal/webui/navigation/PageNavigationUtils.java
epp/portal/branches/EPP_5_1_RH_Branch/webui/portal/src/main/java/org/exoplatform/portal/webui/navigation/UINavigationNodeSelector.java
epp/portal/branches/EPP_5_1_RH_Branch/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UIPortal.java
Log:
JBEPP-813: Translation of navigation elements not working for languages defined with
country variant
Rolling back before applying a conflicting bigger patch
Modified:
epp/portal/branches/EPP_5_1_RH_Branch/webui/portal/src/main/java/org/exoplatform/portal/webui/navigation/PageNavigationUtils.java
===================================================================
---
epp/portal/branches/EPP_5_1_RH_Branch/webui/portal/src/main/java/org/exoplatform/portal/webui/navigation/PageNavigationUtils.java 2011-03-16
20:57:44 UTC (rev 6049)
+++
epp/portal/branches/EPP_5_1_RH_Branch/webui/portal/src/main/java/org/exoplatform/portal/webui/navigation/PageNavigationUtils.java 2011-03-16
21:01:52 UTC (rev 6050)
@@ -407,9 +407,8 @@
{
if (nav.getOwnerType().equals(PortalConfig.USER_TYPE))
return;
- String localeLanguage = (locale.getCountry().length() > 0) ?
locale.getLanguage() + "_" + locale.getCountry() : locale.getLanguage();
ResourceBundle res =
- i18nManager.getNavigationResourceBundle(localeLanguage, nav.getOwnerType(),
nav.getOwnerId());
+ i18nManager.getNavigationResourceBundle(locale.getLanguage(),
nav.getOwnerType(), nav.getOwnerId());
for (PageNode node : nav.getNodes())
{
resolveLabel(res, node);
Modified:
epp/portal/branches/EPP_5_1_RH_Branch/webui/portal/src/main/java/org/exoplatform/portal/webui/navigation/UINavigationNodeSelector.java
===================================================================
---
epp/portal/branches/EPP_5_1_RH_Branch/webui/portal/src/main/java/org/exoplatform/portal/webui/navigation/UINavigationNodeSelector.java 2011-03-16
20:57:44 UTC (rev 6049)
+++
epp/portal/branches/EPP_5_1_RH_Branch/webui/portal/src/main/java/org/exoplatform/portal/webui/navigation/UINavigationNodeSelector.java 2011-03-16
21:01:52 UTC (rev 6050)
@@ -183,9 +183,8 @@
private void localizeNavigation(Locale locale)
{
- String localeLanguage = (locale.getCountry().length() > 0) ?
locale.getLanguage() + "_" + locale.getCountry() : locale.getLanguage();
LocaleConfig localeConfig =
-
getApplicationComponent(LocaleConfigService.class).getLocaleConfig(localeLanguage);
+
getApplicationComponent(LocaleConfigService.class).getLocaleConfig(locale.getLanguage());
String ownerType = edittedNavigation.getOwnerType();
if (!PortalConfig.USER_TYPE.equals(ownerType))
{
Modified:
epp/portal/branches/EPP_5_1_RH_Branch/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UIPortal.java
===================================================================
---
epp/portal/branches/EPP_5_1_RH_Branch/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UIPortal.java 2011-03-16
20:57:44 UTC (rev 6049)
+++
epp/portal/branches/EPP_5_1_RH_Branch/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UIPortal.java 2011-03-16
21:01:52 UTC (rev 6050)
@@ -382,8 +382,7 @@
ResourceBundleManager mgr = getApplicationComponent(ResourceBundleManager.class);
if (nav.getOwnerType().equals(PortalConfig.USER_TYPE))
return;
- String localeLanguage = (locale.getCountry().length() > 0) ?
locale.getLanguage() + "_" + locale.getCountry() : locale.getLanguage();
- ResourceBundle res = mgr.getNavigationResourceBundle(localeLanguage,
nav.getOwnerType(), nav.getOwnerId());
+ ResourceBundle res = mgr.getNavigationResourceBundle(locale.getLanguage(),
nav.getOwnerType(), nav.getOwnerId());
for (PageNode node : nav.getNodes())
{
resolveLabel(res, node);
Show replies by date