[virt-manager PATCH 18/21] i18n: improve label for redirector

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

 



Use placeholders for the bus name, and the index; the latter is part of
the string, to avoid a string puzzle.
Also use vmmAddHardware.disk_pretty_bus() to get the proper translated
string of a bus.

Signed-off-by: Pino Toscano <ptoscano@xxxxxxxxxx>
---
 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 c44642d9..126018c7 100644
--- a/virtManager/details/details.py
+++ b/virtManager/details/details.py
@@ -229,8 +229,10 @@ def _label_for_device(dev):
         pretty = vmmGraphicsDetails.graphics_pretty_type_simple(dev.type)
         return _("Display %s") % pretty
     if devtype == "redirdev":
-        return (_("%s Redirector") % (dev.bus.upper()) +
-                (" %s" % (dev.get_xml_idx() + 1)))
+        return _("%(bus)s Redirector %(index)d") % {
+            "bus": vmmAddHardware.disk_pretty_bus(dev.bus),
+            "index": dev.get_xml_idx() + 1,
+        }
     if devtype == "hostdev":
         return vmmAddHardware.hostdev_pretty_name(dev)
     if devtype == "sound":
-- 
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