Skip to content
Snippets Groups Projects
Commit b7250854 authored by Adriaan de Groot's avatar Adriaan de Groot
Browse files

[partition] Simplify variables for error messages

parent c506808d
No related branches found
No related tags found
No related merge requests found
...@@ -552,20 +552,16 @@ PartitionViewStep::onLeave() ...@@ -552,20 +552,16 @@ PartitionViewStep::onLeave()
const QString wrongFlagMessage = tr( "The filesystem must have flag <strong>%1</strong> set." ) const QString wrongFlagMessage = tr( "The filesystem must have flag <strong>%1</strong> set." )
.arg( PartitionTable::flagName( PartitionTable::Flag::Boot ) ); .arg( PartitionTable::flagName( PartitionTable::Flag::Boot ) );
// Three flavors of size-is-wrong const auto recommendedMiB = Calamares::BytesToMiB( PartUtils::efiFilesystemRecommendedSize() );
using Calamares::Units::operator""_MiB; const auto minimumMiB = Calamares::BytesToMiB( PartUtils::efiFilesystemMinimumSize() );
const qint64 atLeastBytes = static_cast< qint64 >( PartUtils::efiFilesystemRecommendedSize() );
const auto atLeastMiB = Calamares::BytesToMiB( atLeastBytes );
// Three flavors of size-is-wrong
const QString requireConfiguredSize const QString requireConfiguredSize
= tr( "The filesystem must be at least %1 MiB in size." ).arg( atLeastMiB ); = tr( "The filesystem must be at least %1 MiB in size." ).arg( recommendedMiB );
const QString requiredMinimumSize const QString requiredMinimumSize
= tr( "The filesystem must be at least %1 MiB in size." ) = tr( "The filesystem must be at least %1 MiB in size." ).arg( minimumMiB );
.arg( Calamares::BytesToMiB( PartUtils::efiFilesystemMinimumSize() ) );
const QString suggestConfiguredSize const QString suggestConfiguredSize
= tr( "The minimum recommended size for the filesystem is %1 MiB." ).arg( atLeastMiB ); = tr( "The minimum recommended size for the filesystem is %1 MiB." ).arg( recommendedMiB );
const QString mayFail = tr( "You can continue without setting up an EFI system " const QString mayFail = tr( "You can continue without setting up an EFI system "
"partition but your system may fail to start." ); "partition but your system may fail to start." );
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment