mirror of
https://github.com/virt-manager/virt-manager.git
synced 2025-02-09 09:57:40 +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
|
return label
|
||||||
|
|
||||||
if devtype == "channel":
|
if devtype == "channel":
|
||||||
label = _("Channel")
|
|
||||||
name = vmmAddHardware.char_pretty_channel_name(dev.target_name)
|
name = vmmAddHardware.char_pretty_channel_name(dev.target_name)
|
||||||
if not name:
|
|
||||||
name = vmmAddHardware.char_pretty_type(dev.type)
|
|
||||||
if name:
|
if name:
|
||||||
label += " %s" % name
|
return _("Channel %(name)s") % {"name": name}
|
||||||
return label
|
pretty_type = vmmAddHardware.char_pretty_type(dev.type)
|
||||||
|
if pretty_type:
|
||||||
|
return _("Channel %(type)s") % {"type": pretty_type}
|
||||||
|
return _("Channel")
|
||||||
|
|
||||||
if devtype == "graphics":
|
if devtype == "graphics":
|
||||||
pretty = vmmGraphicsDetails.graphics_pretty_type_simple(dev.type)
|
pretty = vmmGraphicsDetails.graphics_pretty_type_simple(dev.type)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user