diff options
| author | Tang Chen <chen.tang@easystack.cn> | 2016-06-05 10:58:48 +0800 |
|---|---|---|
| committer | Tang Chen <chen.tang@easystack.cn> | 2016-06-07 09:37:02 +0800 |
| commit | 5293bb103e75542d9defb9d0d5ed3c144f0657fe (patch) | |
| tree | 8db584eae21ca4dfb38c87d6aec54bf052bb7860 /openstackclient/identity/v3/policy.py | |
| parent | dd0fe3d94ee6967c42c48be5181a2901b691a40c (diff) | |
| download | python-openstackclient-5293bb103e75542d9defb9d0d5ed3c144f0657fe.tar.gz | |
Fix i18n support problems in identity
Change-Id: I3b48d17850343051239b5b69e8b890dba32d3ac8
Partial-bug: #1574965
Diffstat (limited to 'openstackclient/identity/v3/policy.py')
| -rw-r--r-- | openstackclient/identity/v3/policy.py | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/openstackclient/identity/v3/policy.py b/openstackclient/identity/v3/policy.py index 3c2d1a7c..74a783b0 100644 --- a/openstackclient/identity/v3/policy.py +++ b/openstackclient/identity/v3/policy.py @@ -20,6 +20,7 @@ import sys from openstackclient.common import command from openstackclient.common import utils +from openstackclient.i18n import _ class CreatePolicy(command.ShowOne): @@ -31,13 +32,13 @@ class CreatePolicy(command.ShowOne): '--type', metavar='<type>', default="application/json", - help='New MIME type of the policy rules file ' - '(defaults to application/json)', + help=_('New MIME type of the policy rules file ' + '(defaults to application/json)'), ) parser.add_argument( 'rules', metavar='<filename>', - help='New serialized policy rules file', + help=_('New serialized policy rules file'), ) return parser @@ -62,7 +63,7 @@ class DeletePolicy(command.Command): parser.add_argument( 'policy', metavar='<policy>', - help='Policy to delete', + help=_('Policy to delete'), ) return parser @@ -80,7 +81,7 @@ class ListPolicy(command.Lister): '--long', action='store_true', default=False, - help='List additional fields in output', + help=_('List additional fields in output'), ) return parser @@ -107,17 +108,17 @@ class SetPolicy(command.Command): parser.add_argument( 'policy', metavar='<policy>', - help='Policy to modify', + help=_('Policy to modify'), ) parser.add_argument( '--type', metavar='<type>', - help='New MIME type of the policy rules file', + help=_('New MIME type of the policy rules file'), ) parser.add_argument( '--rules', metavar='<filename>', - help='New serialized policy rules file', + help=_('New serialized policy rules file'), ) return parser @@ -135,7 +136,7 @@ class SetPolicy(command.Command): kwargs['type'] = parsed_args.type if not kwargs: - sys.stdout.write('Policy not updated, no arguments present \n') + sys.stdout.write(_('Policy not updated, no arguments present\n')) return identity_client.policies.update(parsed_args.policy, **kwargs) @@ -148,7 +149,7 @@ class ShowPolicy(command.ShowOne): parser.add_argument( 'policy', metavar='<policy>', - help='Policy to display', + help=_('Policy to display'), ) return parser |
