mirror of
https://github.com/virt-manager/virt-manager.git
synced 2025-02-03 13:47:18 +03:00
i18n: improve labels for channels
Use separate string in case we have the channel name, and in case we have the channel type. Reviewed-by: Cole Robinson <crobinso@redhat.com> Signed-off-by: Pino Toscano <ptoscano@redhat.com>
This commit is contained in:
parent
0145d9838b
commit
2927299411
@ -213,13 +213,13 @@ def _label_for_device(dev):
|
||||
return label
|
||||
|
||||
if devtype == "channel":
|
||||
label = _("Channel")
|
||||
name = vmmAddHardware.char_pretty_channel_name(dev.target_name)
|
||||
if not name:
|
||||
name = vmmAddHardware.char_pretty_type(dev.type)
|
||||
if name:
|
||||
label += " %s" % name
|
||||
return label
|
||||
return _("Channel %(name)s") % {"name": name}
|
||||
pretty_type = vmmAddHardware.char_pretty_type(dev.type)
|
||||
if pretty_type:
|
||||
return _("Channel %(type)s") % {"type": pretty_type}
|
||||
return _("Channel")
|
||||
|
||||
if devtype == "graphics":
|
||||
pretty = vmmGraphicsDetails.graphics_pretty_type_simple(dev.type)
|
||||
|
Loading…
x
Reference in New Issue
Block a user