summaryrefslogtreecommitdiff
path: root/openstackclient/compute/v2/host.py
diff options
context:
space:
mode:
authorTang Chen <chen.tang@easystack.cn>2016-05-14 15:12:57 +0800
committerTang Chen <chen.tang@easystack.cn>2016-05-24 11:03:49 +0800
commit5398c96e2a816148cbcde7ce43c46de6721051f6 (patch)
treea0d791665b99f28293f1fdc3f2830a3259461745 /openstackclient/compute/v2/host.py
parente3f169280c665c62b6e3708c1ae3b763ab91a174 (diff)
downloadpython-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/host.py')
-rw-r--r--openstackclient/compute/v2/host.py17
1 files changed, 10 insertions, 7 deletions
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="<zone>",
- 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="<host>",
- 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="<host>",
- help="Name of host")
+ help=_("Name of host")
+ )
return parser
def take_action(self, parsed_args):