[virt-manager PATCH 02/21] i18n: improve labels for channels

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

 



Use separate string in case we have the channel name, and in case we
have the channel type.

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

diff --git a/virtManager/details/details.py b/virtManager/details/details.py
index 16c074e7..6e597694 100644
--- a/virtManager/details/details.py
+++ b/virtManager/details/details.py
@@ -213,13 +213,13 @@ def _label_for_device(dev):
         return label
 
     if devtype == "channel":
-        label = _("Channel")
         name = vmmAddHardware.char_pretty_channel_name(dev.target_name)
-        if not name:
-            name = vmmAddHardware.char_pretty_type(dev.type)
         if name:
-            label += " %s" % name
-        return label
+            return _("Channel %(name)s") % {"name": name}
+        pretty_type = vmmAddHardware.char_pretty_type(dev.type)
+        if pretty_type:
+            return _("Channel %(type)s") % {"type": pretty_type}
+        return _("Channel")
 
     if devtype == "graphics":
         pretty = vmmGraphicsDetails.graphics_pretty_type_simple(dev.type)
-- 
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