summaryrefslogtreecommitdiff
path: root/keystoneclient/discover.py
diff options
context:
space:
mode:
authorBrant Knudson <bknudson@us.ibm.com>2014-10-27 10:54:48 -0500
committerJamie Lennox <jamielennox@redhat.com>2014-10-28 20:33:19 +0000
commitfece74ca3e56342bee43f561404c19128a613628 (patch)
tree7241c8dcb7f3176da3df660dbfb5006f9eb86fc1 /keystoneclient/discover.py
parent3b766c51438396a0ab0032de309c9d56e275e0cb (diff)
downloadpython-keystoneclient-fece74ca3e56342bee43f561404c19128a613628.tar.gz
I18n
Keystoneclient didn't provide translated messages. With this change, the messages are marked for translation. DocImpact Implements: blueprint keystoneclient-i18n Change-Id: I85263a71671a1dffed524185266e6bb7ae559630
Diffstat (limited to 'keystoneclient/discover.py')
-rw-r--r--keystoneclient/discover.py14
1 files changed, 8 insertions, 6 deletions
diff --git a/keystoneclient/discover.py b/keystoneclient/discover.py
index 982683a..0f79134 100644
--- a/keystoneclient/discover.py
+++ b/keystoneclient/discover.py
@@ -16,6 +16,7 @@ import six
from keystoneclient import _discover
from keystoneclient import exceptions
+from keystoneclient.i18n import _
from keystoneclient import session as client_session
from keystoneclient import utils
from keystoneclient.v2_0 import client as v2_client
@@ -122,9 +123,9 @@ class Discover(_discover.Discover):
url = auth_url
if not url:
- raise exceptions.DiscoveryFailure('Not enough information to '
- 'determine URL. Provide either '
- 'auth_url or endpoint')
+ raise exceptions.DiscoveryFailure(
+ _('Not enough information to determine URL. Provide either '
+ 'auth_url or endpoint'))
self._client_kwargs = kwargs
super(Discover, self).__init__(session, url,
@@ -213,10 +214,11 @@ class Discover(_discover.Discover):
version_data = all_versions[-1]
if not version_data:
- msg = 'Could not find a suitable endpoint'
+ msg = _('Could not find a suitable endpoint')
if version:
- msg += ' for client version: %s' % str(version)
+ msg = _('Could not find a suitable endpoint for client '
+ 'version: %s') % str(version)
raise exceptions.VersionNotAvailable(msg)
@@ -228,7 +230,7 @@ class Discover(_discover.Discover):
client_class = _CLIENT_VERSIONS[version_data['version'][0]]
except KeyError:
version = '.'.join(str(v) for v in version_data['version'])
- msg = 'No client available for version: %s' % version
+ msg = _('No client available for version: %s') % version
raise exceptions.DiscoveryFailure(msg)
# kwargs should take priority over stored kwargs.