From 5398c96e2a816148cbcde7ce43c46de6721051f6 Mon Sep 17 00:00:00 2001 From: Tang Chen Date: Sat, 14 May 2016 15:12:57 +0800 Subject: Fix i18n support for help and error messages in compute Change-Id: Id6eebcb48d1b7b49b6636524506294edbc44a83f Partial-bug: #1574965 --- openstackclient/compute/v2/host.py | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) (limited to 'openstackclient/compute/v2/host.py') diff --git a/openstackclient/compute/v2/host.py b/openstackclient/compute/v2/host.py index 5af25310..73e2cdf9 100644 --- a/openstackclient/compute/v2/host.py +++ b/openstackclient/compute/v2/host.py @@ -17,6 +17,7 @@ from openstackclient.common import command from openstackclient.common import utils +from openstackclient.i18n import _ class ListHost(command.Lister): @@ -27,7 +28,8 @@ class ListHost(command.Lister): parser.add_argument( "--zone", metavar="", - help="Only return hosts in the availability zone.") + help=_("Only return hosts in the availability zone") + ) return parser def take_action(self, parsed_args): @@ -51,29 +53,29 @@ class SetHost(command.Command): parser.add_argument( "host", metavar="", - help="The host to modify (name or ID)" + help=_("The host to modify (name or ID)") ) status = parser.add_mutually_exclusive_group() status.add_argument( '--enable', action='store_true', - help='Enable the host' + help=_("Enable the host") ) status.add_argument( '--disable', action='store_true', - help='Disable the host' + help=_("Disable the host") ) maintenance = parser.add_mutually_exclusive_group() maintenance.add_argument( '--enable-maintenance', action='store_true', - help='Enable maintenance mode for the host' + help=_("Enable maintenance mode for the host") ) maintenance.add_argument( '--disable-maintenance', action='store_true', - help='Disable maintenance mode for the host', + help=_("Disable maintenance mode for the host") ) return parser @@ -109,7 +111,8 @@ class ShowHost(command.Lister): parser.add_argument( "host", metavar="", - help="Name of host") + help=_("Name of host") + ) return parser def take_action(self, parsed_args): -- cgit v1.2.1