Remove log translations

Log messages are no longer being translated. This removes all use of
the _LE, _LI, and _LW translation markers to simplify logging and to
avoid confusion with new contributions.

See:
http://lists.openstack.org/pipermail/openstack-i18n/2016-November/002574.html
http://lists.openstack.org/pipermail/openstack-dev/2017-March/113365.html

Change-Id: Iee4995790132c9a05f93d7a0f847cc57021c8e89
This commit is contained in:
liyi 2017-03-23 19:03:45 +08:00
parent 4a84166ca7
commit 6487521406
2 changed files with 2 additions and 13 deletions

View File

@ -21,7 +21,6 @@ import six
from six import reraise as raise_
from tripleo_common.i18n import _
from tripleo_common.i18n import _LE
_FATAL_EXCEPTION_FORMAT_ERRORS = False
@ -47,9 +46,9 @@ class TripleoCommonException(Exception):
exc_info = sys.exc_info()
# kwargs doesn't match a variable in the message
# log the issue and the kwargs
LOG.exception(_LE('Exception in string format operation'))
LOG.exception('Exception in string format operation')
for name, value in kwargs.items():
LOG.error(_LE("%(name)s: %(value)s"),
LOG.error("%(name)s: %(value)s",
{'name': name, 'value': value}) # noqa
if _FATAL_EXCEPTION_FORMAT_ERRORS:

View File

@ -23,13 +23,3 @@ _translators = i18n.TranslatorFactory(domain='tripleo')
# The primary translation function using the well-known name "_"
_ = _translators.primary
# Translators for log levels.
#
# The abbreviated names are meant to reflect the usual use of a short
# name like '_'. The "L" is for "log" and the other letter comes from
# the level.
_LI = _translators.log_info
_LW = _translators.log_warning
_LE = _translators.log_error
_LC = _translators.log_critical