[virt-manager PATCH 08/21] i18n: improve labels for TPM

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

 



Use separate strings for the path case, and for the generic case (i.e.
the version), to avoid string puzzles.

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

diff --git a/virtManager/details/details.py b/virtManager/details/details.py
index dcc8a370..224f36b1 100644
--- a/virtManager/details/details.py
+++ b/virtManager/details/details.py
@@ -247,12 +247,9 @@ def _label_for_device(dev):
             return _("RNG %(device)s") % {"device": dev.device}
         return _("RNG")
     if devtype == "tpm":
-        label = _("TPM")
         if dev.device_path:
-            label += (" %s" % dev.device_path)
-        else:
-            label += (" v%s" % dev.version)
-        return label
+            return _("TPM %(device)s") % {"device": dev.device_path}
+        return _("TPM v%(version)s") % {"version": dev.version}
 
     devmap = {
         "panic": _("Panic Notifier"),
-- 
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