Need use _() to handle i18n string messages

Bug #1220502 reported by YangLei
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Identity (keystone)
Invalid
Low
Unassigned

Bug Description

Need use _() to handle the string message in file keystone/identity/controllers.py

On a non-english env (ja), we will see the english message strings, when we create or update a user with empty name or empty Enabled. In fact, we need the non-english (ja) messages.

And find the follow string messages in file keystone/identity/controllers.py:
            msg = 'Name field is required and cannot be empty'
                msg = 'Marker could not be found'
                msg = 'Invalid limit value'
            msg = 'Name field is required and cannot be empty'
            msg = 'Enabled field must be a boolean'
            msg = 'Enabled field should be a boolean'
            msg = 'Name field is required and cannot be empty'
            msg = 'Specify a domain or project, not both'
           msg = 'Specify a user or group, not both'

YangLei (yanglyy)
Changed in keystone:
assignee: nobody → YangLei (yanglyy)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to keystone (master)

Fix proposed to branch: master
Review: https://review.openstack.org/44997

Changed in keystone:
status: New → In Progress
Revision history for this message
Lance Bragstad (lbragstad) wrote : Re: Need use _() to handle the string message in file keystone/identity/controllers.py

YangLei can you give some steps on how you reproduced this?

Revision history for this message
YangLei (yanglyy) wrote :

find/search msg = ' in file keystone/identity/controllers.py
You will get the string message list which need to be handled with _().

Revision history for this message
ZhiQiang Fan (aji-zqfan) wrote :

can you fix all i18n problem in keystone, not just a single file?

Revision history for this message
YangLei (yanglyy) wrote :

I do not think someone can fix all i18n problem in one bug for keystone,
In that way, someone have to find all the i18n problem in keystone first. It is too difficult to find out all problem.

I just see the problem when do the follow actions:
Create or update a user with empty name or empty Enabled

description: updated
Dolph Mathews (dolph)
Changed in keystone:
importance: Undecided → Low
summary: - Need use _() to handle the string message in file
- keystone/identity/controllers.py
+ Need use _() to handle i18n string messages
Revision history for this message
Dolph Mathews (dolph) wrote :

Tracking any issue file by file would be ridiculous to keep up with.

String freeze for havana is today [1], so I'd suggest making as many improvements as you can under the same bug / patch.

[1]: https://wiki.openstack.org/wiki/Havana_Release_Schedule

Changed in keystone:
assignee: YangLei (yanglyy) → Dolph Mathews (dolph)
Dolph Mathews (dolph)
Changed in keystone:
assignee: Dolph Mathews (dolph) → YangLei (yanglyy)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to keystone (master)

Reviewed: https://review.openstack.org/44997
Committed: http://github.com/openstack/keystone/commit/4bfa58ddb80c8484ad510d65fd3760429e5f3c6c
Submitter: Jenkins
Branch: master

commit 4bfa58ddb80c8484ad510d65fd3760429e5f3c6c
Author: YangLei <email address hidden>
Date: Wed Sep 4 11:14:22 2013 +0800

    Need to use _() to handle i18n string messages

    Partial-Bug: #1220502
    Change-Id: If31dd659794743837e2e494a2b6ae4488ef6ca32

Revision history for this message
Dolph Mathews (dolph) wrote :

Unassigning due to inactivity.

Changed in keystone:
assignee: YangLei (yanglyy) → nobody
status: In Progress → Triaged
Revision history for this message
Morgan Fainberg (mdrnstm) wrote :

It looks like this has been fixed for a while / no longer an issue. I'm going to mark this bug as invalid (cleaning up the bug tracker)

Changed in keystone:
status: Triaged → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.