i18n: improve labels for TPM

Use separate strings for the path case, and for the generic case (i.e.
the version), to avoid string puzzles.

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 9d81aae894
commit d5fc02c6ae
+2 -5
View File
@@ -247,12 +247,9 @@ def _label_for_device(dev):
return _("RNG %(device)s") % {"device": dev.device}
return _("RNG")
if devtype == "tpm":
label = _("TPM")
if dev.device_path:
label += (" %s" % dev.device_path)
else:
label += (" v%s" % dev.version)
return label
return _("TPM %(device)s") % {"device": dev.device_path}
return _("TPM v%(version)s") % {"version": dev.version}
devmap = {
"panic": _("Panic Notifier"),