keystone exception messages are not translating when locale is passed

Bug #1674415 reported by prashkre
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Identity (keystone)
Fix Released
Medium
prashkre
Ocata
Fix Committed
Medium
prashkre

Bug Description

When user invokes identity API's on an environment with locale being passed, keystone.exception messages are not getting translated in case of any error messages from identity API.

From observation, we found error_message at [0] is of type <unicode> and in oslo_i18n module [1], it is expecting oslo_i18n._message.Message type for translation.

[0]https://github.com/openstack/keystone/blob/master/keystone/common/wsgi.py#L790
[1] https://github.com/openstack/oslo.i18n/blob/master/oslo_i18n/_translate.py#L45

prashkre (prashkre)
description: updated
summary: - keystone exception messages are not translating when locale is set
+ keystone exception messages are not translating when locale is passed
prashkre (prashkre)
description: updated
Changed in keystone:
importance: Undecided → Medium
status: New → Triaged
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/449769

Changed in keystone:
assignee: nobody → prashkre (prashkre)
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to keystone (master)

Reviewed: https://review.openstack.org/449769
Committed: https://git.openstack.org/cgit/openstack/keystone/commit/?id=2126bd576550a68284e05fc8eadedce072531563
Submitter: Jenkins
Branch: master

commit 2126bd576550a68284e05fc8eadedce072531563
Author: prashkre <email address hidden>
Date: Fri Mar 24 13:44:00 2017 -0400

    Error messages are not translating with locale.

    Fixed issue with translation of keystone error messages which
    was not happening in case of any error messages from identity API
    with locale being set.

    Change-Id: Idc73e86647f2adce9e39387b0c3124431dcac255
    Closes-Bug: #1674415

Changed in keystone:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to keystone (stable/ocata)

Fix proposed to branch: stable/ocata
Review: https://review.openstack.org/450027

Changed in keystone:
milestone: none → pike-1
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to keystone (stable/ocata)

Reviewed: https://review.openstack.org/450027
Committed: https://git.openstack.org/cgit/openstack/keystone/commit/?id=c541e1ec5c2a3937e9d90cc106a4727c6c2b47db
Submitter: Jenkins
Branch: stable/ocata

commit c541e1ec5c2a3937e9d90cc106a4727c6c2b47db
Author: prashkre <email address hidden>
Date: Fri Mar 24 13:44:00 2017 -0400

    Error messages are not translating with locale.

    Fixed issue with translation of keystone error messages which
    was not happening in case of any error messages from identity API
    with locale being set.

    Change-Id: Idc73e86647f2adce9e39387b0c3124431dcac255
    Closes-Bug: #1674415
    (cherry picked from commit 2126bd576550a68284e05fc8eadedce072531563)

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/keystone 12.0.0.0b1

This issue was fixed in the openstack/keystone 12.0.0.0b1 development milestone.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/keystone 11.0.1

This issue was fixed in the openstack/keystone 11.0.1 release.

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.