summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTrevor McCasland <TM2086@att.com>2016-12-05 07:56:24 -0600
committerTrevor McCasland <TM2086@att.com>2017-01-10 16:46:23 +0000
commita714eade72d314be1ddaaa9fbec5e92d93d4f2be (patch)
tree84b957737385b8e687aa120d26e050a57fe00d98
parent4f9c538f682c0f7234110ec5d1abe933e4ab5bde (diff)
downloadtrove-a714eade72d314be1ddaaa9fbec5e92d93d4f2be.tar.gz
Add i18n translation to extensions 2/3
This is patch 2 of 3 to add i18n translation to the extensions directory and some other files. Custom hacking rules will be added later to enforce this style. Change-Id: Ifdf426684473fb05cae63877c334e6cf65aa5234
-rw-r--r--trove/extensions/common/service.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/trove/extensions/common/service.py b/trove/extensions/common/service.py
index 78669266..9c702ff4 100644
--- a/trove/extensions/common/service.py
+++ b/trove/extensions/common/service.py
@@ -25,6 +25,7 @@ from trove.cluster import models as cluster_models
from trove.cluster.models import DBCluster
from trove.common import cfg
from trove.common import exception
+from trove.common.i18n import _
from trove.common.i18n import _LI
from trove.common import policy
from trove.common import wsgi
@@ -145,7 +146,7 @@ class ClusterRootController(DefaultRootController):
is_root_enabled = models.ClusterRoot.load(context, instance_id)
except exception.UnprocessableEntity:
raise exception.UnprocessableEntity(
- "Cluster %s is not ready." % instance_id)
+ _("Cluster %s is not ready.") % instance_id)
return wsgi.Result(views.RootEnabledView(is_root_enabled).data(), 200)
def cluster_root_index(self, req, tenant_id, cluster_id):
@@ -225,7 +226,8 @@ class RootController(ExtensionController):
return root_controller.root_create(req, body, tenant_id,
instance_id, is_cluster)
else:
- raise NoSuchOptError('root_controller', group='datastore_manager')
+ opt = 'root_controller'
+ raise NoSuchOptError(opt, group='datastore_manager')
def delete(self, req, tenant_id, instance_id):
datastore_manager, is_cluster = self._get_datastore(tenant_id,