Adds missing internationalization for help message
Change-Id: I676daed583cac49f72593c79e9f79f7c9908a57c Related-Bug: #1491492 Signed-off-by: Bartosz Górski <bartosz@codilime.com>
This commit is contained in:
parent
ca5b06f6ae
commit
e43c66a0aa
@ -592,8 +592,8 @@ class OpenStackComputeShell(object):
|
||||
metavar='<bypass-url>',
|
||||
dest='bypass_url',
|
||||
default=utils.env('NOVACLIENT_BYPASS_URL'),
|
||||
help="Use this API endpoint instead of the Service Catalog. "
|
||||
"Defaults to env[NOVACLIENT_BYPASS_URL].")
|
||||
help=_("Use this API endpoint instead of the Service Catalog. "
|
||||
"Defaults to env[NOVACLIENT_BYPASS_URL]."))
|
||||
parser.add_argument(
|
||||
'--bypass_url',
|
||||
action=DeprecatedAction,
|
||||
@ -1046,7 +1046,7 @@ class OpenStackComputeShell(object):
|
||||
'command',
|
||||
metavar='<subcommand>',
|
||||
nargs='?',
|
||||
help='Display help for <subcommand>.')
|
||||
help=_('Display help for <subcommand>.'))
|
||||
def do_help(self, args):
|
||||
"""
|
||||
Display help about this program or one of its subcommands.
|
||||
@ -1080,13 +1080,13 @@ def main():
|
||||
OpenStackComputeShell().main(argv)
|
||||
except Exception as exc:
|
||||
logger.debug(exc, exc_info=1)
|
||||
print("ERROR (%s): %s"
|
||||
% (exc.__class__.__name__,
|
||||
encodeutils.exception_to_unicode(exc)),
|
||||
print(_("ERROR (%(type)s): %(msg)s") % {
|
||||
'type': exc.__class__.__name__,
|
||||
'msg': encodeutils.exception_to_unicode(exc)},
|
||||
file=sys.stderr)
|
||||
sys.exit(1)
|
||||
except KeyboardInterrupt:
|
||||
print("... terminating nova client", file=sys.stderr)
|
||||
print(_("... terminating nova client"), file=sys.stderr)
|
||||
sys.exit(130)
|
||||
|
||||
|
||||
|
@ -748,7 +748,7 @@ def _print_flavor_list(flavors, show_extra_specs=False):
|
||||
dest='marker',
|
||||
metavar='<marker>',
|
||||
default=None,
|
||||
help=('The last flavor ID of the previous page; displays list of flavors'
|
||||
help=_('The last flavor ID of the previous page; displays list of flavors'
|
||||
' after "marker".'))
|
||||
@cliutils.arg(
|
||||
'--limit',
|
||||
@ -756,10 +756,10 @@ def _print_flavor_list(flavors, show_extra_specs=False):
|
||||
metavar='<limit>',
|
||||
type=int,
|
||||
default=None,
|
||||
help=("Maximum number of flavors to display. If limit == -1, all flavors "
|
||||
"will be displayed. If limit is bigger than "
|
||||
"'osapi_max_limit' option of Nova API, limit 'osapi_max_limit' will "
|
||||
"be used instead."))
|
||||
help=_("Maximum number of flavors to display. If limit == -1, all flavors "
|
||||
"will be displayed. If limit is bigger than 'osapi_max_limit' "
|
||||
"option of Nova API, limit 'osapi_max_limit' will be used "
|
||||
"instead."))
|
||||
def do_flavor_list(cs, args):
|
||||
"""Print a list of available 'flavors' (sizes of servers)."""
|
||||
if args.all:
|
||||
@ -1439,26 +1439,26 @@ def do_image_delete(cs, args):
|
||||
'--sort',
|
||||
dest='sort',
|
||||
metavar='<key>[:<direction>]',
|
||||
help=('Comma-separated list of sort keys and directions in the form'
|
||||
' of <key>[:<asc|desc>]. The direction defaults to descending if'
|
||||
' not specified.'))
|
||||
help=_('Comma-separated list of sort keys and directions in the form '
|
||||
'of <key>[:<asc|desc>]. The direction defaults to descending if '
|
||||
'not specified.'))
|
||||
@cliutils.arg(
|
||||
'--marker',
|
||||
dest='marker',
|
||||
metavar='<marker>',
|
||||
default=None,
|
||||
help=('The last server UUID of the previous page; displays list of servers'
|
||||
' after "marker".'))
|
||||
help=_('The last server UUID of the previous page; displays list of '
|
||||
'servers after "marker".'))
|
||||
@cliutils.arg(
|
||||
'--limit',
|
||||
dest='limit',
|
||||
metavar='<limit>',
|
||||
type=int,
|
||||
default=None,
|
||||
help=("Maximum number of servers to display. If limit == -1, all servers "
|
||||
"will be displayed. If limit is bigger than "
|
||||
"'osapi_max_limit' option of Nova API, limit 'osapi_max_limit' will "
|
||||
"be used instead."))
|
||||
help=_("Maximum number of servers to display. If limit == -1, all servers "
|
||||
"will be displayed. If limit is bigger than 'osapi_max_limit' "
|
||||
"option of Nova API, limit 'osapi_max_limit' will be used "
|
||||
"instead."))
|
||||
def do_list(cs, args):
|
||||
"""List active servers."""
|
||||
imageid = None
|
||||
|
Loading…
Reference in New Issue
Block a user