mirror of
https://github.com/virt-manager/virt-manager.git
synced 2025-02-25 18:55:27 -06:00
Mark more UI strings as translatable
This commit is contained in:
parent
601a82cb87
commit
2f775b6bf0
@ -261,12 +261,12 @@ class vmmCreate(vmmGObjectUI):
|
|||||||
self.widget("install-box").hide()
|
self.widget("install-box").hide()
|
||||||
self.widget("arch-expander").hide()
|
self.widget("arch-expander").hide()
|
||||||
|
|
||||||
self.widget("startup-error").set_text("Error: %s" % error)
|
self.widget("startup-error").set_text("%s: %s" % (_("Error"), error))
|
||||||
return False
|
return False
|
||||||
|
|
||||||
def _show_startup_warning(self, error):
|
def _show_startup_warning(self, error):
|
||||||
self.widget("startup-error-box").show()
|
self.widget("startup-error-box").show()
|
||||||
self.widget("startup-error").set_text("Warning: %s" % error)
|
self.widget("startup-error").set_text("%s: %s" % (_("Warning"), error))
|
||||||
|
|
||||||
|
|
||||||
def _init_state(self):
|
def _init_state(self):
|
||||||
|
@ -207,7 +207,6 @@ def _label_for_device(dev):
|
|||||||
label = _("Parallel")
|
label = _("Parallel")
|
||||||
elif devtype == "console":
|
elif devtype == "console":
|
||||||
label = _("Console")
|
label = _("Console")
|
||||||
label = devtype.capitalize()
|
|
||||||
if dev.target_port is not None:
|
if dev.target_port is not None:
|
||||||
label += " %s" % (int(dev.target_port) + 1)
|
label += " %s" % (int(dev.target_port) + 1)
|
||||||
return label
|
return label
|
||||||
@ -2428,14 +2427,17 @@ class vmmDetails(vmmGObjectUI):
|
|||||||
apps_model.append([name, version, summary])
|
apps_model.append([name, version, summary])
|
||||||
|
|
||||||
def refresh_stats_page(self):
|
def refresh_stats_page(self):
|
||||||
|
def _multi_color(text1, text2):
|
||||||
|
return ('<span color="#82003B"></span> '
|
||||||
|
'<span color="#295C45"></span>' % (text1, text2))
|
||||||
def _dsk_rx_tx_text(rx, tx, unit):
|
def _dsk_rx_tx_text(rx, tx, unit):
|
||||||
return ('<span color="#82003B">%(rx)d %(unit)s read</span> '
|
opts = {"received": rx, "transfered": tx, "units": unit}
|
||||||
'<span color="#295C45">%(tx)d %(unit)s write</span>' %
|
return _multi_color(_("%(received)d %(units)s read") % opts,
|
||||||
{"rx": rx, "tx": tx, "unit": unit})
|
_("%(transfered)d %(units)s write") % opts)
|
||||||
def _net_rx_tx_text(rx, tx, unit):
|
def _net_rx_tx_text(rx, tx, unit):
|
||||||
return ('<span color="#82003B">%(rx)d %(unit)s in</span> '
|
opts = {"received": rx, "transfered": tx, "units": unit}
|
||||||
'<span color="#295C45">%(tx)d %(unit)s out</span>' %
|
return _multi_color(_("%(received)d %(units)s in") % opts,
|
||||||
{"rx": rx, "tx": tx, "unit": unit})
|
_("%(transfered)d %(units)s out") % opts)
|
||||||
|
|
||||||
cpu_txt = _("Disabled")
|
cpu_txt = _("Disabled")
|
||||||
mem_txt = _("Disabled")
|
mem_txt = _("Disabled")
|
||||||
@ -2448,8 +2450,10 @@ class vmmDetails(vmmGObjectUI):
|
|||||||
if self.config.get_stats_enable_memory_poll():
|
if self.config.get_stats_enable_memory_poll():
|
||||||
cur_vm_memory = self.vm.stats_memory()
|
cur_vm_memory = self.vm.stats_memory()
|
||||||
vm_memory = self.vm.maximum_memory()
|
vm_memory = self.vm.maximum_memory()
|
||||||
mem_txt = "%s of %s" % (util.pretty_mem(cur_vm_memory),
|
mem_txt = _("%(current-memory) of %(total-memory)") % {
|
||||||
util.pretty_mem(vm_memory))
|
"current-memory": util.pretty_mem(cur_vm_memory),
|
||||||
|
"total-memory": util.pretty_mem(vm_memory)
|
||||||
|
}
|
||||||
|
|
||||||
if self.config.get_stats_enable_disk_poll():
|
if self.config.get_stats_enable_disk_poll():
|
||||||
dsk_txt = _dsk_rx_tx_text(self.vm.disk_read_rate(),
|
dsk_txt = _dsk_rx_tx_text(self.vm.disk_read_rate(),
|
||||||
|
@ -41,7 +41,7 @@ class VirtualController(VirtualDevice):
|
|||||||
def pretty_type(ctype):
|
def pretty_type(ctype):
|
||||||
pretty_mappings = {
|
pretty_mappings = {
|
||||||
VirtualController.TYPE_IDE : "IDE",
|
VirtualController.TYPE_IDE : "IDE",
|
||||||
VirtualController.TYPE_FDC : "Floppy",
|
VirtualController.TYPE_FDC : _("Floppy"),
|
||||||
VirtualController.TYPE_SCSI : "SCSI",
|
VirtualController.TYPE_SCSI : "SCSI",
|
||||||
VirtualController.TYPE_SATA : "SATA",
|
VirtualController.TYPE_SATA : "SATA",
|
||||||
VirtualController.TYPE_VIRTIOSERIAL : "VirtIO Serial",
|
VirtualController.TYPE_VIRTIOSERIAL : "VirtIO Serial",
|
||||||
|
Loading…
Reference in New Issue
Block a user