yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #39614
[Bug 1502753] [NEW] some strings only used for logging is marked as translatable
Public bug reported:
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)
** Affects: horizon
Importance: Low
Assignee: Akihiro Motoki (amotoki)
Status: In Progress
** Tags: i18n
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Dashboard (Horizon).
https://bugs.launchpad.net/bugs/1502753
Title:
some strings only used for logging is marked as translatable
Status in OpenStack Dashboard (Horizon):
In Progress
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)
To manage notifications about this bug go to:
https://bugs.launchpad.net/horizon/+bug/1502753/+subscriptions
Follow ups