Bug 907784 - Login form translations get cached
Summary: Login form translations get cached
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: python-django-openstack-auth
Version: 2.1
Hardware: Unspecified
OS: Linux
unspecified
unspecified
Target Milestone: snapshot4
: 2.1
Assignee: Julie Pichon
QA Contact: Nir Magnezi
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-02-05 09:30 UTC by Julie Pichon
Modified: 2015-02-15 22:02 UTC (History)
3 users (show)

Fixed In Version: python-django-openstack-auth-1.0.6-2.el6ost
Doc Type: Rebase: Bug Fixes and Enhancements
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-03-21 19:05:29 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Patch for lazy translations (1.40 KB, patch)
2013-02-21 19:18 UTC, Julie Pichon
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2013:0672 0 normal SHIPPED_LIVE Red Hat OpenStack 2.0 (Folsom) Preview bug fix and enhancement update 2013-03-21 23:02:46 UTC

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


Note You need to log in before you can comment on or make changes to this bug.