aboutsummaryrefslogtreecommitdiffstats
path: root/src/monitor.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/monitor.py')
-rw-r--r--src/monitor.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/monitor.py b/src/monitor.py
index 7923103..e7a3c12 100644
--- a/src/monitor.py
+++ b/src/monitor.py
@@ -146,7 +146,7 @@ class Monitor:
addr, length = buffer.buffer_info()
arg = struct.pack('Pi', addr, length)
self.wifi_ioctl(iface, self.SIOCGIWESSID, arg)
- return buffer.tobytes().strip(b'\0')
+ return buffer.tobytes().strip(b'\0').decode('utf-8')
def wifi_get_mode(self, iface):
"""Get current mode from an interface"""
@@ -274,13 +274,13 @@ class Monitor:
# convert to float
size_f = size * 1.0
pretty_size = None
- pretty_bytes = "%d Bytes%s" % (size, opt)
+ pretty_bytes = _("%d Bytes%s") % (size, opt)
if size > self.SIZE_GB:
- pretty_size = "%0.2f GB%s" % (size_f / self.SIZE_GB, opt)
+ pretty_size = "%3.3f GB%s" % (size_f / self.SIZE_GB, opt)
elif size > self.SIZE_MB:
- pretty_size = "%0.2f MB%s" % (size_f / self.SIZE_MB, opt)
+ pretty_size = "%3.3f MB%s" % (size_f / self.SIZE_MB, opt)
elif size > self.SIZE_KB:
- pretty_size = "%0.2f KB%s" % (size_f / self.SIZE_KB, opt)
+ pretty_size = "%3.3f KB%s" % (size_f / self.SIZE_KB, opt)
else:
pretty_size = pretty_bytes
return pretty_size, pretty_bytes