i18n: simplify vmmAddHardware.controller_pretty_desc
Shortcut the specific cases, avoiding string puzzles; keep using vmmAddHardware.controller_pretty_type() otherwise. Reviewed-by: Cole Robinson <crobinso@redhat.com> Signed-off-by: Pino Toscano <ptoscano@redhat.com>
This commit is contained in:
parent
838c8524d2
commit
42463cde9c
|
@ -481,13 +481,13 @@ class vmmAddHardware(vmmGObjectUI):
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def controller_pretty_desc(dev):
|
def controller_pretty_desc(dev):
|
||||||
ret = vmmAddHardware.controller_pretty_type(dev.type)
|
if dev.type == DeviceController.TYPE_SCSI:
|
||||||
if dev.type == "scsi":
|
|
||||||
if dev.model == "virtio-scsi":
|
if dev.model == "virtio-scsi":
|
||||||
ret = "Virtio " + ret
|
return _("VirtIO SCSI")
|
||||||
if dev.type == "pci" and dev.model == "pcie-root":
|
if dev.type == DeviceController.TYPE_PCI:
|
||||||
ret = _("PCIe")
|
if dev.model == "pcie-root":
|
||||||
return ret
|
return _("PCIe")
|
||||||
|
return vmmAddHardware.controller_pretty_type(dev.type)
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def disk_old_recommended_buses(guest):
|
def disk_old_recommended_buses(guest):
|
||||||
|
|
Loading…
Reference in New Issue