静 黎 has uploaded a new change for review.

Change subject: engine:solve the language switch fuction failure problem
......................................................................

engine:solve the language switch fuction failure problem

Modify the judgment statement at change the locale event.
When the current locale is not English, if we want to switch
locale to English, the localeName is "default",the judgment
return false, we cant't switch locale to English.

Change-Id: I946d4657b50613d7352f1e142332c59f8260a760
Signed-off-by: 黎静 <[email protected]>
---
M 
frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/view/AbstractLoginPopupView.java
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/17/12217/1

diff --git 
a/frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/view/AbstractLoginPopupView.java
 
b/frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/view/AbstractLoginPopupView.java
index 0eb8cd32..cecd95d 100644
--- 
a/frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/view/AbstractLoginPopupView.java
+++ 
b/frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/view/AbstractLoginPopupView.java
@@ -53,7 +53,7 @@
         selectedLocale = new Label();
 
         // Add the option to change the locale
-        String currentLocale = LocaleInfo.getCurrentLocale().getLocaleName();
+        final String currentLocale = 
LocaleInfo.getCurrentLocale().getLocaleName();
         String[] localeNames = LocaleInfo.getAvailableLocaleNames();
 
         for (String localeName : localeNames) {
@@ -79,7 +79,7 @@
                 String localeName = 
localeBox.getValue(localeBox.getSelectedIndex());
                 String localeString = ""; //$NON-NLS-1$
 
-                if (!localeName.equals("default")) { //$NON-NLS-1$
+                if (!localeName.equals(currentLocale)) {
                     localeString = "?locale=" + localeName; //$NON-NLS-1$
                 }
                 Window.open(FrontendUrlUtils.getCurrentPageURL() + 
localeString, "_self", ""); //$NON-NLS-1$ //$NON-NLS-2$


--
To view, visit http://gerrit.ovirt.org/12217
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I946d4657b50613d7352f1e142332c59f8260a760
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: 静 黎 <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to