[virt-manager PATCH 09/21] i18n: improve label for controller

Pino Toscano ptoscano at redhat.com
Mon Jul 13 08:25:47 UTC 2020


Use a proper string with placeholders for the controller name and index,
to avoid string puzzles.

Signed-off-by: Pino Toscano <ptoscano at redhat.com>
---
 virtManager/details/details.py | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/virtManager/details/details.py b/virtManager/details/details.py
index 224f36b1..c44642d9 100644
--- a/virtManager/details/details.py
+++ b/virtManager/details/details.py
@@ -240,8 +240,10 @@ def _label_for_device(dev):
     if devtype == "filesystem":
         return _("Filesystem") + (" %s" % dev.target[:8])
     if devtype == "controller":
-        return _("Controller") + (" %s %s" % (
-                vmmAddHardware.controller_pretty_desc(dev), dev.index))
+        return _("Controller %(controller)s %(index)d") % {
+            "controller": vmmAddHardware.controller_pretty_desc(dev),
+            "index": dev.index,
+        }
     if devtype == "rng":
         if dev.device:
             return _("RNG %(device)s") % {"device": dev.device}
-- 
2.26.2




More information about the virt-tools-list mailing list