mirror of
https://github.com/virt-manager/virt-manager.git
synced 2025-01-11 05:17:59 +03:00
i18n: further improve label for controller
It seems that the index is optional, so use a proper string for this
case.
Fixes commit 00fa636682
in this file.
Reviewed-by: Cole Robinson <crobinso@redhat.com>
Signed-off-by: Pino Toscano <ptoscano@redhat.com>
This commit is contained in:
parent
bceeb23967
commit
36b3f9bee1
@ -254,11 +254,13 @@ def _label_for_device(dev):
|
|||||||
return _("Filesystem %(path)s") % {"path": dev.target[:8]}
|
return _("Filesystem %(path)s") % {"path": dev.target[:8]}
|
||||||
if devtype == "controller":
|
if devtype == "controller":
|
||||||
idx = dev.index
|
idx = dev.index
|
||||||
if idx is None:
|
if idx is not None:
|
||||||
idx = ""
|
return _("Controller %(controller)s %(index)s") % {
|
||||||
return _("Controller %(controller)s %(index)s") % {
|
"controller": vmmAddHardware.controller_pretty_desc(dev),
|
||||||
|
"index": idx,
|
||||||
|
}
|
||||||
|
return _("Controller %(controller)s") % {
|
||||||
"controller": vmmAddHardware.controller_pretty_desc(dev),
|
"controller": vmmAddHardware.controller_pretty_desc(dev),
|
||||||
"index": idx,
|
|
||||||
}
|
}
|
||||||
if devtype == "rng":
|
if devtype == "rng":
|
||||||
if dev.device:
|
if dev.device:
|
||||||
|
Loading…
Reference in New Issue
Block a user