diff --git a/openstackclient/object/v1/account.py b/openstackclient/object/v1/account.py index 801fe4504a..2fe00ecbc3 100644 --- a/openstackclient/object/v1/account.py +++ b/openstackclient/object/v1/account.py @@ -18,6 +18,8 @@ from osc_lib.command import command from osc_lib import utils import six +from openstackclient.i18n import _ + class SetAccount(command.Command): """Set account properties""" @@ -29,8 +31,8 @@ class SetAccount(command.Command): metavar="", required=True, action=parseractions.KeyValueAction, - help="Set a property on this account " - "(repeat option to set multiple properties)" + help=_("Set a property on this account " + "(repeat option to set multiple properties)") ) return parser @@ -61,8 +63,8 @@ class UnsetAccount(command.Command): required=True, action='append', default=[], - help='Property to remove from account ' - '(repeat option to remove multiple properties)', + help=_('Property to remove from account ' + '(repeat option to remove multiple properties)'), ) return parser diff --git a/openstackclient/object/v1/container.py b/openstackclient/object/v1/container.py index 2f0d4ac2e0..01964d0c0b 100644 --- a/openstackclient/object/v1/container.py +++ b/openstackclient/object/v1/container.py @@ -37,7 +37,7 @@ class CreateContainer(command.Lister): 'containers', metavar='', nargs="+", - help='New container name(s)', + help=_('New container name(s)'), ) return parser @@ -71,13 +71,13 @@ class DeleteContainer(command.Command): '--recursive', '-r', action='store_true', default=False, - help='Recursively delete objects and container', + help=_('Recursively delete objects and container'), ) parser.add_argument( 'containers', metavar='', nargs="+", - help='Container(s) to delete', + help=_('Container(s) to delete'), ) return parser @@ -105,35 +105,35 @@ class ListContainer(command.Lister): parser.add_argument( "--prefix", metavar="", - help="Filter list using ", + help=_("Filter list using "), ) parser.add_argument( "--marker", metavar="", - help="Anchor for paging", + help=_("Anchor for paging"), ) parser.add_argument( "--end-marker", metavar="", - help="End anchor for paging", + help=_("End anchor for paging"), ) parser.add_argument( "--limit", metavar="", type=int, - help="Limit the number of containers returned", + help=_("Limit the number of containers returned"), ) parser.add_argument( '--long', action='store_true', default=False, - help='List additional fields in output', + help=_('List additional fields in output'), ) parser.add_argument( '--all', action='store_true', default=False, - help='List all containers (default is 10000)', + help=_('List all containers (default is 10000)'), ) return parser @@ -175,7 +175,7 @@ class SaveContainer(command.Command): parser.add_argument( 'container', metavar='', - help='Container to save', + help=_('Container to save'), ) return parser @@ -193,15 +193,15 @@ class SetContainer(command.Command): parser.add_argument( 'container', metavar='', - help='Container to modify', + help=_('Container to modify'), ) parser.add_argument( "--property", metavar="", required=True, action=parseractions.KeyValueAction, - help="Set a property on this container " - "(repeat option to set multiple properties)" + help=_("Set a property on this container " + "(repeat option to set multiple properties)") ) return parser @@ -220,7 +220,7 @@ class ShowContainer(command.ShowOne): parser.add_argument( 'container', metavar='', - help='Container to display', + help=_('Container to display'), ) return parser @@ -243,7 +243,7 @@ class UnsetContainer(command.Command): parser.add_argument( 'container', metavar='', - help='Container to modify', + help=_('Container to modify'), ) parser.add_argument( '--property', @@ -251,8 +251,8 @@ class UnsetContainer(command.Command): required=True, action='append', default=[], - help='Property to remove from container ' - '(repeat option to remove multiple properties)', + help=_('Property to remove from container ' + '(repeat option to remove multiple properties)'), ) return parser diff --git a/openstackclient/object/v1/object.py b/openstackclient/object/v1/object.py index 88f6815e80..3c47ee0428 100644 --- a/openstackclient/object/v1/object.py +++ b/openstackclient/object/v1/object.py @@ -37,19 +37,19 @@ class CreateObject(command.Lister): parser.add_argument( 'container', metavar='', - help='Container for new object', + help=_('Container for new object'), ) parser.add_argument( 'objects', metavar='', nargs="+", - help='Local filename(s) to upload', + help=_('Local filename(s) to upload'), ) parser.add_argument( '--name', metavar='', - help='Upload a file and rename it. ' - 'Can only be used when uploading a single object' + help=_('Upload a file and rename it. ' + 'Can only be used when uploading a single object') ) return parser @@ -88,13 +88,13 @@ class DeleteObject(command.Command): parser.add_argument( 'container', metavar='', - help='Delete object(s) from ', + help=_('Delete object(s) from '), ) parser.add_argument( 'objects', metavar='', nargs="+", - help='Object(s) to delete', + help=_('Object(s) to delete'), ) return parser @@ -115,45 +115,45 @@ class ListObject(command.Lister): parser.add_argument( "container", metavar="", - help="Container to list", + help=_("Container to list"), ) parser.add_argument( "--prefix", metavar="", - help="Filter list using ", + help=_("Filter list using "), ) parser.add_argument( "--delimiter", metavar="", - help="Roll up items with ", + help=_("Roll up items with "), ) parser.add_argument( "--marker", metavar="", - help="Anchor for paging", + help=_("Anchor for paging"), ) parser.add_argument( "--end-marker", metavar="", - help="End anchor for paging", + help=_("End anchor for paging"), ) parser.add_argument( "--limit", metavar="", type=int, - help="Limit the number of objects returned", + help=_("Limit the number of objects returned"), ) parser.add_argument( '--long', action='store_true', default=False, - help='List additional fields in output', + help=_('List additional fields in output'), ) parser.add_argument( '--all', action='store_true', default=False, - help='List all objects in container (default is 10000)', + help=_('List all objects in container (default is 10000)'), ) return parser @@ -204,17 +204,17 @@ class SaveObject(command.Command): parser.add_argument( "--file", metavar="", - help="Destination filename (defaults to object name)", + help=_("Destination filename (defaults to object name)"), ) parser.add_argument( 'container', metavar='', - help='Download from ', + help=_('Download from '), ) parser.add_argument( "object", metavar="", - help="Object to save", + help=_("Object to save"), ) return parser @@ -234,20 +234,20 @@ class SetObject(command.Command): parser.add_argument( 'container', metavar='', - help='Modify from ', + help=_('Modify from '), ) parser.add_argument( 'object', metavar='', - help='Object to modify', + help=_('Object to modify'), ) parser.add_argument( "--property", metavar="", required=True, action=parseractions.KeyValueAction, - help="Set a property on this object " - "(repeat option to set multiple properties)" + help=_("Set a property on this object " + "(repeat option to set multiple properties)") ) return parser @@ -267,12 +267,12 @@ class ShowObject(command.ShowOne): parser.add_argument( 'container', metavar='', - help='Display from ', + help=_('Display from '), ) parser.add_argument( 'object', metavar='', - help='Object to display', + help=_('Object to display'), ) return parser @@ -296,12 +296,12 @@ class UnsetObject(command.Command): parser.add_argument( 'container', metavar='', - help='Modify from ', + help=_('Modify from '), ) parser.add_argument( 'object', metavar='', - help='Object to modify', + help=_('Object to modify'), ) parser.add_argument( '--property', @@ -309,8 +309,8 @@ class UnsetObject(command.Command): required=True, action='append', default=[], - help='Property to remove from object ' - '(repeat option to remove multiple properties)', + help=_('Property to remove from object ' + '(repeat option to remove multiple properties)'), ) return parser