From: John Griffith Date: Mon, 10 Mar 2014 22:00:50 +0000 (+0000) Subject: Revert "Re-enable lazy translation" X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=b3f0b7a2cacb16b03ae8f932eb7e4ef081e63d36;p=openstack-build%2Fcinder-build.git Revert "Re-enable lazy translation" This reverts commit 6338d4656cb71aeeee2e1a9facb22278e208aa00 Change-Id: I078217b96b2d5fcca78b57c8827883a4b15ef9f0 --- diff --git a/bin/cinder-all b/bin/cinder-all index c14d8e634..a3b2fcf7f 100755 --- a/bin/cinder-all +++ b/bin/cinder-all @@ -42,8 +42,7 @@ if os.path.exists(os.path.join(possible_topdir, "cinder", "__init__.py")): sys.path.insert(0, possible_topdir) from cinder.openstack.common import gettextutils -gettextutils.enable_lazy() -gettextutils.install('cinder', lazy=True) +gettextutils.install('cinder', lazy=False) # Need to register global_opts from cinder.common import config # noqa diff --git a/bin/cinder-api b/bin/cinder-api index 7bbded26f..8990f641e 100755 --- a/bin/cinder-api +++ b/bin/cinder-api @@ -32,8 +32,7 @@ if os.path.exists(os.path.join(possible_topdir, "cinder", "__init__.py")): sys.path.insert(0, possible_topdir) from cinder.openstack.common import gettextutils -gettextutils.enable_lazy() -gettextutils.install('cinder', lazy=True) +gettextutils.install('cinder', lazy=False) # Need to register global_opts from cinder.common import config # noqa diff --git a/bin/cinder-backup b/bin/cinder-backup index 9de9ba605..2b5a634cc 100755 --- a/bin/cinder-backup +++ b/bin/cinder-backup @@ -36,8 +36,7 @@ if os.path.exists(os.path.join(possible_topdir, 'cinder', '__init__.py')): sys.path.insert(0, possible_topdir) from cinder.openstack.common import gettextutils -gettextutils.enable_lazy() -gettextutils.install('cinder', lazy=True) +gettextutils.install('cinder') # Need to register global_opts from cinder.common import config # noqa diff --git a/bin/cinder-clear-rabbit-queues b/bin/cinder-clear-rabbit-queues index 51aa217f0..4a59b8b3d 100755 --- a/bin/cinder-clear-rabbit-queues +++ b/bin/cinder-clear-rabbit-queues @@ -35,8 +35,7 @@ if os.path.exists(os.path.join(POSSIBLE_TOPDIR, 'cinder', '__init__.py')): sys.path.insert(0, POSSIBLE_TOPDIR) from cinder.openstack.common import gettextutils -gettextutils.enable_lazy() -gettextutils.install('cinder', lazy=True) +gettextutils.install('cinder') # Need to register global_opts from cinder.common import config # noqa diff --git a/bin/cinder-manage b/bin/cinder-manage index e4572114f..c9eec4ad9 100755 --- a/bin/cinder-manage +++ b/bin/cinder-manage @@ -70,8 +70,7 @@ if os.path.exists(os.path.join(POSSIBLE_TOPDIR, 'cinder', '__init__.py')): sys.path.insert(0, POSSIBLE_TOPDIR) from cinder.openstack.common import gettextutils -gettextutils.enable_lazy() -gettextutils.install('cinder', lazy=True) +gettextutils.install('cinder') # Need to register global_opts from cinder.common import config # noqa diff --git a/bin/cinder-rtstool b/bin/cinder-rtstool index 057d17188..07fe5947d 100755 --- a/bin/cinder-rtstool +++ b/bin/cinder-rtstool @@ -16,14 +16,13 @@ # See the License for the specific language governing permissions and # limitations under the License. +import gettext import re import sys import rtslib -from cinder.openstack.common import gettextutils -gettextutils.enable_lazy() -gettextutils.install('cinder-rtstool', lazy=True) +gettext.install('cinder-rtstool', unicode=1) class RtstoolError(Exception): diff --git a/bin/cinder-scheduler b/bin/cinder-scheduler index 6281fbbd4..e8ee1175b 100755 --- a/bin/cinder-scheduler +++ b/bin/cinder-scheduler @@ -36,8 +36,7 @@ if os.path.exists(os.path.join(possible_topdir, 'cinder', '__init__.py')): sys.path.insert(0, possible_topdir) from cinder.openstack.common import gettextutils -gettextutils.enable_lazy() -gettextutils.install('cinder', lazy=True) +gettextutils.install('cinder') # Need to register global_opts from cinder.common import config # noqa diff --git a/bin/cinder-volume b/bin/cinder-volume index e9af49cf3..0a04626c3 100755 --- a/bin/cinder-volume +++ b/bin/cinder-volume @@ -40,8 +40,7 @@ if os.path.exists(os.path.join(possible_topdir, 'cinder', '__init__.py')): sys.path.insert(0, possible_topdir) from cinder.openstack.common import gettextutils -gettextutils.enable_lazy() -gettextutils.install('cinder', lazy=True) +gettextutils.install('cinder') # Need to register global_opts from cinder.common import config # noqa diff --git a/bin/cinder-volume-usage-audit b/bin/cinder-volume-usage-audit index fd6dcd196..53ea460ae 100755 --- a/bin/cinder-volume-usage-audit +++ b/bin/cinder-volume-usage-audit @@ -50,8 +50,7 @@ if os.path.exists(os.path.join(POSSIBLE_TOPDIR, 'cinder', '__init__.py')): sys.path.insert(0, POSSIBLE_TOPDIR) from cinder.openstack.common import gettextutils -gettextutils.enable_lazy() -gettextutils.install('cinder', lazy=True) +gettextutils.install('cinder') from cinder import context from cinder import db diff --git a/cinder/api/contrib/quotas.py b/cinder/api/contrib/quotas.py index a950cbc02..739eb1e2e 100644 --- a/cinder/api/contrib/quotas.py +++ b/cinder/api/contrib/quotas.py @@ -21,6 +21,7 @@ from cinder.api import xmlutil from cinder import db from cinder.db.sqlalchemy import api as sqlalchemy_api from cinder import exception +from cinder.openstack.common.gettextutils import _ from cinder.openstack.common import strutils from cinder import quota diff --git a/cinder/api/v1/limits.py b/cinder/api/v1/limits.py index 76a1a3752..de70243f9 100644 --- a/cinder/api/v1/limits.py +++ b/cinder/api/v1/limits.py @@ -30,6 +30,7 @@ import webob.exc from cinder.api.openstack import wsgi from cinder.api.views import limits as limits_views from cinder.api import xmlutil +from cinder.openstack.common.gettextutils import _ from cinder.openstack.common import importutils from cinder.openstack.common import jsonutils from cinder import quota diff --git a/cinder/brick/exception.py b/cinder/brick/exception.py index fda13d6ec..59a953c79 100644 --- a/cinder/brick/exception.py +++ b/cinder/brick/exception.py @@ -14,6 +14,7 @@ """Exceptions for the Brick library.""" +from cinder.openstack.common.gettextutils import _ from cinder.openstack.common import log as logging diff --git a/cinder/brick/initiator/connector.py b/cinder/brick/initiator/connector.py index 57a9076a8..3ffc6b590 100644 --- a/cinder/brick/initiator/connector.py +++ b/cinder/brick/initiator/connector.py @@ -23,6 +23,7 @@ from cinder.brick.initiator import host_driver from cinder.brick.initiator import linuxfc from cinder.brick.initiator import linuxscsi from cinder.brick.remotefs import remotefs +from cinder.openstack.common.gettextutils import _ from cinder.openstack.common import lockutils from cinder.openstack.common import log as logging from cinder.openstack.common import loopingcall diff --git a/cinder/brick/initiator/linuxfc.py b/cinder/brick/initiator/linuxfc.py index fe43046f0..2b6099c82 100644 --- a/cinder/brick/initiator/linuxfc.py +++ b/cinder/brick/initiator/linuxfc.py @@ -17,6 +17,7 @@ import errno from cinder.brick.initiator import linuxscsi +from cinder.openstack.common.gettextutils import _ from cinder.openstack.common import log as logging from cinder.openstack.common import processutils as putils diff --git a/cinder/brick/initiator/linuxscsi.py b/cinder/brick/initiator/linuxscsi.py index 9b2c776df..83e41d99d 100644 --- a/cinder/brick/initiator/linuxscsi.py +++ b/cinder/brick/initiator/linuxscsi.py @@ -19,6 +19,7 @@ import os from cinder.brick import executor +from cinder.openstack.common.gettextutils import _ from cinder.openstack.common import log as logging from cinder.openstack.common import processutils as putils diff --git a/cinder/brick/local_dev/lvm.py b/cinder/brick/local_dev/lvm.py index 8e5a09bfb..6b51316f1 100644 --- a/cinder/brick/local_dev/lvm.py +++ b/cinder/brick/local_dev/lvm.py @@ -24,6 +24,7 @@ import itertools from cinder.brick import exception from cinder.brick import executor +from cinder.openstack.common.gettextutils import _ from cinder.openstack.common import log as logging from cinder.openstack.common import processutils as putils diff --git a/cinder/brick/remotefs/remotefs.py b/cinder/brick/remotefs/remotefs.py index 62a8f18cf..c68e18b88 100755 --- a/cinder/brick/remotefs/remotefs.py +++ b/cinder/brick/remotefs/remotefs.py @@ -21,6 +21,7 @@ import re import six from cinder.brick import exception +from cinder.openstack.common.gettextutils import _ from cinder.openstack.common import log as logging from cinder.openstack.common import processutils as putils diff --git a/cinder/common/config.py b/cinder/common/config.py index 86def4407..969f8c3c1 100644 --- a/cinder/common/config.py +++ b/cinder/common/config.py @@ -29,6 +29,8 @@ import socket from oslo.config import cfg +from cinder.openstack.common.gettextutils import _ + CONF = cfg.CONF diff --git a/cinder/db/sqlalchemy/migrate_repo/manage.py b/cinder/db/sqlalchemy/migrate_repo/manage.py index 101cea379..a714db624 100755 --- a/cinder/db/sqlalchemy/migrate_repo/manage.py +++ b/cinder/db/sqlalchemy/migrate_repo/manage.py @@ -18,8 +18,7 @@ import os from oslo.config import cfg from cinder.openstack.common import gettextutils -gettextutils.enable_lazy() -gettextutils.install('cinder', lazy=True) +gettextutils.install('cinder', lazy=False) from cinder.db.sqlalchemy import migrate_repo from cinder import version diff --git a/cinder/exception.py b/cinder/exception.py index 8ef9c7cb6..03688a1dd 100644 --- a/cinder/exception.py +++ b/cinder/exception.py @@ -27,6 +27,7 @@ import sys from oslo.config import cfg import webob.exc +from cinder.openstack.common.gettextutils import _ from cinder.openstack.common import log as logging diff --git a/cinder/keymgr/conf_key_mgr.py b/cinder/keymgr/conf_key_mgr.py index faad47e17..9915bfe57 100644 --- a/cinder/keymgr/conf_key_mgr.py +++ b/cinder/keymgr/conf_key_mgr.py @@ -38,6 +38,7 @@ from oslo.config import cfg from cinder import exception from cinder.keymgr import key from cinder.keymgr import key_mgr +from cinder.openstack.common.gettextutils import _ from cinder.openstack.common import log as logging diff --git a/cinder/policy.py b/cinder/policy.py index 43cc0a718..9e3999efa 100644 --- a/cinder/policy.py +++ b/cinder/policy.py @@ -19,6 +19,7 @@ from oslo.config import cfg from cinder import exception +from cinder.openstack.common.gettextutils import _ from cinder.openstack.common import policy from cinder import utils