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/console.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/console.py')
| -rw-r--r-- | openstackclient/compute/v2/console.py | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/openstackclient/compute/v2/console.py b/openstackclient/compute/v2/console.py index 6c0ec31a..1165862c 100644 --- a/openstackclient/compute/v2/console.py +++ b/openstackclient/compute/v2/console.py @@ -21,6 +21,7 @@ import sys from openstackclient.common import command from openstackclient.common import parseractions from openstackclient.common import utils +from openstackclient.i18n import _ class ShowConsoleLog(command.Command): @@ -31,7 +32,7 @@ class ShowConsoleLog(command.Command): parser.add_argument( 'server', metavar='<server>', - help='Server to show console log (name or ID)', + help=_("Server to show console log (name or ID)") ) parser.add_argument( '--lines', @@ -39,8 +40,8 @@ class ShowConsoleLog(command.Command): type=int, default=None, action=parseractions.NonNegativeAction, - help='Number of lines to display from the end of the log ' - '(default=all)', + help=_("Number of lines to display from the end of the log " + "(default=all)") ) return parser @@ -69,7 +70,7 @@ class ShowConsoleURL(command.ShowOne): parser.add_argument( 'server', metavar='<server>', - help='Server to show URL (name or ID)', + help=_("Server to show URL (name or ID)") ) type_group = parser.add_mutually_exclusive_group() type_group.add_argument( @@ -78,21 +79,21 @@ class ShowConsoleURL(command.ShowOne): action='store_const', const='novnc', default='novnc', - help='Show noVNC console URL (default)', + help=_("Show noVNC console URL (default)") ) type_group.add_argument( '--xvpvnc', dest='url_type', action='store_const', const='xvpvnc', - help='Show xpvnc console URL', + help=_("Show xpvnc console URL") ) type_group.add_argument( '--spice', dest='url_type', action='store_const', const='spice', - help='Show SPICE console URL', + help=_("Show SPICE console URL") ) return parser |
