diff options
| author | Jenkins <jenkins@review.openstack.org> | 2016-06-03 19:24:42 +0000 |
|---|---|---|
| committer | Gerrit Code Review <review@openstack.org> | 2016-06-03 19:24:42 +0000 |
| commit | 416792f079e7d15d8747736ee792d1f5c30aa389 (patch) | |
| tree | b7d979e8e2f3f6b8006a9a8858dc5cc08c3bee00 /openstackclient | |
| parent | f07b883d603772e2a6ebe527733a92934a36f99a (diff) | |
| parent | 95d5d9f76164628a6914f69255fdcd7a23179f38 (diff) | |
| download | python-openstackclient-416792f079e7d15d8747736ee792d1f5c30aa389.tar.gz | |
Merge "Fix some missing i18n support problems in compute"
Diffstat (limited to 'openstackclient')
| -rw-r--r-- | openstackclient/compute/client.py | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/openstackclient/compute/client.py b/openstackclient/compute/client.py index 82f09cec..8e6eedcf 100644 --- a/openstackclient/compute/client.py +++ b/openstackclient/compute/client.py @@ -17,6 +17,7 @@ import logging from openstackclient.common import exceptions from openstackclient.common import utils +from openstackclient.i18n import _ LOG = logging.getLogger(__name__) @@ -82,9 +83,9 @@ def build_option_parser(parser): '--os-compute-api-version', metavar='<compute-api-version>', default=utils.env('OS_COMPUTE_API_VERSION'), - help='Compute API version, default=' + - DEFAULT_API_VERSION + - ' (Env: OS_COMPUTE_API_VERSION)') + help=_("Compute API version, default=%s " + "(Env: OS_COMPUTE_API_VERSION)") % DEFAULT_API_VERSION + ) return parser @@ -118,10 +119,9 @@ def check_api_version(check_version): novaclient.API_MIN_VERSION, novaclient.API_MAX_VERSION, ): - raise exceptions.CommandError( - "versions supported by client: %s - %s" % ( - novaclient.API_MIN_VERSION.get_string(), - novaclient.API_MAX_VERSION.get_string(), - ), - ) + msg = _("versions supported by client: %(min)s - %(max)s") % { + "min": novaclient.API_MIN_VERSION.get_string(), + "max": novaclient.API_MAX_VERSION.get_string(), + } + raise exceptions.CommandError(msg) return True |
