Ensure to mark exception message as tranlation strings

- in exception.py Class ServiceCatalogException
  an exception message is untranslated,
- in k2k.oy Class K2KAuthPlugin def get_plugin
  an exception message is untranslated.

Change-Id: I7d09f625cc3e074bc5a40478668c7b382613da2f
Signed-off-by: peiy <peiy@rc.inesa.com>
This commit is contained in:
peiy 2018-01-23 17:13:15 +08:00 committed by Akihiro Motoki
parent 42fe004c30
commit 2e67f24e2b
2 changed files with 2 additions and 2 deletions

View File

@ -107,7 +107,7 @@ class ServiceCatalogException(HorizonException):
``ServiceCatalog`` is fetched from Keystone.
"""
def __init__(self, service_name):
message = 'Invalid service catalog service: %s' % service_name
message = _('Invalid service catalog service: %s') % service_name
super(ServiceCatalogException, self).__init__(message)

View File

@ -75,7 +75,7 @@ class K2KAuthPlugin(base.BasePlugin):
idp_exception = idp_excp
if not scoped_idp_auth or idp_exception:
msg = 'Identity provider authentication Failed.'
msg = _('Identity provider authentication Failed.')
raise exceptions.KeystoneAuthException(msg)
session = utils.get_session()