1
0
Fork 0
mirror of https://github.com/retspen/webvirtcloud synced 2026-12-03 17:36:05 +00:00

fix(ui): sizes in the units the forms ask in, percentages as the language writes them

- binary_size filter (common_tags): every size on the pages is B/KiB/MiB/GiB/TiB
  with the language's decimal mark; Django's filesizeformat said GB for GiB, so a
  page showed "512,0 MB / 3,8 GB" beside "0,4 / 3,8 GiB" and a disk "20,0 GB"
  next to a GiB field
- percent filter and Intl percent in charts.js, the job panel and the new-VM
  dialog: 13% in English, %13 in Turkish (pages had "13 %", "%11" and "13%")
- the Jobs page and panel say in whole sentences that the job worker is not
  running and that jobs wait for it, instead of a sentence glued to a date
- job state badges start with a capital, as the VM state badges (CSS, so the
  label stays lowercase inside sentences)
- profile card shows the username under the name only when there is a full name
- Turkish: hostname, revert snapshot, snapshot count, API token and worker texts
This commit is contained in:
catborise 2026-11-22 18:25:15 +03:00
parent 50fa42181b
commit 7408a575d6
52 changed files with 241 additions and 127 deletions

View file

@ -609,7 +609,7 @@ class BackupTabTests(PageControls, TransactionTestCase):
page = lxml_html.fromstring(self.last_page)
self.assertTrue(page.xpath("//div[@id='backups']//form[contains(@action, '/backups/vm/')]"))
self.assertIn("nfs1", page.xpath("string(//select[@id='backup-target'])"))
self.assertIn("3.0", page.xpath("string(//div[@id='backups']//table)"))
self.assertIn("3\xa0GiB", page.xpath("string(//div[@id='backups']//table)"))
backup_proxy.return_value.backup_plan.side_effect = OperationError("%(vm)s has TPM state", vm="ctl-vm")
self.controls(admin)
page = lxml_html.fromstring(self.last_page)