From 7b213a9a8b6e75747f1955def66d02bea7838424 Mon Sep 17 00:00:00 2001 From: wanghao Date: Tue, 21 Mar 2017 13:07:01 +0800 Subject: [PATCH] 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: I92f0729448255cec09263eccea4724c0cf9e8b61 Closes-Bug: #1674550 --- cinderclient/_i18n.py | 10 ---------- cinderclient/client.py | 5 ++--- 2 files changed, 2 insertions(+), 13 deletions(-) diff --git a/cinderclient/_i18n.py b/cinderclient/_i18n.py index 8b94994..1653da7 100644 --- a/cinderclient/_i18n.py +++ b/cinderclient/_i18n.py @@ -35,16 +35,6 @@ _C = _translators.contextual_form # requires oslo.i18n >=2.1.0 _P = _translators.plural_form -# 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 - def get_available_languages(): return oslo_i18n.get_available_languages(DOMAIN) diff --git a/cinderclient/client.py b/cinderclient/client.py index 48940fa..4a56c44 100644 --- a/cinderclient/client.py +++ b/cinderclient/client.py @@ -45,7 +45,6 @@ from cinderclient import api_versions from cinderclient import exceptions import cinderclient.extension from cinderclient._i18n import _ -from cinderclient._i18n import _LW try: from eventlet import sleep @@ -90,8 +89,8 @@ def get_server_version(url): return (api_versions.APIVersion(version['min_version']), api_versions.APIVersion(version['version'])) except exceptions.ClientException as e: - logger.warning(_LW("Error in server version query:%s\n" - "Returning APIVersion 2.0"), six.text_type(e.message)) + logger.warning("Error in server version query:%s\n" + "Returning APIVersion 2.0", six.text_type(e.message)) return api_versions.APIVersion("2.0"), api_versions.APIVersion("2.0")