Add translation markers for object commands
None of the help messages for the object commands are marked for translation. This patch adds the necessary support. Co-Authored-By: Steve Martinelli <s.martinelli@gmail.com> Change-Id: Ibf472d8f7d5ab6c876f60cddcab8833b28f042e0
This commit is contained in:
parent
78312ca9af
commit
28b66459db
@ -18,6 +18,8 @@ from osc_lib.command import command
|
|||||||
from osc_lib import utils
|
from osc_lib import utils
|
||||||
import six
|
import six
|
||||||
|
|
||||||
|
from openstackclient.i18n import _
|
||||||
|
|
||||||
|
|
||||||
class SetAccount(command.Command):
|
class SetAccount(command.Command):
|
||||||
"""Set account properties"""
|
"""Set account properties"""
|
||||||
@ -29,8 +31,8 @@ class SetAccount(command.Command):
|
|||||||
metavar="<key=value>",
|
metavar="<key=value>",
|
||||||
required=True,
|
required=True,
|
||||||
action=parseractions.KeyValueAction,
|
action=parseractions.KeyValueAction,
|
||||||
help="Set a property on this account "
|
help=_("Set a property on this account "
|
||||||
"(repeat option to set multiple properties)"
|
"(repeat option to set multiple properties)")
|
||||||
)
|
)
|
||||||
return parser
|
return parser
|
||||||
|
|
||||||
@ -61,8 +63,8 @@ class UnsetAccount(command.Command):
|
|||||||
required=True,
|
required=True,
|
||||||
action='append',
|
action='append',
|
||||||
default=[],
|
default=[],
|
||||||
help='Property to remove from account '
|
help=_('Property to remove from account '
|
||||||
'(repeat option to remove multiple properties)',
|
'(repeat option to remove multiple properties)'),
|
||||||
)
|
)
|
||||||
return parser
|
return parser
|
||||||
|
|
||||||
|
@ -37,7 +37,7 @@ class CreateContainer(command.Lister):
|
|||||||
'containers',
|
'containers',
|
||||||
metavar='<container-name>',
|
metavar='<container-name>',
|
||||||
nargs="+",
|
nargs="+",
|
||||||
help='New container name(s)',
|
help=_('New container name(s)'),
|
||||||
)
|
)
|
||||||
return parser
|
return parser
|
||||||
|
|
||||||
@ -71,13 +71,13 @@ class DeleteContainer(command.Command):
|
|||||||
'--recursive', '-r',
|
'--recursive', '-r',
|
||||||
action='store_true',
|
action='store_true',
|
||||||
default=False,
|
default=False,
|
||||||
help='Recursively delete objects and container',
|
help=_('Recursively delete objects and container'),
|
||||||
)
|
)
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
'containers',
|
'containers',
|
||||||
metavar='<container>',
|
metavar='<container>',
|
||||||
nargs="+",
|
nargs="+",
|
||||||
help='Container(s) to delete',
|
help=_('Container(s) to delete'),
|
||||||
)
|
)
|
||||||
return parser
|
return parser
|
||||||
|
|
||||||
@ -105,35 +105,35 @@ class ListContainer(command.Lister):
|
|||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
"--prefix",
|
"--prefix",
|
||||||
metavar="<prefix>",
|
metavar="<prefix>",
|
||||||
help="Filter list using <prefix>",
|
help=_("Filter list using <prefix>"),
|
||||||
)
|
)
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
"--marker",
|
"--marker",
|
||||||
metavar="<marker>",
|
metavar="<marker>",
|
||||||
help="Anchor for paging",
|
help=_("Anchor for paging"),
|
||||||
)
|
)
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
"--end-marker",
|
"--end-marker",
|
||||||
metavar="<end-marker>",
|
metavar="<end-marker>",
|
||||||
help="End anchor for paging",
|
help=_("End anchor for paging"),
|
||||||
)
|
)
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
"--limit",
|
"--limit",
|
||||||
metavar="<limit>",
|
metavar="<limit>",
|
||||||
type=int,
|
type=int,
|
||||||
help="Limit the number of containers returned",
|
help=_("Limit the number of containers returned"),
|
||||||
)
|
)
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
'--long',
|
'--long',
|
||||||
action='store_true',
|
action='store_true',
|
||||||
default=False,
|
default=False,
|
||||||
help='List additional fields in output',
|
help=_('List additional fields in output'),
|
||||||
)
|
)
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
'--all',
|
'--all',
|
||||||
action='store_true',
|
action='store_true',
|
||||||
default=False,
|
default=False,
|
||||||
help='List all containers (default is 10000)',
|
help=_('List all containers (default is 10000)'),
|
||||||
)
|
)
|
||||||
return parser
|
return parser
|
||||||
|
|
||||||
@ -175,7 +175,7 @@ class SaveContainer(command.Command):
|
|||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
'container',
|
'container',
|
||||||
metavar='<container>',
|
metavar='<container>',
|
||||||
help='Container to save',
|
help=_('Container to save'),
|
||||||
)
|
)
|
||||||
return parser
|
return parser
|
||||||
|
|
||||||
@ -193,15 +193,15 @@ class SetContainer(command.Command):
|
|||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
'container',
|
'container',
|
||||||
metavar='<container>',
|
metavar='<container>',
|
||||||
help='Container to modify',
|
help=_('Container to modify'),
|
||||||
)
|
)
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
"--property",
|
"--property",
|
||||||
metavar="<key=value>",
|
metavar="<key=value>",
|
||||||
required=True,
|
required=True,
|
||||||
action=parseractions.KeyValueAction,
|
action=parseractions.KeyValueAction,
|
||||||
help="Set a property on this container "
|
help=_("Set a property on this container "
|
||||||
"(repeat option to set multiple properties)"
|
"(repeat option to set multiple properties)")
|
||||||
)
|
)
|
||||||
return parser
|
return parser
|
||||||
|
|
||||||
@ -220,7 +220,7 @@ class ShowContainer(command.ShowOne):
|
|||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
'container',
|
'container',
|
||||||
metavar='<container>',
|
metavar='<container>',
|
||||||
help='Container to display',
|
help=_('Container to display'),
|
||||||
)
|
)
|
||||||
return parser
|
return parser
|
||||||
|
|
||||||
@ -243,7 +243,7 @@ class UnsetContainer(command.Command):
|
|||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
'container',
|
'container',
|
||||||
metavar='<container>',
|
metavar='<container>',
|
||||||
help='Container to modify',
|
help=_('Container to modify'),
|
||||||
)
|
)
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
'--property',
|
'--property',
|
||||||
@ -251,8 +251,8 @@ class UnsetContainer(command.Command):
|
|||||||
required=True,
|
required=True,
|
||||||
action='append',
|
action='append',
|
||||||
default=[],
|
default=[],
|
||||||
help='Property to remove from container '
|
help=_('Property to remove from container '
|
||||||
'(repeat option to remove multiple properties)',
|
'(repeat option to remove multiple properties)'),
|
||||||
)
|
)
|
||||||
return parser
|
return parser
|
||||||
|
|
||||||
|
@ -37,19 +37,19 @@ class CreateObject(command.Lister):
|
|||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
'container',
|
'container',
|
||||||
metavar='<container>',
|
metavar='<container>',
|
||||||
help='Container for new object',
|
help=_('Container for new object'),
|
||||||
)
|
)
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
'objects',
|
'objects',
|
||||||
metavar='<filename>',
|
metavar='<filename>',
|
||||||
nargs="+",
|
nargs="+",
|
||||||
help='Local filename(s) to upload',
|
help=_('Local filename(s) to upload'),
|
||||||
)
|
)
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
'--name',
|
'--name',
|
||||||
metavar='<name>',
|
metavar='<name>',
|
||||||
help='Upload a file and rename it. '
|
help=_('Upload a file and rename it. '
|
||||||
'Can only be used when uploading a single object'
|
'Can only be used when uploading a single object')
|
||||||
)
|
)
|
||||||
return parser
|
return parser
|
||||||
|
|
||||||
@ -88,13 +88,13 @@ class DeleteObject(command.Command):
|
|||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
'container',
|
'container',
|
||||||
metavar='<container>',
|
metavar='<container>',
|
||||||
help='Delete object(s) from <container>',
|
help=_('Delete object(s) from <container>'),
|
||||||
)
|
)
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
'objects',
|
'objects',
|
||||||
metavar='<object>',
|
metavar='<object>',
|
||||||
nargs="+",
|
nargs="+",
|
||||||
help='Object(s) to delete',
|
help=_('Object(s) to delete'),
|
||||||
)
|
)
|
||||||
return parser
|
return parser
|
||||||
|
|
||||||
@ -115,45 +115,45 @@ class ListObject(command.Lister):
|
|||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
"container",
|
"container",
|
||||||
metavar="<container>",
|
metavar="<container>",
|
||||||
help="Container to list",
|
help=_("Container to list"),
|
||||||
)
|
)
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
"--prefix",
|
"--prefix",
|
||||||
metavar="<prefix>",
|
metavar="<prefix>",
|
||||||
help="Filter list using <prefix>",
|
help=_("Filter list using <prefix>"),
|
||||||
)
|
)
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
"--delimiter",
|
"--delimiter",
|
||||||
metavar="<delimiter>",
|
metavar="<delimiter>",
|
||||||
help="Roll up items with <delimiter>",
|
help=_("Roll up items with <delimiter>"),
|
||||||
)
|
)
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
"--marker",
|
"--marker",
|
||||||
metavar="<marker>",
|
metavar="<marker>",
|
||||||
help="Anchor for paging",
|
help=_("Anchor for paging"),
|
||||||
)
|
)
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
"--end-marker",
|
"--end-marker",
|
||||||
metavar="<end-marker>",
|
metavar="<end-marker>",
|
||||||
help="End anchor for paging",
|
help=_("End anchor for paging"),
|
||||||
)
|
)
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
"--limit",
|
"--limit",
|
||||||
metavar="<limit>",
|
metavar="<limit>",
|
||||||
type=int,
|
type=int,
|
||||||
help="Limit the number of objects returned",
|
help=_("Limit the number of objects returned"),
|
||||||
)
|
)
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
'--long',
|
'--long',
|
||||||
action='store_true',
|
action='store_true',
|
||||||
default=False,
|
default=False,
|
||||||
help='List additional fields in output',
|
help=_('List additional fields in output'),
|
||||||
)
|
)
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
'--all',
|
'--all',
|
||||||
action='store_true',
|
action='store_true',
|
||||||
default=False,
|
default=False,
|
||||||
help='List all objects in container (default is 10000)',
|
help=_('List all objects in container (default is 10000)'),
|
||||||
)
|
)
|
||||||
return parser
|
return parser
|
||||||
|
|
||||||
@ -204,17 +204,17 @@ class SaveObject(command.Command):
|
|||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
"--file",
|
"--file",
|
||||||
metavar="<filename>",
|
metavar="<filename>",
|
||||||
help="Destination filename (defaults to object name)",
|
help=_("Destination filename (defaults to object name)"),
|
||||||
)
|
)
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
'container',
|
'container',
|
||||||
metavar='<container>',
|
metavar='<container>',
|
||||||
help='Download <object> from <container>',
|
help=_('Download <object> from <container>'),
|
||||||
)
|
)
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
"object",
|
"object",
|
||||||
metavar="<object>",
|
metavar="<object>",
|
||||||
help="Object to save",
|
help=_("Object to save"),
|
||||||
)
|
)
|
||||||
return parser
|
return parser
|
||||||
|
|
||||||
@ -234,20 +234,20 @@ class SetObject(command.Command):
|
|||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
'container',
|
'container',
|
||||||
metavar='<container>',
|
metavar='<container>',
|
||||||
help='Modify <object> from <container>',
|
help=_('Modify <object> from <container>'),
|
||||||
)
|
)
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
'object',
|
'object',
|
||||||
metavar='<object>',
|
metavar='<object>',
|
||||||
help='Object to modify',
|
help=_('Object to modify'),
|
||||||
)
|
)
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
"--property",
|
"--property",
|
||||||
metavar="<key=value>",
|
metavar="<key=value>",
|
||||||
required=True,
|
required=True,
|
||||||
action=parseractions.KeyValueAction,
|
action=parseractions.KeyValueAction,
|
||||||
help="Set a property on this object "
|
help=_("Set a property on this object "
|
||||||
"(repeat option to set multiple properties)"
|
"(repeat option to set multiple properties)")
|
||||||
)
|
)
|
||||||
return parser
|
return parser
|
||||||
|
|
||||||
@ -267,12 +267,12 @@ class ShowObject(command.ShowOne):
|
|||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
'container',
|
'container',
|
||||||
metavar='<container>',
|
metavar='<container>',
|
||||||
help='Display <object> from <container>',
|
help=_('Display <object> from <container>'),
|
||||||
)
|
)
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
'object',
|
'object',
|
||||||
metavar='<object>',
|
metavar='<object>',
|
||||||
help='Object to display',
|
help=_('Object to display'),
|
||||||
)
|
)
|
||||||
return parser
|
return parser
|
||||||
|
|
||||||
@ -296,12 +296,12 @@ class UnsetObject(command.Command):
|
|||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
'container',
|
'container',
|
||||||
metavar='<container>',
|
metavar='<container>',
|
||||||
help='Modify <object> from <container>',
|
help=_('Modify <object> from <container>'),
|
||||||
)
|
)
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
'object',
|
'object',
|
||||||
metavar='<object>',
|
metavar='<object>',
|
||||||
help='Object to modify',
|
help=_('Object to modify'),
|
||||||
)
|
)
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
'--property',
|
'--property',
|
||||||
@ -309,8 +309,8 @@ class UnsetObject(command.Command):
|
|||||||
required=True,
|
required=True,
|
||||||
action='append',
|
action='append',
|
||||||
default=[],
|
default=[],
|
||||||
help='Property to remove from object '
|
help=_('Property to remove from object '
|
||||||
'(repeat option to remove multiple properties)',
|
'(repeat option to remove multiple properties)'),
|
||||||
)
|
)
|
||||||
return parser
|
return parser
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user