i18n: improve labels for RNG

Use a separate string in case it has an associated device to avoid a
string puzzle.

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 10:25:45 +02:00 committed by Cole Robinson
parent aa369e7a8d
commit 9d81aae894
1 changed files with 2 additions and 3 deletions

View File

@ -243,10 +243,9 @@ def _label_for_device(dev):
return _("Controller") + (" %s %s" % ( return _("Controller") + (" %s %s" % (
vmmAddHardware.controller_pretty_desc(dev), dev.index)) vmmAddHardware.controller_pretty_desc(dev), dev.index))
if devtype == "rng": if devtype == "rng":
label = _("RNG")
if dev.device: if dev.device:
label += (" %s" % dev.device) return _("RNG %(device)s") % {"device": dev.device}
return label return _("RNG")
if devtype == "tpm": if devtype == "tpm":
label = _("TPM") label = _("TPM")
if dev.device_path: if dev.device_path: