[virt-manager PATCH 05/21] i18n: translate labels for NICs

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


Translate the labels for a NIC, both when a MAC address is available and
when it is not.

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

diff --git a/virtManager/details/details.py b/virtManager/details/details.py
index 6e597694..791a5ae1 100644
--- a/virtManager/details/details.py
+++ b/virtManager/details/details.py
@@ -188,9 +188,9 @@ def _label_for_device(dev):
 
     if devtype == "interface":
         if dev.macaddr:
-            return "NIC %s" % dev.macaddr[-9:]
+            return _("NIC %(mac)s") % {"mac": dev.macaddr[-9:]}
         else:
-            return "NIC"
+            return _("NIC")
 
     if devtype == "input":
         if dev.type == "tablet":
-- 
2.26.2




More information about the virt-tools-list mailing list