Incorrect use of translation _()

Bug #1777671 reported by Morgan Fainberg
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Identity (keystone)
Fix Released
Medium
Vishakha Agarwal

Bug Description

Keystone uses translated strings both in logging an exceptions. This is incorrect.

All strings that are passed to logging should remain un-translated. The solution is to duplicate the string and pass the untranslated (not wrapped with `_()`) to the logger while passing the translated `_()` wrapped string to the exception.

Relevant Discussion: http://eavesdrop.openstack.org/irclogs/%23openstack-oslo/%23openstack-oslo.2018-06-18.log.html#t2018-06-18T22:03:19

Changed in keystone:
status: New → Triaged
importance: Undecided → Medium
milestone: none → rocky-3
tags: added: low-hanging-fruit office-hours
description: updated
Changed in keystone:
assignee: nobody → Deepak Mourya (mourya007)
Revision history for this message
Colleen Murphy (krinkle) wrote :

Is this actually a problem? Is this causing more work for the translators or causing incorrect translations?

Changed in keystone:
importance: Medium → Low
Changed in keystone:
assignee: Deepak Mourya (mourya007) → nobody
Revision history for this message
Morgan Fainberg (mdrnstm) wrote :

It is emitting translated messages to logs.

OpenStack has standardized on translating only the exception messages.

Colleen Murphy (krinkle)
Changed in keystone:
importance: Low → Medium
sonu (sonu-bhumca11)
Changed in keystone:
assignee: nobody → sonu (sonu-bhumca11)
Revision history for this message
Lance Bragstad (lbragstad) wrote :

I don't think this is a hard blocker for Rocky RC1, but since it was targetted to rocky-3 I'm bumping it to rocky-rc1.

Changed in keystone:
milestone: rocky-3 → rocky-rc1
Revision history for this message
Vishakha Agarwal (vishakha.agarwal) wrote :

Hi Sonu,

Are you working on it?

Thanks

Changed in keystone:
assignee: sonu (sonu-bhumca11) → Vishakha Agarwal (vishakha.agarwal)
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/596683

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

Reviewed: https://review.openstack.org/596683
Committed: https://git.openstack.org/cgit/openstack/keystone/commit/?id=67435147ec4fc9762743c9474a17999a500fda07
Submitter: Zuul
Branch: master

commit 67435147ec4fc9762743c9474a17999a500fda07
Author: Vishakha Agarwal <email address hidden>
Date: Mon Aug 27 15:39:23 2018 +0530

    Incorrect use of translation _()

    Keystone uses translated strings both in
    logging an exceptions. This is incorrect.
    All strings that are passed to logging
    should remain un-translated. This patch
    addresses above issue.

    Change-Id: Idf4f0bc1bd63eb8dc6dc61d8a49a9e2a93320474
    Closes-Bug: #1777671

Changed in keystone:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/keystone 15.0.0.0rc1

This issue was fixed in the openstack/keystone 15.0.0.0rc1 release candidate.

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.