diff --git a/senlinclient/common/i18n.py b/senlinclient/common/i18n.py index 818114f8..4151b362 100644 --- a/senlinclient/common/i18n.py +++ b/senlinclient/common/i18n.py @@ -22,12 +22,3 @@ _translators = oslo_i18n.TranslatorFactory(domain='senlinclient') # 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 diff --git a/senlinclient/v1/cluster.py b/senlinclient/v1/cluster.py index b576c52b..1bbeb2c8 100644 --- a/senlinclient/v1/cluster.py +++ b/senlinclient/v1/cluster.py @@ -26,7 +26,6 @@ from oslo_utils import strutils import six from senlinclient.common.i18n import _ -from senlinclient.common.i18n import _LI from senlinclient.common import utils as senlin_utils @@ -312,10 +311,10 @@ class DeleteCluster(command.Command): if not prompt_response.startswith('y'): return except KeyboardInterrupt: # Ctrl-c - self.log.info(_LI('Ctrl-c detected.')) + self.log.info('Ctrl-c detected.') return except EOFError: # Ctrl-d - self.log.info(_LI('Ctrl-d detected')) + self.log.info('Ctrl-d detected') return result = {} diff --git a/senlinclient/v1/node.py b/senlinclient/v1/node.py index 95e328d0..9777d3a0 100644 --- a/senlinclient/v1/node.py +++ b/senlinclient/v1/node.py @@ -23,7 +23,6 @@ from oslo_utils import strutils import six from senlinclient.common.i18n import _ -from senlinclient.common.i18n import _LI from senlinclient.common import utils as senlin_utils @@ -315,10 +314,10 @@ class DeleteNode(command.Command): if not prompt_response.startswith('y'): return except KeyboardInterrupt: # Ctrl-c - self.log.info(_LI('Ctrl-c detected.')) + self.log.info('Ctrl-c detected.') return except EOFError: # Ctrl-d - self.log.info(_LI('Ctrl-d detected')) + self.log.info('Ctrl-d detected') return result = {} diff --git a/senlinclient/v1/policy.py b/senlinclient/v1/policy.py index 67f7cf1c..d8c0bd5d 100644 --- a/senlinclient/v1/policy.py +++ b/senlinclient/v1/policy.py @@ -20,7 +20,7 @@ from osc_lib.command import command from osc_lib import exceptions as exc from osc_lib import utils -from senlinclient.common.i18n import _, _LI +from senlinclient.common.i18n import _ from senlinclient.common import utils as senlin_utils @@ -254,10 +254,10 @@ class DeletePolicy(command.Command): if not prompt_response.startswith('y'): return except KeyboardInterrupt: # Ctrl-c - self.log.info(_LI('Ctrl-c detected.')) + self.log.info('Ctrl-c detected.') return except EOFError: # Ctrl-d - self.log.info(_LI('Ctrl-d detected')) + self.log.info('Ctrl-d detected') return failure_count = 0 diff --git a/senlinclient/v1/profile.py b/senlinclient/v1/profile.py index e8110764..0efcd3d4 100644 --- a/senlinclient/v1/profile.py +++ b/senlinclient/v1/profile.py @@ -20,7 +20,7 @@ from osc_lib.command import command from osc_lib import exceptions as exc from osc_lib import utils -from senlinclient.common.i18n import _, _LI +from senlinclient.common.i18n import _ from senlinclient.common import utils as senlin_utils @@ -190,10 +190,10 @@ class DeleteProfile(command.Command): if not prompt_response.startswith('y'): return except KeyboardInterrupt: # Ctrl-c - self.log.info(_LI('Ctrl-c detected.')) + self.log.info('Ctrl-c detected.') return except EOFError: # Ctrl-d - self.log.info(_LI('Ctrl-d detected')) + self.log.info('Ctrl-d detected') return failure_count = 0 diff --git a/senlinclient/v1/receiver.py b/senlinclient/v1/receiver.py index b6aa4a2a..eb94d134 100644 --- a/senlinclient/v1/receiver.py +++ b/senlinclient/v1/receiver.py @@ -20,7 +20,7 @@ from osc_lib.command import command from osc_lib import exceptions as exc from osc_lib import utils -from senlinclient.common.i18n import _, _LI +from senlinclient.common.i18n import _ from senlinclient.common import utils as senlin_utils @@ -246,10 +246,10 @@ class DeleteReceiver(command.Command): if not prompt_response.startswith('y'): return except KeyboardInterrupt: # Ctrl-c - self.log.info(_LI('Ctrl-c detected.')) + self.log.info('Ctrl-c detected.') return except EOFError: # Ctrl-d - self.log.info(_LI('Ctrl-d detected')) + self.log.info('Ctrl-d detected') return failure_count = 0 diff --git a/senlinclient/v1/shell.py b/senlinclient/v1/shell.py index 352dc76a..1cd0b789 100644 --- a/senlinclient/v1/shell.py +++ b/senlinclient/v1/shell.py @@ -20,7 +20,7 @@ from oslo_utils import strutils import six from senlinclient.common import exc -from senlinclient.common.i18n import _, _LW +from senlinclient.common.i18n import _ from senlinclient.common import utils logger = logging.getLogger(__name__) @@ -28,8 +28,8 @@ logger = logging.getLogger(__name__) def show_deprecated(deprecated, recommended): logger.warning( - _LW('"%(old)s" is deprecated and will be removed by Apr 2017, ' - 'please use "%(new)s" instead.'), + ('"%(old)s" is deprecated and will be removed by Apr 2017, ' + 'please use "%(new)s" instead.'), {'old': deprecated, 'new': recommended})