some strings only used for logging is marked as translatable

Bug #1502753 reported by Akihiro Motoki
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Dashboard (Horizon)
Fix Released
Low
Akihiro Motoki

Bug Description

There are strings marked as translatable but used only for logging in horizon/tables/base.py
It leads to unnecessary effort in translations (for example, to check the context which is used).
I would suggest to remove _() from these strings.

@@ -358,8 +358,8 @@ class Column(html.HTMLElement):
             try:
                 data = getattr(datum, self.transform)
             except AttributeError:
                 msg = _("The attribute %(attr)s doesn't exist on "
                         "%(obj)s.") % {'attr': self.transform, 'obj': datum}
                 msg = termcolors.colorize(msg, **PALETTE['ERROR'])
                 LOG.warning(msg)
                 data = None
@@ -1577,8 +1577,7 @@ class DataTable(object):

             # If not allowed, neither edit mod or updating is allowed.
             if not cell.update_allowed:
                 datum_display = (self.get_object_display(datum) or
                                  _("N/A"))
                 LOG.info('Permission denied to %s: "%s"' %
                          ("Update Action", datum_display))
                 return HttpResponse(status=401)

Tags: i18n
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to horizon (master)

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

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

Reviewed: https://review.openstack.org/230877
Committed: https://git.openstack.org/cgit/openstack/horizon/commit/?id=1b975bc87edfe3909990c05e15c02b42cf438b0f
Submitter: Jenkins
Branch: master

commit 1b975bc87edfe3909990c05e15c02b42cf438b0f
Author: Akihiro Motoki <email address hidden>
Date: Mon Oct 5 13:55:53 2015 +0900

    Remove _() from strings used only for logging

    Closes-Bug: #1502753
    Change-Id: I9fec73d6419e7b385fcb648aea5109644971e69e

Changed in horizon:
status: In Progress → Fix Committed
Revision history for this message
Doug Hellmann (doug-hellmann) wrote : Fix included in openstack/horizon 9.0.0.0b1

This issue was fixed in the openstack/horizon 9.0.0.0b1 development milestone.

Changed in horizon:
status: Fix Committed → Fix Released
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.