diff --git a/neutronclient/common/__init__.py b/neutronclient/common/__init__.py index fb715cf41..e69de29bb 100644 --- a/neutronclient/common/__init__.py +++ b/neutronclient/common/__init__.py @@ -1,26 +0,0 @@ -# Copyright 2011 VMware, Inc. -# All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - -import gettext - -t = gettext.translation('neutronclient', fallback=True) -try: - ugettext = t.ugettext # Python 2 -except AttributeError: - ugettext = t.gettext # Python 3 - - -def _(msg): - return ugettext(msg) diff --git a/neutronclient/common/exceptions.py b/neutronclient/common/exceptions.py index 4c7c9d838..9728fbdd7 100644 --- a/neutronclient/common/exceptions.py +++ b/neutronclient/common/exceptions.py @@ -13,7 +13,7 @@ # License for the specific language governing permissions and limitations # under the License. -from neutronclient.common import _ +from neutronclient.i18n import _ """ Neutron base exception handling. diff --git a/neutronclient/common/utils.py b/neutronclient/common/utils.py index 28137b7fa..d82e34bd8 100644 --- a/neutronclient/common/utils.py +++ b/neutronclient/common/utils.py @@ -24,8 +24,8 @@ from oslo.utils import encodeutils from oslo.utils import importutils import six -from neutronclient.common import _ from neutronclient.common import exceptions +from neutronclient.i18n import _ def env(*vars, **kwargs): diff --git a/neutronclient/v2_0/client.py b/neutronclient/v2_0/client.py index d2bb2eda0..44035b6c6 100644 --- a/neutronclient/v2_0/client.py +++ b/neutronclient/v2_0/client.py @@ -21,11 +21,11 @@ import requests import six.moves.urllib.parse as urlparse from neutronclient import client -from neutronclient.common import _ from neutronclient.common import constants from neutronclient.common import exceptions from neutronclient.common import serializer from neutronclient.common import utils +from neutronclient.i18n import _ _logger = logging.getLogger(__name__)