keystone exception messages are not translating when locale is passed

Bug #1674415 reported by prashkre on 2017-03-20
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Identity (keystone)
Medium
prashkre
Ocata
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) on 2017-03-20
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) on 2017-03-20
description: updated
Changed in keystone:
importance: Undecided → Medium
status: New → Triaged

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

Changed in keystone:
assignee: nobody → prashkre (prashkre)
status: Triaged → In Progress

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
Changed in keystone:
milestone: none → pike-1

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)

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

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  Edit
Everyone can see this information.

Other bug subscribers