From df536ba753c4731a6b494dccdacb1428c941d290 Mon Sep 17 00:00:00 2001 From: kavithahr Date: Mon, 10 Jul 2017 11:50:41 +0530 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 Change-Id: I9fe2cdd1901980b06e68c34f98de56875f4cddcd --- saharaclient/_i18n.py | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) diff --git a/saharaclient/_i18n.py b/saharaclient/_i18n.py index f0055e9f..ac80de50 100644 --- a/saharaclient/_i18n.py +++ b/saharaclient/_i18n.py @@ -14,22 +14,7 @@ See http://docs.openstack.org/developer/oslo.i18n/usage.html """ -try: - import oslo_i18n +import oslo_i18n - _translators = oslo_i18n.TranslatorFactory(domain='saharaclient') - # 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 -except ImportError: - _ = _LI = _LW = _LE = _LC = lambda x: x +_ = oslo_i18n.TranslatorFactory(domain='saharaclient').primary