From 7def236718b4c68aec4d9532f9556a8800b64106 Mon Sep 17 00:00:00 2001 From: Huanxuan Ao Date: Mon, 30 May 2016 15:39:12 +0800 Subject: [PATCH] Fix i18n support in cinder I checked all the cinder files and found some small issues of i18n support.So I fix them. Change-Id: I2df06cb9db4643bd734105664d83299726f7b4e9 Partial-bug: #1574965 --- openstackclient/volume/v2/qos_specs.py | 4 ++-- openstackclient/volume/v2/snapshot.py | 2 +- openstackclient/volume/v2/volume_type.py | 8 ++++---- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/openstackclient/volume/v2/qos_specs.py b/openstackclient/volume/v2/qos_specs.py index aa2059d7b..3cea3303a 100644 --- a/openstackclient/volume/v2/qos_specs.py +++ b/openstackclient/volume/v2/qos_specs.py @@ -250,8 +250,8 @@ class UnsetQos(command.Command): metavar='', action='append', default=[], - help=('Property to remove from the QoS specification. ' - '(repeat option to unset multiple properties)'), + help=_('Property to remove from the QoS specification. ' + '(repeat option to unset multiple properties)'), ) return parser diff --git a/openstackclient/volume/v2/snapshot.py b/openstackclient/volume/v2/snapshot.py index db4ce6c33..2886aaefe 100644 --- a/openstackclient/volume/v2/snapshot.py +++ b/openstackclient/volume/v2/snapshot.py @@ -37,7 +37,7 @@ class CreateSnapshot(command.ShowOne): parser.add_argument( "--name", metavar="", - help=("Name of the snapshot") + help=_("Name of the snapshot") ) parser.add_argument( "--description", diff --git a/openstackclient/volume/v2/volume_type.py b/openstackclient/volume/v2/volume_type.py index 2261f4c35..96f13c830 100644 --- a/openstackclient/volume/v2/volume_type.py +++ b/openstackclient/volume/v2/volume_type.py @@ -225,8 +225,8 @@ class SetVolumeType(command.Command): result += 1 if result > 0: - raise exceptions.CommandError("Command Failed: One or more of the" - " operations failed") + raise exceptions.CommandError(_("Command Failed: One or more of" + " the operations failed")) class ShowVolumeType(command.ShowOne): @@ -315,5 +315,5 @@ class UnsetVolumeType(command.Command): result += 1 if result > 0: - raise exceptions.CommandError("Command Failed: One or more of the" - " operations failed") + raise exceptions.CommandError(_("Command Failed: One or more of" + " the operations failed"))