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