[PATCH] Network spoke: improve message format parametrization for translators
Radek Vykydal
rvykydal at redhat.com
Wed Mar 13 11:47:25 UTC 2013
---
pyanaconda/ui/gui/spokes/network.py | 15 ++++++++++-----
1 file changed, 10 insertions(+), 5 deletions(-)
diff --git a/pyanaconda/ui/gui/spokes/network.py b/pyanaconda/ui/gui/spokes/network.py
index 2fff63c..9d17919 100644
--- a/pyanaconda/ui/gui/spokes/network.py
+++ b/pyanaconda/ui/gui/spokes/network.py
@@ -1147,13 +1147,17 @@ class NetworkSpoke(NormalSpoke):
if len(ac) == 1:
name, type, info = ac[0]
if type == NetworkManager.DeviceType.ETHERNET:
- msg = _("Wired (%s) connected") % name
+ msg = _("Wired (%(interface_name)s) connected") \
+ % {"interface_name": name}
elif type == NetworkManager.DeviceType.WIFI:
- msg = _("Wireless connected to %s") % info
+ msg = _("Wireless connected to %(access_point)s") \
+ % {"access_point" : info}
elif type == NetworkManager.DeviceType.BOND:
- msg = _("Bond %s (%s) connected") % (name, ",".join(info))
+ msg = _("Bond %(interface_name)s (%(list_of_slaves)s) connected") \
+ % {"interface_name": name, "list_of_slaves": ",".join(info)}
if type == NetworkManager.DeviceType.VLAN:
- msg = _("Vlan %s (%s, ID %s) connected") % (name, info[0], info[1])
+ msg = _("Vlan %(interface_name)s (%(parent_device)s, ID %(vlanid)s) connected") \
+ % {"interface_name": name, "parent_device": info[0], "vlanid": info[1]}
else:
devlist = []
for name, type, info in ac:
@@ -1165,7 +1169,8 @@ class NetworkSpoke(NormalSpoke):
devlist.append("%s (%s)" % (name, ",".join(info)))
if type == NetworkManager.DeviceType.VLAN:
devlist.append("%s" % name)
- msg = _("Connected: %s") % ", ".join(devlist)
+ msg = _("Connected: %(list_of_interface_names)s") \
+ % {"list_of_interface_names": ", ".join(devlist)}
else:
msg = _("Not connected")
--
1.7.11.7
More information about the anaconda-patches
mailing list