Add a non-breaking space between number and unit
This commit is contained in:
parent
924fc37f48
commit
f2b0bf42c6
@ -4178,26 +4178,26 @@ Out of memory: Killed process 651 (unattended-upgr) total-vm:108020kB, anon-rss:
|
||||
|
||||
if item.endswith("_pages") and isinstance(content, int):
|
||||
if content == 1:
|
||||
content = "{} page".format(content)
|
||||
content = "{} page".format(content)
|
||||
else:
|
||||
content = "{} pages".format(content)
|
||||
content = "{} pages".format(content)
|
||||
|
||||
if item.endswith("_bytes") and isinstance(content, int):
|
||||
if content == 1:
|
||||
content = "{} Byte".format(content)
|
||||
content = "{} Byte".format(content)
|
||||
else:
|
||||
content = "{} Bytes".format(content)
|
||||
content = "{} Bytes".format(content)
|
||||
|
||||
if item.endswith("_kb") and isinstance(content, int):
|
||||
if content == 1:
|
||||
content = "{} kByte".format(content)
|
||||
content = "{} kByte".format(content)
|
||||
else:
|
||||
content = "{} kBytes".format(content)
|
||||
content = "{} kBytes".format(content)
|
||||
|
||||
if item.endswith("_percent") and isinstance(content, int):
|
||||
content = "{}%".format(content)
|
||||
content = "{} %".format(content)
|
||||
|
||||
element.textContent = content
|
||||
element.innerHTML = content
|
||||
|
||||
if DEBUG:
|
||||
show_element("notify_box")
|
||||
|
3
test.py
3
test.py
@ -242,7 +242,8 @@ class TestInBrowser(TestBase):
|
||||
"Used physical memory in summary not found",
|
||||
)
|
||||
self.assertTrue(
|
||||
"99% (8343236 kBytes out of 8388604 kBytes) swap space" in explanation.text,
|
||||
"99 % (8343236 kBytes out of 8388604 kBytes) swap space"
|
||||
in explanation.text,
|
||||
"Used swap space in summary not found",
|
||||
)
|
||||
self.assertTrue(
|
||||
|
Loading…
Reference in New Issue
Block a user