From 0ef8535036c3739d798fd5627ae142d121f20d42 Mon Sep 17 00:00:00 2001 From: Steve Martinelli Date: Sun, 13 Nov 2016 09:42:09 -0500 Subject: translate all command help strings Leverage the new cliff command class attribute (_description) to get the help of a command, this allows us to mark strings for translation. We could not do this before since the help was grabbed from the docstring. This also depends on a new release of cliff and a bump to the minimum level in osc's requirements. Closes-Bug: 1636209 Depends-On: Id915f6aa7d95a0ff3dc6e2ceaac5decb3f3bf0da Change-Id: I8673080bb5625e8e3c499feaefd42dfc7121e96f --- openstackclient/object/v1/object.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'openstackclient/object/v1/object.py') diff --git a/openstackclient/object/v1/object.py b/openstackclient/object/v1/object.py index 3c47ee04..71b6f520 100644 --- a/openstackclient/object/v1/object.py +++ b/openstackclient/object/v1/object.py @@ -30,7 +30,7 @@ LOG = logging.getLogger(__name__) class CreateObject(command.Lister): - """Upload object to container""" + _description = _("Upload object to container") def get_parser(self, prog_name): parser = super(CreateObject, self).get_parser(prog_name) @@ -81,7 +81,7 @@ class CreateObject(command.Lister): class DeleteObject(command.Command): - """Delete object from container""" + _description = _("Delete object from container") def get_parser(self, prog_name): parser = super(DeleteObject, self).get_parser(prog_name) @@ -108,7 +108,7 @@ class DeleteObject(command.Command): class ListObject(command.Lister): - """List objects""" + _description = _("List objects") def get_parser(self, prog_name): parser = super(ListObject, self).get_parser(prog_name) @@ -197,7 +197,7 @@ class ListObject(command.Lister): class SaveObject(command.Command): - """Save object locally""" + _description = _("Save object locally") def get_parser(self, prog_name): parser = super(SaveObject, self).get_parser(prog_name) @@ -227,7 +227,7 @@ class SaveObject(command.Command): class SetObject(command.Command): - """Set object properties""" + _description = _("Set object properties") def get_parser(self, prog_name): parser = super(SetObject, self).get_parser(prog_name) @@ -260,7 +260,7 @@ class SetObject(command.Command): class ShowObject(command.ShowOne): - """Display object details""" + _description = _("Display object details") def get_parser(self, prog_name): parser = super(ShowObject, self).get_parser(prog_name) @@ -289,7 +289,7 @@ class ShowObject(command.ShowOne): class UnsetObject(command.Command): - """Unset object properties""" + _description = _("Unset object properties") def get_parser(self, prog_name): parser = super(UnsetObject, self).get_parser(prog_name) -- cgit v1.2.1