Merge "Remove log translations"

This commit is contained in:
Jenkins 2017-03-29 05:58:06 +00:00 committed by Gerrit Code Review
commit 80df1b309d
7 changed files with 16 additions and 27 deletions

@ -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

@ -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 = {}

@ -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 = {}

@ -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

@ -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

@ -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

@ -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})