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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



It seems that the index is optional, so use a proper string for this
case.

Fixes commit 00fa6366824669aa6ba65f73fdf8eb115dd2d3b7 in this file.

Signed-off-by: Pino Toscano <ptoscano@xxxxxxxxxx>
---
 virtManager/details/details.py | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/virtManager/details/details.py b/virtManager/details/details.py
index 5a2a855b..4a00dd6d 100644
--- a/virtManager/details/details.py
+++ b/virtManager/details/details.py
@@ -254,11 +254,13 @@ def _label_for_device(dev):
         return _("Filesystem %(path)s") % {"path": dev.target[:8]}
     if devtype == "controller":
         idx = dev.index
-        if idx is None:
-            idx = ""
-        return _("Controller %(controller)s %(index)s") % {
+        if idx:
+            return _("Controller %(controller)s %(index)s") % {
+                "controller": vmmAddHardware.controller_pretty_desc(dev),
+                "index": idx,
+            }
+        return _("Controller %(controller)s") % {
             "controller": vmmAddHardware.controller_pretty_desc(dev),
-            "index": idx,
         }
     if devtype == "rng":
         if dev.device:
-- 
2.26.2




[Index of Archives]     [Linux Virtualization]     [KVM Development]     [CentOS Virtualization]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]     [Video 4 Linux]

  Powered by Linux