Bug 1323484

Summary: oVirt welcome page locale selector is broken
Product: [oVirt] ovirt-engine Reporter: Greg Sheremeta <gshereme>
Component: Frontend.CoreAssignee: Ravi Nori <rnori>
Status: CLOSED CURRENTRELEASE QA Contact: Petr Matyáš <pmatyas>
Severity: high Docs Contact:
Priority: high    
Version: 4.0.0CC: awels, bugs, gshereme, mperina, oourfali, pmatyas, ratamir, rnori, sbonazzo
Target Milestone: ovirt-4.0.1Flags: rule-engine: ovirt-4.0.z+
rule-engine: planning_ack+
rule-engine: devel_ack+
rule-engine: testing_ack+
Target Release: 4.0.1.1   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
--no tech note required
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-07-19 06:26:05 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Infra RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1347148    
Bug Blocks: 1304653    

Description Greg Sheremeta 2016-04-03 14:36:09 UTC
Description of problem:
oVirt welcome page locale selector is broken

Version-Release number of selected component (if applicable):
master, 4.0

How reproducible:
always

Steps to Reproduce:
1. make sure oVirt is compiled with all locales
2. browse to the welcome page (i.e. http://localhost:8080/ovirt-engine)
3. change the locale from English to something else

Actual results:
English stays selected

Expected results:
The other language should work

Additional info:
This can be worked around by logging into webadmin, and then adding your desired locale on the URL
e.g. change
http://localhost:8080/ovirt-engine/webadmin/?locale=en_US
to
http://localhost:8080/ovirt-engine/webadmin/?locale=ja_JP
and hit Enter

Comment 1 Greg Sheremeta 2016-04-03 14:37:53 UTC
Not sure if this is a UX or AAA issue.

Comment 4 Greg Sheremeta 2016-04-13 13:02:08 UTC
*** Bug 1325767 has been marked as a duplicate of this bug. ***

Comment 5 Greg Sheremeta 2016-04-13 13:03:26 UTC
Comment from Sandro in Bug 1325767

engine logs show nothing relevant.
browser console shows:
splash.js:4 Uncaught TypeError: Cannot read property 'style' of nullpageLoaded @ splash.js:4 onload @ (index):57

Comment 6 Greg Sheremeta 2016-04-13 22:17:29 UTC
I fixed the splash.js error, although it is not the cause of this issue.

Comment 7 Greg Sheremeta 2016-04-14 16:59:02 UTC
The cause of this bug is that the new sso-based welcome page does not forward along the locale parameter the the /ovirt-engine/ page, which is the first non-302 page that has a chance to set the locale cookie. By the time we get to that page, the locale defaults to English. Thus, only English can ever be set.

Assigning to Ravi / infra team.

After chatting with everyone, we think it should be done on that very first redirect to /login. So that first 302 redirect response should contain a Set-Cookie header. All subsequent requests would pass the cookie and no url param.

Comment 8 Petr Matyáš 2016-06-13 12:54:17 UTC
Login page is not translated to selected language from welcome page.

Tested on ovirt-engine-4.1.0-0.0.master.20160612231308.gitff046da.el7.centos.noarch

Comment 9 Greg Sheremeta 2016-06-13 15:42:12 UTC
The login page doesn't, but everything else does, right?

(There is a separate bug on the login page app.)

Comment 10 Red Hat Bugzilla Rules Engine 2016-06-13 22:56:52 UTC
Target release should be placed once a package build is known to fix a issue. Since this bug is not modified, the target version has been reset. Please use target milestone to plan a fix for a oVirt release.

Comment 11 Martin Perina 2016-06-15 13:55:32 UTC
The login page localization infrastructure is prepared, but we forgot to add those new translations files into Zanata. This has been done yesterday, as soon as updated translations are merged into oVirt, I will change bug status to MODIFIED.

Comment 12 Martin Perina 2016-06-29 11:08:41 UTC
Moving bug to MODIFIED as translations have been merged.

Comment 13 Petr Matyáš 2016-07-14 10:55:23 UTC
Verified on 4.0.1-2

Comment 14 Sandro Bonazzola 2016-07-19 06:26:05 UTC
Since the problem described in this bug report should be
resolved in oVirt 4.0.1 released on July 19th 2016, it has been closed with a
resolution of CURRENT RELEASE.

For information on the release, and how to update to this release, follow the link below.

If the solution does not work for you, open a new bug report.

http://www.ovirt.org/release/4.0.1/