summaryrefslogtreecommitdiff
path: root/virtinst
diff options
context:
space:
mode:
authorPavel Hrdina <phrdina@redhat.com>2015-06-02 14:21:58 +0200
committerCole Robinson <crobinso@redhat.com>2015-06-05 16:33:51 -0400
commit0fbe8e7a1f328ea924495f19b4496c9ab26b8fd9 (patch)
treeed1eb3fdeed66fd3b5a55dbd03ebd0f01eac6e00 /virtinst
parent03c24ca5cb2db544115f9a0e018830e6a98336ea (diff)
downloadvirt-manager-0fbe8e7a1f328ea924495f19b4496c9ab26b8fd9.tar.gz
translation: fix wrong usage of _() function
All the strings have to be at first translated and then we can fill the formated and translated string. Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Diffstat (limited to 'virtinst')
-rw-r--r--virtinst/cli.py6
-rw-r--r--virtinst/interface.py4
-rw-r--r--virtinst/storage.py10
3 files changed, 10 insertions, 10 deletions
diff --git a/virtinst/cli.py b/virtinst/cli.py
index 2c5a0022..457368d0 100644
--- a/virtinst/cli.py
+++ b/virtinst/cli.py
@@ -360,7 +360,7 @@ def validate_disk(dev, warn_overwrite=False):
if not VirtualDisk.path_definitely_exists(dev.conn, dev.path):
return
_optional_fail(
- _("This will overwrite the existing path '%s'" % dev.path),
+ _("This will overwrite the existing path '%s'") % dev.path,
"path_exists")
def check_inuse_conflict(dev):
@@ -1641,7 +1641,7 @@ class ParserDisk(VirtCLIParser):
try:
return float(val)
except Exception, e:
- fail(_("Improper value for 'size': %s" % str(e)))
+ fail(_("Improper value for 'size': %s") % str(e))
def convert_perms(val):
if val is None:
@@ -1654,7 +1654,7 @@ class ParserDisk(VirtCLIParser):
# It's default. Nothing to do.
pass
else:
- fail(_("Unknown '%s' value '%s'" % ("perms", val)))
+ fail(_("Unknown '%s' value '%s'") % ("perms", val))
has_path = "path" in opts.opts
backing_store = opts.get_opt_param("backing_store")
diff --git a/virtinst/interface.py b/virtinst/interface.py
index 0857895d..d7b25e75 100644
--- a/virtinst/interface.py
+++ b/virtinst/interface.py
@@ -254,14 +254,14 @@ class Interface(XMLBuilder):
try:
iface = self.conn.interfaceDefineXML(xml, 0)
except Exception, e:
- raise RuntimeError(_("Could not define interface: %s" % str(e)))
+ raise RuntimeError(_("Could not define interface: %s") % str(e))
errmsg = None
if create and not errmsg:
try:
iface.create(0)
except Exception, e:
- errmsg = _("Could not create interface: %s" % str(e))
+ errmsg = _("Could not create interface: %s") % str(e)
if errmsg:
# Try and clean up the leftover pool
diff --git a/virtinst/storage.py b/virtinst/storage.py
index 3102bf63..9e90db81 100644
--- a/virtinst/storage.py
+++ b/virtinst/storage.py
@@ -502,26 +502,26 @@ class StoragePool(_StorageObject):
try:
pool = self.conn.storagePoolDefineXML(xml, 0)
except Exception, e:
- raise RuntimeError(_("Could not define storage pool: %s" % str(e)))
+ raise RuntimeError(_("Could not define storage pool: %s") % str(e))
errmsg = None
if build:
try:
pool.build(libvirt.VIR_STORAGE_POOL_BUILD_NEW)
except Exception, e:
- errmsg = _("Could not build storage pool: %s" % str(e))
+ errmsg = _("Could not build storage pool: %s") % str(e)
if create and not errmsg:
try:
pool.create(0)
except Exception, e:
- errmsg = _("Could not start storage pool: %s" % str(e))
+ errmsg = _("Could not start storage pool: %s") % str(e)
if autostart and not errmsg:
try:
pool.setAutostart(True)
except Exception, e:
- errmsg = _("Could not set pool autostart flag: %s" % str(e))
+ errmsg = _("Could not set pool autostart flag: %s") % str(e)
if errmsg:
# Try and clean up the leftover pool
@@ -590,7 +590,7 @@ class StorageVolume(_StorageObject):
return self._pool
def _set_pool(self, newpool):
if newpool.info()[0] != libvirt.VIR_STORAGE_POOL_RUNNING:
- raise ValueError(_("pool '%s' must be active." % newpool.name()))
+ raise ValueError(_("pool '%s' must be active.") % newpool.name())
self._pool = newpool
self._pool_xml = StoragePool(self.conn,
parsexml=self._pool.XMLDesc(0))