Bug 907784

Summary: Login form translations get cached
Product: Red Hat OpenStack Reporter: Julie Pichon <jpichon>
Component: python-django-openstack-authAssignee: Julie Pichon <jpichon>
Status: CLOSED ERRATA QA Contact: Nir Magnezi <nmagnezi>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 2.1CC: athomas, jpichon, mrunge
Target Milestone: snapshot4Keywords: Rebase, Triaged
Target Release: 2.1   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: python-django-openstack-auth-1.0.6-2.el6ost Doc Type: Rebase: Bug Fixes and Enhancements
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-03-21 19:05:29 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Patch for lazy translations none

Description Julie Pichon 2013-02-05 09:30:32 UTC
Description of problem:
The translations for the login page get cached, so you can sometimes get the wrong language regardless of your browser's language.

Version-Release number of selected component (if applicable):
python-django-openstack-auth-1.0.2-3.1.el6.noarch

How reproducible:


Steps to Reproduce:
1. Load the login page with your language's default, e.g. English
2. Go to your browser's preference and change the browser display language to Spanish or Japanese.
3. 

Actual results:

Reload the login page a few times: only the "Login" word will be consistently translated, while "User Name" and "Password" will remain in English.

Expected results:

The entire page should show in the new language.

Additional info:

The auth form doesn't use lazy translations. We should backport the ugettext_lazy part of that patch: https://github.com/samos123/django_openstack_auth/commit/e2523bb2a7d8bb210a74fff834200e8df554a918 - this fixed it for me.

Comment 5 Julie Pichon 2013-02-21 19:18:38 UTC
Created attachment 700777 [details]
Patch for lazy translations

Comment 10 Nir Magnezi 2013-03-06 09:44:08 UTC
Verified NVR: python-django-horizon-2012.2.3-5.el6ost.noarch

Verification Steps (provided by Juile)

If a browser with the Spanish locale (in Firefox: Edit -> Preferences -> Content -> Languages -> Choose -> Put Spanish [es] on top of the list), display the login page. It will be in Spanish.

The login page is now completely translated to Spanish:

Log In --> Ingresar
User Name --> Nombre de Usuario
Password --> ContraseƱa

Comment 12 errata-xmlrpc 2013-03-21 19:05:29 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

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

http://rhn.redhat.com/errata/RHBA-2013-0672.html