Merge pull request #1541 from dbungert/more-fde-strings
More fde strings
This commit is contained in:
commit
25aaf00792
|
@ -96,20 +96,21 @@ log = logging.getLogger("subiquity.server.controllers.filesystem")
|
|||
block_discover_log = logging.getLogger('block-discover')
|
||||
|
||||
|
||||
system_defective_encryption_text = _("""
|
||||
The model being installed requires TPM-backed encryption but this
|
||||
system does not support it (the reason given was "{unavailable_reason}").
|
||||
""")
|
||||
# for translators: 'reason' is the reason FDE is unavailable.
|
||||
system_defective_encryption_text = _(
|
||||
"TPM backed full-disk encryption is not available "
|
||||
"on this device (the reason given was \"{reason}\")."
|
||||
)
|
||||
|
||||
system_multiple_volumes_text = _("""
|
||||
The model being installed defines multiple volumes, which is not currently
|
||||
supported.
|
||||
""")
|
||||
system_multiple_volumes_text = _(
|
||||
"TPM backed full-disk encryption is not yet supported when "
|
||||
"the target spans multiple volumes."
|
||||
)
|
||||
|
||||
system_non_gpt_text = _("""
|
||||
The model being installed defines a volume with a partition table type other
|
||||
than GPT, which is not currently supported.
|
||||
""")
|
||||
system_non_gpt_text = _(
|
||||
"TPM backed full-disk encryption is only supported with a target volume "
|
||||
"partition table of GPT."
|
||||
)
|
||||
|
||||
|
||||
class NoSnapdSystemsOnSource(Exception):
|
||||
|
@ -218,7 +219,7 @@ class FilesystemController(SubiquityController, FilesystemManipulator):
|
|||
if se.support == StorageEncryptionSupport.DEFECTIVE:
|
||||
self._core_boot_classic_error = \
|
||||
system_defective_encryption_text.format(
|
||||
unavailable_reason=se.unavailable_reason)
|
||||
reason=se.unavailable_reason)
|
||||
if se.support == StorageEncryptionSupport.UNAVAILABLE:
|
||||
log.debug(
|
||||
"storage encryption unavailable: %r", se.unavailable_reason)
|
||||
|
|
|
@ -129,41 +129,45 @@ class TPMChoice:
|
|||
help: str
|
||||
|
||||
|
||||
tpm_help_texts = {
|
||||
"DISABLED":
|
||||
_("TPM backed full-disk encryption has been disabled."),
|
||||
"AVAILABLE_CAN_BE_DESELECTED":
|
||||
_("The entire disk will be encrypted and protected by the "
|
||||
"TPM. If this option is deselected, the disk will be "
|
||||
"unencrypted and without any protection."),
|
||||
"AVAILABLE_CANNOT_BE_DESELECTED":
|
||||
_("The entire disk will be encrypted and protected by the TPM."),
|
||||
"UNAVAILABLE":
|
||||
# for translators: 'reason' is the reason FDE is unavailable.
|
||||
_("TPM backed full-disk encryption is not available "
|
||||
"on this device (the reason given was \"{reason}\")."),
|
||||
}
|
||||
|
||||
choices = {
|
||||
StorageEncryptionSupport.DISABLED: {
|
||||
safety: TPMChoice(
|
||||
enabled=False, default=False,
|
||||
help=_("The model being installed does not support TPM backed "
|
||||
"full-disk encryption")) for safety in StorageSafety
|
||||
},
|
||||
help=tpm_help_texts['DISABLED'])
|
||||
for safety in StorageSafety
|
||||
},
|
||||
StorageEncryptionSupport.AVAILABLE: {
|
||||
StorageSafety.ENCRYPTED: TPMChoice(
|
||||
enabled=False, default=True,
|
||||
help=_("The model being installed requires TPM backed full-disk "
|
||||
"encryption")),
|
||||
help=tpm_help_texts['AVAILABLE_CANNOT_BE_DESELECTED']),
|
||||
StorageSafety.PREFER_ENCRYPTED: TPMChoice(
|
||||
enabled=True, default=True,
|
||||
help=_("The entire disk will be encrypted and protected by the "
|
||||
"TPM. If this option is deselected, the disk will be "
|
||||
"unencrypted and without any protection.")),
|
||||
help=tpm_help_texts['AVAILABLE_CAN_BE_DESELECTED']),
|
||||
StorageSafety.PREFER_UNENCRYPTED: TPMChoice(
|
||||
enabled=True, default=False,
|
||||
help=_("The model being installed does not prefer but allows TPM "
|
||||
"backed full-disk encryption")),
|
||||
},
|
||||
help=tpm_help_texts['AVAILABLE_CAN_BE_DESELECTED']),
|
||||
},
|
||||
StorageEncryptionSupport.UNAVAILABLE: {
|
||||
StorageSafety.PREFER_ENCRYPTED: TPMChoice(
|
||||
safety: TPMChoice(
|
||||
enabled=False, default=False,
|
||||
help=_("The model being installed prefers but does not require "
|
||||
"TPM backed full-disk encryption and it is not available "
|
||||
"on this device (the reason given was \"{reason}\").")),
|
||||
StorageSafety.PREFER_UNENCRYPTED: TPMChoice(
|
||||
enabled=False, default=False,
|
||||
# for translators: 'reason' is the reason FDE is unavailable.
|
||||
help=_("The model being installed does not prefer TPM backed "
|
||||
"full-disk encryption and it is not available on this "
|
||||
"device (the reason given was \"{reason}\").")),
|
||||
},
|
||||
help=tpm_help_texts['UNAVAILABLE'])
|
||||
for safety in StorageSafety
|
||||
},
|
||||
# StorageEncryptionSupport.DEFECTIVE: handled in controller code
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue