diff options
| author | Huanxuan Ao <huanxuan.ao@easystack.cn> | 2016-06-12 19:59:10 +0800 |
|---|---|---|
| committer | Dean Troyer <dtroyer@gmail.com> | 2016-06-14 11:03:56 -0500 |
| commit | f25a3519c525cd8f3ff04c841b63c10f640c27f6 (patch) | |
| tree | 9618055b28918d7bca63e2fad78e4351c8a4cc48 /openstackclient/api/auth.py | |
| parent | 769baf329e6aa619e7d9a5e48a5230bcf4399228 (diff) | |
| download | python-openstackclient-f25a3519c525cd8f3ff04c841b63c10f640c27f6.tar.gz | |
Fix missing i18n supports in api/ and shell.py
Change-Id: I28d79d7f44b27d2b600dedad2a3601180650ad83
Partial-bug: #1574965
Diffstat (limited to 'openstackclient/api/auth.py')
| -rw-r--r-- | openstackclient/api/auth.py | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/openstackclient/api/auth.py b/openstackclient/api/auth.py index a55af293..b56035e4 100644 --- a/openstackclient/api/auth.py +++ b/openstackclient/api/auth.py @@ -171,7 +171,8 @@ def check_valid_auth_options(options, auth_plugin_name, required_scope=True): 'auth.url')) if msgs: - raise exc.CommandError('Missing parameter(s): \n%s' % '\n'.join(msgs)) + raise exc.CommandError( + _('Missing parameter(s): \n%s') % '\n'.join(msgs)) def build_auth_plugins_option_parser(parser): @@ -187,10 +188,9 @@ def build_auth_plugins_option_parser(parser): metavar='<auth-type>', dest='auth_type', default=utils.env('OS_AUTH_TYPE'), - help='Select an authentication type. Available types: ' + - ', '.join(available_plugins) + - '. Default: selected based on --os-username/--os-token' + - ' (Env: OS_AUTH_TYPE)', + help=_('Select an authentication type. Available types: %s.' + ' Default: selected based on --os-username/--os-token' + ' (Env: OS_AUTH_TYPE)') % ', '.join(available_plugins), choices=available_plugins ) # Maintain compatibility with old tenant env vars @@ -215,10 +215,10 @@ def build_auth_plugins_option_parser(parser): OPTIONS_LIST[o]['env'], utils.env(OPTIONS_LIST[o]['env']), ), - help='%s\n(Env: %s)' % ( - OPTIONS_LIST[o]['help'], - OPTIONS_LIST[o]['env'], - ), + help=_('%(help)s\n(Env: %(env)s)') % { + 'help': OPTIONS_LIST[o]['help'], + 'env': OPTIONS_LIST[o]['env'], + }, ) # add tenant-related options for compatibility # this is deprecated but still used in some tempest tests... |
