[JBoss JIRA] Created: (GTNPORTAL-1355) Locale is not set correctly in login form when login failed
by Gary Hu (JIRA)
Locale is not set correctly in login form when login failed
-----------------------------------------------------------
Key: GTNPORTAL-1355
URL: https://jira.jboss.org/browse/GTNPORTAL-1355
Project: GateIn Portal
Issue Type: Bug
Security Level: Public (Everyone can see)
Affects Versions: 3.0.0-GA
Reporter: Gary Hu
There are two scenarios to demonstrate the issue.
1. default locale and default OS LANG are both "en_US". If change the language to a different one other the default, and when login fails it shows the label text in English not the one selected previously. This happens to both Firefox and IE8 browsers.
To reproduce the issue:
1) open portal http://localhost:8080/portal
2) click the link "Change Language" at the top right corner, and change it to German
3) click "Anmeoden"(Sign in) and the login popup appears
4) fill in information not correct so the login fails and then be redirected to a different login page with the label showing English not in German.
2. default locale and default OS LANG are both "de_DE". If login fails it shows the label text in German as expected in IE8 but in English in Firefox.
1) open portal http://localhost:8080/portal
2) click "Anmeoden"(Sign in) and the login popup appears
3) fill in information not correct so the login fails and then be redirected to a different login page. If the browser is IE8, the label text shows German as expected. If the browser is Firefox the label
text shows in English.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years, 10 months
[JBoss JIRA] Created: (GTNPORTAL-1306) PortletRequest's locale to return user's preference language instead of the locale from Accept-Language header
by Leng Chye Ooi (JIRA)
PortletRequest's locale to return user's preference language instead of the locale from Accept-Language header
--------------------------------------------------------------------------------------------------------------
Key: GTNPORTAL-1306
URL: https://jira.jboss.org/browse/GTNPORTAL-1306
Project: GateIn Portal
Issue Type: Feature Request
Security Level: Public (Everyone can see)
Components: Internationalization and Localization
Affects Versions: 3.1.0-CR01, 3.0.0-GA
Reporter: Leng Chye Ooi
As per reported in the discussion forum ( https://community.jboss.org/thread/152834 ), PortletRequest.getLocale() is returning the locale value based on the HTTP Accept-Language header. My expectation, and I guess most users too, would expect the Change Language action on the portal should also reflected in all the portlets that support internationalization.
With a rough experiment, I am able to get the above expected scenario to work if I replace the org.exoplatform.portal.webui.application.ExoUserContext.getLocale() method above with
public Locale getLocale() {
PortalRequestContext context = PortalRequestContext.getCurrentInstance();
if(context != null) {
UIPortalApplication uiPortalApplication = (UIPortalApplication) context.getUIApplication();
Locale locale = uiPortalApplication.getLocale();
if (locale != null) return locale;
}
return clientRequest != null ? clientRequest.getLocale()
: Locale.ENGLISH;
}
Please advise if this is the correct approach. I am willing to submit a patch for this if need to.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years, 10 months