Add a non-breaking space between number and unit

This commit is contained in:
Carsten Grohmann 2023-03-16 23:00:36 +01:00
parent 924fc37f48
commit f2b0bf42c6
2 changed files with 12 additions and 11 deletions

View File

@ -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")

View File

@ -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(