Remove i18n.enable_lazy() translation

Lazy translation of messages is not used in OpenStack [1].
This causes problems for commands which use translatable messages.
The lazy translation effort was abandoned several years ago.

[1] http://lists.openstack.org/pipermail/openstack-dev/2018-November/136289.html

Change-Id: I25a9ec0a96b7c57f8a6928c0537bf133f6b6931c
This commit is contained in:
whoami-rajat 2018-11-14 11:43:41 +05:30
parent f10835e9c2
commit e7ebfa1079
8 changed files with 0 additions and 22 deletions

View File

@ -28,9 +28,6 @@ from oslo_log import log
from oslo_reports import guru_meditation_report as gmr
from oslo_reports import opts as gmr_opts
from manila import i18n
i18n.enable_lazy()
from manila.common import config # Need to register global_opts # noqa
from manila import service
from manila import utils

View File

@ -26,8 +26,6 @@ from oslo_log import log
from oslo_reports import guru_meditation_report as gmr
from oslo_reports import opts as gmr_opts
from manila import i18n
i18n.enable_lazy()
from manila.common import config # Need to register global_opts # noqa
from manila import service
from manila import utils

View File

@ -58,9 +58,6 @@ from __future__ import print_function
import os
import sys
from manila import i18n
i18n.enable_lazy()
from oslo_config import cfg
from oslo_log import log
from oslo_utils import uuidutils

View File

@ -28,8 +28,6 @@ from oslo_log import log
from oslo_reports import guru_meditation_report as gmr
from oslo_reports import opts as gmr_opts
from manila import i18n
i18n.enable_lazy()
from manila.common import config # Need to register global_opts # noqa
from manila import service
from manila import utils

View File

@ -27,9 +27,6 @@ from oslo_log import log
from oslo_reports import guru_meditation_report as gmr
from oslo_reports import opts as gmr_opts
from manila import i18n
i18n.enable_lazy()
from manila.common import config # Need to register global_opts # noqa
from manila import service
from manila import utils

View File

@ -28,10 +28,6 @@ _translators = oslo_i18n.TranslatorFactory(domain=DOMAIN)
_ = _translators.primary
def enable_lazy():
return oslo_i18n.enable_lazy()
def translate(value, user_locale):
return oslo_i18n.translate(value, user_locale)

View File

@ -29,7 +29,6 @@ import mock
from oslo_concurrency import lockutils
from oslo_config import cfg
from oslo_config import fixture as config_fixture
import oslo_i18n
import oslo_messaging
from oslo_messaging import conffixture as messaging_conffixture
from oslo_utils import uuidutils
@ -108,7 +107,6 @@ class TestCase(base_test.BaseTestCase):
"""Run before each test method to initialize test environment."""
super(TestCase, self).setUp()
oslo_i18n.enable_lazy(enable=False)
conf_fixture.set_defaults(CONF)
CONF([], default_config_files=[])

View File

@ -19,9 +19,6 @@ from oslo_config import cfg
from oslo_log import log
from oslo_service import wsgi
from manila import i18n
i18n.enable_lazy()
# Need to register global_opts
from manila.common import config
from manila import rpc