summaryrefslogtreecommitdiff
path: root/openstackclient/identity/v3/federation_protocol.py
diff options
context:
space:
mode:
authorTang Chen <chen.tang@easystack.cn>2016-06-05 10:58:48 +0800
committerTang Chen <chen.tang@easystack.cn>2016-06-07 09:37:02 +0800
commit5293bb103e75542d9defb9d0d5ed3c144f0657fe (patch)
tree8db584eae21ca4dfb38c87d6aec54bf052bb7860 /openstackclient/identity/v3/federation_protocol.py
parentdd0fe3d94ee6967c42c48be5181a2901b691a40c (diff)
downloadpython-openstackclient-5293bb103e75542d9defb9d0d5ed3c144f0657fe.tar.gz
Fix i18n support problems in identity
Change-Id: I3b48d17850343051239b5b69e8b890dba32d3ac8 Partial-bug: #1574965
Diffstat (limited to 'openstackclient/identity/v3/federation_protocol.py')
-rw-r--r--openstackclient/identity/v3/federation_protocol.py46
1 files changed, 29 insertions, 17 deletions
diff --git a/openstackclient/identity/v3/federation_protocol.py b/openstackclient/identity/v3/federation_protocol.py
index 27c837c5..c0f4bc93 100644
--- a/openstackclient/identity/v3/federation_protocol.py
+++ b/openstackclient/identity/v3/federation_protocol.py
@@ -18,6 +18,7 @@ import six
from openstackclient.common import command
from openstackclient.common import utils
+from openstackclient.i18n import _
class CreateProtocol(command.ShowOne):
@@ -28,19 +29,22 @@ class CreateProtocol(command.ShowOne):
parser.add_argument(
'federation_protocol',
metavar='<name>',
- help='New federation protocol name (must be unique per identity '
- ' provider)')
+ help=_('New federation protocol name (must be unique '
+ 'per identity provider)'),
+ )
parser.add_argument(
'--identity-provider',
metavar='<identity-provider>',
required=True,
- help='Identity provider that will support the new federation '
- ' protocol (name or ID) (required)')
+ help=_('Identity provider that will support the new federation '
+ ' protocol (name or ID) (required)'),
+ )
parser.add_argument(
'--mapping',
metavar='<mapping>',
required=True,
- help='Mapping that is to be used (name or ID) (required)')
+ help=_('Mapping that is to be used (name or ID) (required)'),
+ )
return parser
@@ -69,13 +73,15 @@ class DeleteProtocol(command.Command):
parser.add_argument(
'federation_protocol',
metavar='<federation-protocol>',
- help='Federation protocol to delete (name or ID)')
+ help=_('Federation protocol to delete (name or ID)'),
+ )
parser.add_argument(
'--identity-provider',
metavar='<identity-provider>',
required=True,
- help='Identity provider that supports <federation-protocol> '
- '(name or ID) (required)')
+ help=_('Identity provider that supports <federation-protocol> '
+ '(name or ID) (required)'),
+ )
return parser
@@ -94,7 +100,8 @@ class ListProtocols(command.Lister):
'--identity-provider',
metavar='<identity-provider>',
required=True,
- help='Identity provider to list (name or ID) (required)')
+ help=_('Identity provider to list (name or ID) (required)'),
+ )
return parser
@@ -118,24 +125,27 @@ class SetProtocol(command.Command):
parser.add_argument(
'federation_protocol',
metavar='<name>',
- help='Federation protocol to modify (name or ID)')
+ help=_('Federation protocol to modify (name or ID)'),
+ )
parser.add_argument(
'--identity-provider',
metavar='<identity-provider>',
required=True,
- help='Identity provider that supports <federation-protocol> '
- '(name or ID) (required)')
+ help=_('Identity provider that supports <federation-protocol> '
+ '(name or ID) (required)'),
+ )
parser.add_argument(
'--mapping',
metavar='<mapping>',
- help='Mapping that is to be used (name or ID)')
+ help=_('Mapping that is to be used (name or ID)'),
+ )
return parser
def take_action(self, parsed_args):
identity_client = self.app.client_manager.identity
if not parsed_args.mapping:
- self.app.log.error("No changes requested")
+ self.app.log.error(_("No changes requested"))
return
protocol = identity_client.federation.protocols.update(
@@ -159,13 +169,15 @@ class ShowProtocol(command.ShowOne):
parser.add_argument(
'federation_protocol',
metavar='<federation-protocol>',
- help='Federation protocol to display (name or ID)')
+ help=_('Federation protocol to display (name or ID)'),
+ )
parser.add_argument(
'--identity-provider',
metavar='<identity-provider>',
required=True,
- help=('Identity provider that supports <federation-protocol> '
- '(name or ID) (required)'))
+ help=_('Identity provider that supports <federation-protocol> '
+ '(name or ID) (required)'),
+ )
return parser
def take_action(self, parsed_args):