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/network/v2/address_scope.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'openstackclient/network/v2/address_scope.py') diff --git a/openstackclient/network/v2/address_scope.py b/openstackclient/network/v2/address_scope.py index 95f6c947..0d8f80d0 100644 --- a/openstackclient/network/v2/address_scope.py +++ b/openstackclient/network/v2/address_scope.py @@ -58,7 +58,7 @@ def _get_attrs(client_manager, parsed_args): # TODO(rtheis): Use the SDK resource mapped attribute names once the # OSC minimum requirements include SDK 1.0. class CreateAddressScope(command.ShowOne): - """Create a new Address Scope""" + _description = _("Create a new Address Scope") def get_parser(self, prog_name): parser = super(CreateAddressScope, self).get_parser(prog_name) @@ -106,7 +106,7 @@ class CreateAddressScope(command.ShowOne): class DeleteAddressScope(command.Command): - """Delete address scope(s)""" + _description = _("Delete address scope(s)") def get_parser(self, prog_name): parser = super(DeleteAddressScope, self).get_parser(prog_name) @@ -141,7 +141,7 @@ class DeleteAddressScope(command.Command): class ListAddressScope(command.Lister): - """List address scopes""" + _description = _("List address scopes") def take_action(self, parsed_args): client = self.app.client_manager.network @@ -170,7 +170,7 @@ class ListAddressScope(command.Lister): # TODO(rtheis): Use the SDK resource mapped attribute names once the # OSC minimum requirements include SDK 1.0. class SetAddressScope(command.Command): - """Set address scope properties""" + _description = _("Set address scope properties") def get_parser(self, prog_name): parser = super(SetAddressScope, self).get_parser(prog_name) @@ -214,7 +214,7 @@ class SetAddressScope(command.Command): class ShowAddressScope(command.ShowOne): - """Display address scope details""" + _description = _("Display address scope details") def get_parser(self, prog_name): parser = super(ShowAddressScope, self).get_parser(prog_name) -- cgit v1.2.1