i18n: improve label for floppy

Shortcut all the checks, and directly return the whole string (index
included) to show for floppies.

Reviewed-by: Cole Robinson <crobinso@redhat.com>
Signed-off-by: Pino Toscano <ptoscano@redhat.com>
This commit is contained in:
Pino Toscano
2020-07-13 15:37:00 -04:00
committed by Cole Robinson
parent 664197bcc7
commit 7b46ee1947
+4 -4
View File
@@ -167,12 +167,12 @@ def _label_for_device(dev):
devtype = dev.DEVICE_TYPE
if devtype == "disk":
if dev.device == "floppy":
return _("Floppy %(index)d") % {"index": dev.disk_bus_index}
busstr = vmmAddHardware.disk_pretty_bus(dev.bus) or ""
if dev.device == "floppy":
devstr = _("Floppy")
busstr = ""
elif dev.device == "cdrom":
if dev.device == "cdrom":
devstr = _("CDROM")
elif dev.device == "disk":
devstr = _("Disk")