[virt-manager PATCH 07/16] i18n: use single strings for connection/uri

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

 



Create single strings for connection/uri hints & tooltips, so it is
easier to translate them, and there are not glued like puzzles.

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

diff --git a/virtManager/manager.py b/virtManager/manager.py
index 29d7fb80..c80af125 100644
--- a/virtManager/manager.py
+++ b/virtManager/manager.py
@@ -578,16 +578,16 @@ class vmmManager(vmmGObjectUI):
     def _build_conn_hint(self, conn):
         hint = conn.get_uri()
         if conn.is_disconnected():
-            hint += " (%s)" % _("Double click to connect")
+            hint = _("%(uri)s (Double click to connect)") % {"uri": conn.get_uri()}
         return hint
 
     def _build_conn_markup(self, conn, name):
         name = xmlutil.xml_escape(name)
         text = name
         if conn.is_disconnected():
-            text += " - " + _("Not Connected")
+            text = _("%(connection)s - Not Connected") % {"connection": name}
         elif conn.is_connecting():
-            text += " - " + _("Connecting...")
+            text = _("%(connection)s - Connecting...") % {"connection": name}
 
         markup = "<span size='smaller'>%s</span>" % text
         return markup
-- 
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