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:
Bartosz Górski 2016-02-24 23:09:43 +00:00
parent ca5b06f6ae
commit e43c66a0aa
2 changed files with 22 additions and 22 deletions

View File

@ -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)

View File

@ -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,7 +1439,7 @@ def do_image_delete(cs, args):
'--sort',
dest='sort',
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 '
'not specified.'))
@cliutils.arg(
@ -1447,18 +1447,18 @@ def do_image_delete(cs, args):
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