diff options
| author | Tang Chen <chen.tang@easystack.cn> | 2016-05-14 15:12:57 +0800 |
|---|---|---|
| committer | Tang Chen <chen.tang@easystack.cn> | 2016-05-24 11:03:49 +0800 |
| commit | 5398c96e2a816148cbcde7ce43c46de6721051f6 (patch) | |
| tree | a0d791665b99f28293f1fdc3f2830a3259461745 /openstackclient/compute/v2/aggregate.py | |
| parent | e3f169280c665c62b6e3708c1ae3b763ab91a174 (diff) | |
| download | python-openstackclient-5398c96e2a816148cbcde7ce43c46de6721051f6.tar.gz | |
Fix i18n support for help and error messages in compute
Change-Id: Id6eebcb48d1b7b49b6636524506294edbc44a83f
Partial-bug: #1574965
Diffstat (limited to 'openstackclient/compute/v2/aggregate.py')
| -rw-r--r-- | openstackclient/compute/v2/aggregate.py | 40 |
1 files changed, 21 insertions, 19 deletions
diff --git a/openstackclient/compute/v2/aggregate.py b/openstackclient/compute/v2/aggregate.py index 1a02a388..752e0fdf 100644 --- a/openstackclient/compute/v2/aggregate.py +++ b/openstackclient/compute/v2/aggregate.py @@ -21,6 +21,7 @@ import six from openstackclient.common import command from openstackclient.common import parseractions from openstackclient.common import utils +from openstackclient.i18n import _ class AddAggregateHost(command.ShowOne): @@ -31,12 +32,12 @@ class AddAggregateHost(command.ShowOne): parser.add_argument( 'aggregate', metavar='<aggregate>', - help='Aggregate (name or ID)', + help=_("Aggregate (name or ID)") ) parser.add_argument( 'host', metavar='<host>', - help='Host to add to <aggregate>', + help=_("Host to add to <aggregate>") ) return parser @@ -62,19 +63,19 @@ class CreateAggregate(command.ShowOne): parser.add_argument( "name", metavar="<name>", - help="New aggregate name", + help=_("New aggregate name") ) parser.add_argument( "--zone", metavar="<availability-zone>", - help="Availability zone name", + help=_("Availability zone name") ) parser.add_argument( "--property", metavar="<key=value>", action=parseractions.KeyValueAction, - help='Property to add to this aggregate ' - '(repeat option to set multiple properties)', + help=_("Property to add to this aggregate " + "(repeat option to set multiple properties)") ) return parser @@ -105,7 +106,7 @@ class DeleteAggregate(command.Command): parser.add_argument( 'aggregate', metavar='<aggregate>', - help='Aggregate to delete (name or ID)', + help=_("Aggregate to delete (name or ID)") ) return parser @@ -128,7 +129,8 @@ class ListAggregate(command.Lister): '--long', action='store_true', default=False, - help='List additional fields in output') + help=_("List additional fields in output") + ) return parser def take_action(self, parsed_args): @@ -175,12 +177,12 @@ class RemoveAggregateHost(command.ShowOne): parser.add_argument( 'aggregate', metavar='<aggregate>', - help='Aggregate (name or ID)', + help=_("Aggregate (name or ID)") ) parser.add_argument( 'host', metavar='<host>', - help='Host to remove from <aggregate>', + help=_("Host to remove from <aggregate>") ) return parser @@ -209,24 +211,24 @@ class SetAggregate(command.Command): parser.add_argument( 'aggregate', metavar='<aggregate>', - help='Aggregate to modify (name or ID)', + help=_("Aggregate to modify (name or ID)") ) parser.add_argument( '--name', metavar='<name>', - help='Set aggregate name', + help=_("Set aggregate name") ) parser.add_argument( "--zone", metavar="<availability-zone>", - help="Set availability zone name", + help=_("Set availability zone name") ) parser.add_argument( "--property", metavar="<key=value>", action=parseractions.KeyValueAction, - help='Property to set on <aggregate> ' - '(repeat option to set multiple properties)', + help=_("Property to set on <aggregate> " + "(repeat option to set multiple properties)") ) return parser @@ -264,7 +266,7 @@ class ShowAggregate(command.ShowOne): parser.add_argument( 'aggregate', metavar='<aggregate>', - help='Aggregate to display (name or ID)', + help=_("Aggregate to display (name or ID)") ) return parser @@ -300,15 +302,15 @@ class UnsetAggregate(command.Command): parser.add_argument( "aggregate", metavar="<aggregate>", - help="Aggregate to modify (name or ID)", + help=_("Aggregate to modify (name or ID)") ) parser.add_argument( "--property", metavar="<key>", action='append', - help='Property to remove from aggregate ' - '(repeat option to remove multiple properties)', required=True, + help=_("Property to remove from aggregate " + "(repeat option to remove multiple properties)") ) return parser |
