[partition] Massage types of job messages
This commit is contained in:
parent
ee09fd6613
commit
e326758900
@ -31,14 +31,14 @@ ChangeFilesystemLabelJob::ChangeFilesystemLabelJob( Device* device, Partition* p
|
||||
QString
|
||||
ChangeFilesystemLabelJob::prettyName() const
|
||||
{
|
||||
return tr( "Setting filesystem label on %1…", "@status" ).arg( partition()->partitionPath() );
|
||||
return tr( "Set filesystem label on %1", "@title" ).arg( partition()->partitionPath() );
|
||||
}
|
||||
|
||||
|
||||
QString
|
||||
ChangeFilesystemLabelJob::prettyDescription() const
|
||||
{
|
||||
return tr( "Setting filesystem label <strong>%1</strong> to partition <strong>%2</strong>…", "@status" )
|
||||
return tr( "Set filesystem label <strong>%1</strong> to partition <strong>%2</strong>", "@info" )
|
||||
.arg( m_label )
|
||||
.arg( partition()->partitionPath() );
|
||||
}
|
||||
@ -47,7 +47,9 @@ ChangeFilesystemLabelJob::prettyDescription() const
|
||||
QString
|
||||
ChangeFilesystemLabelJob::prettyStatusMessage() const
|
||||
{
|
||||
return prettyDescription();
|
||||
return tr( "Setting filesystem label <strong>%1</strong> to partition <strong>%2</strong>…", "@status" )
|
||||
.arg( m_label )
|
||||
.arg( partition()->partitionPath() );
|
||||
}
|
||||
|
||||
|
||||
@ -79,5 +81,6 @@ ChangeFilesystemLabelJob::exec()
|
||||
return Calamares::JobResult::ok();
|
||||
}
|
||||
return Calamares::JobResult::error(
|
||||
tr( "The installer failed to update partition table on disk '%1'.", "@info" ).arg( m_device->name() ), report.toText() );
|
||||
tr( "The installer failed to update partition table on disk '%1'.", "@info" ).arg( m_device->name() ),
|
||||
report.toText() );
|
||||
}
|
||||
|
@ -329,7 +329,8 @@ tryVGDisable( const QString& vgName )
|
||||
vgProcess.start( "vgchange", { "-an", vgName } );
|
||||
vgProcess.waitForFinished();
|
||||
return ( vgProcess.exitCode() == 0 )
|
||||
? MessageAndPath { QT_TRANSLATE_NOOP( "ClearMountsJob", "Successfully disabled volume group %1.", "@info" ), vgName }
|
||||
? MessageAndPath { QT_TRANSLATE_NOOP( "ClearMountsJob", "Successfully disabled volume group %1.", "@info" ),
|
||||
vgName }
|
||||
: MessageAndPath {};
|
||||
}
|
||||
|
||||
@ -368,7 +369,7 @@ ClearMountsJob::ClearMountsJob( Device* device )
|
||||
QString
|
||||
ClearMountsJob::prettyName() const
|
||||
{
|
||||
return tr( "Clearing mounts for partitioning operations on %1…", "@status" ).arg( m_deviceNode );
|
||||
return tr( "Clear mounts for partitioning operations on %1", "@title" ).arg( m_deviceNode );
|
||||
}
|
||||
|
||||
QString
|
||||
|
@ -178,7 +178,7 @@ CreatePartitionJob::prettyName() const
|
||||
QString entries = prettyGptEntries( m_partition );
|
||||
if ( !entries.isEmpty() )
|
||||
{
|
||||
return tr( "Creating new %1MiB partition on %3 (%2) with entries %4…", "@status" )
|
||||
return tr( "Create new %1MiB partition on %3 (%2) with entries %4", "@title" )
|
||||
.arg( Calamares::BytesToMiB( m_partition->capacity() ) )
|
||||
.arg( m_device->name() )
|
||||
.arg( m_device->deviceNode() )
|
||||
@ -186,14 +186,14 @@ CreatePartitionJob::prettyName() const
|
||||
}
|
||||
else
|
||||
{
|
||||
return tr( "Creating new %1MiB partition on %3 (%2)…", "@status" )
|
||||
return tr( "Create new %1MiB partition on %3 (%2)", "@title" )
|
||||
.arg( Calamares::BytesToMiB( m_partition->capacity() ) )
|
||||
.arg( m_device->name() )
|
||||
.arg( m_device->deviceNode() );
|
||||
}
|
||||
}
|
||||
|
||||
return tr( "Creating new %2MiB partition on %4 (%3) with file system %1…" "@status" )
|
||||
return tr( "Create new %2MiB partition on %4 (%3) with file system %1", "@title" )
|
||||
.arg( userVisibleFS( m_partition->fileSystem() ) )
|
||||
.arg( Calamares::BytesToMiB( m_partition->capacity() ) )
|
||||
.arg( m_device->name() )
|
||||
@ -209,8 +209,9 @@ CreatePartitionJob::prettyDescription() const
|
||||
QString entries = prettyGptEntries( m_partition );
|
||||
if ( !entries.isEmpty() )
|
||||
{
|
||||
return tr( "Creating new <strong>%1MiB</strong> partition on <strong>%3</strong> (%2) with entries "
|
||||
"<em>%4</em>…", "@status" )
|
||||
return tr( "Create new <strong>%1MiB</strong> partition on <strong>%3</strong> (%2) with entries "
|
||||
"<em>%4</em>",
|
||||
"@info" )
|
||||
.arg( Calamares::BytesToMiB( m_partition->capacity() ) )
|
||||
.arg( m_device->name() )
|
||||
.arg( m_device->deviceNode() )
|
||||
@ -218,15 +219,16 @@ CreatePartitionJob::prettyDescription() const
|
||||
}
|
||||
else
|
||||
{
|
||||
return tr( "Creating new <strong>%1MiB</strong> partition on <strong>%3</strong> (%2)…", "@status" )
|
||||
return tr( "Create new <strong>%1MiB</strong> partition on <strong>%3</strong> (%2)", "@info" )
|
||||
.arg( Calamares::BytesToMiB( m_partition->capacity() ) )
|
||||
.arg( m_device->name() )
|
||||
.arg( m_device->deviceNode() );
|
||||
}
|
||||
}
|
||||
|
||||
return tr( "Creating new <strong>%2MiB</strong> partition on <strong>%4</strong> "
|
||||
"(%3) with file system <strong>%1</strong>…", "@status" )
|
||||
return tr( "Create new <strong>%2MiB</strong> partition on <strong>%4</strong> "
|
||||
"(%3) with file system <strong>%1</strong>",
|
||||
"@info" )
|
||||
.arg( userVisibleFS( m_partition->fileSystem() ) )
|
||||
.arg( Calamares::BytesToMiB( m_partition->capacity() ) )
|
||||
.arg( m_device->name() )
|
||||
|
@ -176,7 +176,7 @@ FillGlobalStorageJob::FillGlobalStorageJob( const Config*, QList< Device* > devi
|
||||
QString
|
||||
FillGlobalStorageJob::prettyName() const
|
||||
{
|
||||
return tr( "Setting partition information…", "@status" );
|
||||
return tr( "Set partition information", "@title" );
|
||||
}
|
||||
|
||||
|
||||
@ -205,15 +205,16 @@ FillGlobalStorageJob::prettyDescription() const
|
||||
{
|
||||
if ( !features.isEmpty() )
|
||||
{
|
||||
lines.append( tr( "Installing %1 on <strong>new</strong> %2 system partition "
|
||||
"with features <em>%3</em>…", "@status" )
|
||||
lines.append( tr( "Install %1 on <strong>new</strong> %2 system partition "
|
||||
"with features <em>%3</em>",
|
||||
"@info" )
|
||||
.arg( Calamares::Branding::instance()->shortProductName() )
|
||||
.arg( fsType )
|
||||
.arg( features ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
lines.append( tr( "Installing %1 on <strong>new</strong> %2 system partition…", "@status" )
|
||||
lines.append( tr( "Install %1 on <strong>new</strong> %2 system partition", "@info" )
|
||||
.arg( Calamares::Branding::instance()->shortProductName() )
|
||||
.arg( fsType ) );
|
||||
}
|
||||
@ -222,16 +223,18 @@ FillGlobalStorageJob::prettyDescription() const
|
||||
{
|
||||
if ( !features.isEmpty() )
|
||||
{
|
||||
lines.append( tr( "Setting up <strong>new</strong> %2 partition with mount point "
|
||||
"<strong>%1</strong> and features <em>%3</em>…", "@status" )
|
||||
lines.append( tr( "Set up <strong>new</strong> %2 partition with mount point "
|
||||
"<strong>%1</strong> and features <em>%3</em>",
|
||||
"@info" )
|
||||
.arg( mountPoint )
|
||||
.arg( fsType )
|
||||
.arg( features ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
lines.append( tr( "Setting up <strong>new</strong> %2 partition with mount point "
|
||||
"<strong>%1</strong>%3…", "@status" )
|
||||
lines.append( tr( "Set up <strong>new</strong> %2 partition with mount point "
|
||||
"<strong>%1</strong>%3",
|
||||
"@info" )
|
||||
.arg( mountPoint )
|
||||
.arg( fsType )
|
||||
.arg( features ) );
|
||||
@ -244,8 +247,9 @@ FillGlobalStorageJob::prettyDescription() const
|
||||
{
|
||||
if ( !features.isEmpty() )
|
||||
{
|
||||
lines.append( tr( "Installing %2 on %3 system partition <strong>%1</strong>"
|
||||
" with features <em>%4</em>…", "@status" )
|
||||
lines.append( tr( "Install %2 on %3 system partition <strong>%1</strong>"
|
||||
" with features <em>%4</em>",
|
||||
"@info" )
|
||||
.arg( path )
|
||||
.arg( Calamares::Branding::instance()->shortProductName() )
|
||||
.arg( fsType )
|
||||
@ -253,7 +257,7 @@ FillGlobalStorageJob::prettyDescription() const
|
||||
}
|
||||
else
|
||||
{
|
||||
lines.append( tr( "Installing %2 on %3 system partition <strong>%1</strong>…", "@status" )
|
||||
lines.append( tr( "Install %2 on %3 system partition <strong>%1</strong>", "@info" )
|
||||
.arg( path )
|
||||
.arg( Calamares::Branding::instance()->shortProductName() )
|
||||
.arg( fsType ) );
|
||||
@ -263,8 +267,9 @@ FillGlobalStorageJob::prettyDescription() const
|
||||
{
|
||||
if ( !features.isEmpty() )
|
||||
{
|
||||
lines.append( tr( "Setting up %3 partition <strong>%1</strong> with mount point "
|
||||
"<strong>%2</strong> and features <em>%4</em>…", "@status" )
|
||||
lines.append( tr( "Set up %3 partition <strong>%1</strong> with mount point "
|
||||
"<strong>%2</strong> and features <em>%4</em>",
|
||||
"@info" )
|
||||
.arg( path )
|
||||
.arg( mountPoint )
|
||||
.arg( fsType )
|
||||
@ -272,8 +277,9 @@ FillGlobalStorageJob::prettyDescription() const
|
||||
}
|
||||
else
|
||||
{
|
||||
lines.append( tr( "Setting up %3 partition <strong>%1</strong> with mount point "
|
||||
"<strong>%2</strong>%4…", "@status" )
|
||||
lines.append( tr( "Set up %3 partition <strong>%1</strong> with mount point "
|
||||
"<strong>%2</strong>%4…",
|
||||
"@info" )
|
||||
.arg( path )
|
||||
.arg( mountPoint )
|
||||
.arg( fsType )
|
||||
@ -287,7 +293,7 @@ FillGlobalStorageJob::prettyDescription() const
|
||||
QVariant bootloaderMap = createBootLoaderMap();
|
||||
if ( !m_bootLoaderPath.isEmpty() )
|
||||
{
|
||||
lines.append( tr( "Installing boot loader on <strong>%1</strong>…", "@status" ).arg( m_bootLoaderPath ) );
|
||||
lines.append( tr( "Install boot loader on <strong>%1</strong>…", "@info" ).arg( m_bootLoaderPath ) );
|
||||
}
|
||||
return lines.join( "<br/>" );
|
||||
}
|
||||
|
@ -36,7 +36,7 @@ FormatPartitionJob::FormatPartitionJob( Device* device, Partition* partition )
|
||||
QString
|
||||
FormatPartitionJob::prettyName() const
|
||||
{
|
||||
return tr( "Formatting partition %1 (file system: %2, size: %3 MiB) on %4…", "@status" )
|
||||
return tr( "Format partition %1 (file system: %2, size: %3 MiB) on %4", "@title" )
|
||||
.arg( m_partition->partitionPath() )
|
||||
.arg( userVisibleFS( m_partition->fileSystem() ) )
|
||||
.arg( m_partition->capacity() / 1024 / 1024 )
|
||||
@ -46,8 +46,9 @@ FormatPartitionJob::prettyName() const
|
||||
QString
|
||||
FormatPartitionJob::prettyDescription() const
|
||||
{
|
||||
return tr( "Formatting <strong>%3MiB</strong> partition <strong>%1</strong> with "
|
||||
"file system <strong>%2</strong>…", "@status" )
|
||||
return tr( "Format <strong>%3MiB</strong> partition <strong>%1</strong> with "
|
||||
"file system <strong>%2</strong>",
|
||||
"@info" )
|
||||
.arg( m_partition->partitionPath() )
|
||||
.arg( userVisibleFS( m_partition->fileSystem() ) )
|
||||
.arg( m_partition->capacity() / 1024 / 1024 );
|
||||
@ -60,8 +61,7 @@ FormatPartitionJob::prettyStatusMessage() const
|
||||
? m_partition->partitionPath()
|
||||
: tr( "%1 (%2)", "partition label %1 (device path %2)" )
|
||||
.arg( m_partition->label(), m_partition->partitionPath() );
|
||||
return tr( "Formatting partition %1 with "
|
||||
"file system %2…", "@status" )
|
||||
return tr( "Formatting partition %1 with file system %2…", "@status" )
|
||||
.arg( partitionLabel, userVisibleFS( m_partition->fileSystem() ) );
|
||||
}
|
||||
|
||||
|
@ -36,16 +36,13 @@ ResizePartitionJob::ResizePartitionJob( Device* device, Partition* partition, qi
|
||||
QString
|
||||
ResizePartitionJob::prettyName() const
|
||||
{
|
||||
// FIXME: Copy PM ResizeOperation code which generates a description of the
|
||||
// operation
|
||||
return tr( "Resizing partition %1…", "@status" ).arg( partition()->partitionPath() );
|
||||
return tr( "Resize partition %1", "@title" ).arg( partition()->partitionPath() );
|
||||
}
|
||||
|
||||
QString
|
||||
ResizePartitionJob::prettyDescription() const
|
||||
{
|
||||
return tr( "Resizing <strong>%2MiB</strong> partition <strong>%1</strong> to "
|
||||
"<strong>%3MiB</strong>…", "@status" )
|
||||
return tr( "Resize <strong>%2MiB</strong> partition <strong>%1</strong> to <strong>%3MiB</strong>", "@info" )
|
||||
.arg( partition()->partitionPath() )
|
||||
.arg( ( BytesToMiB( m_oldLastSector - m_oldFirstSector + 1 ) * partition()->sectorSize() ) )
|
||||
.arg( ( BytesToMiB( m_newLastSector - m_newFirstSector + 1 ) * partition()->sectorSize() ) );
|
||||
@ -54,8 +51,7 @@ ResizePartitionJob::prettyDescription() const
|
||||
QString
|
||||
ResizePartitionJob::prettyStatusMessage() const
|
||||
{
|
||||
return tr( "Resizing %2MiB partition %1 to "
|
||||
"%3MiB…", "@status" )
|
||||
return tr( "Resizing %2MiB partition %1 to %3MiB…", "@status" )
|
||||
.arg( partition()->partitionPath() )
|
||||
.arg( ( BytesToMiB( m_oldLastSector - m_oldFirstSector + 1 ) * partition()->sectorSize() ) )
|
||||
.arg( ( BytesToMiB( m_newLastSector - m_newFirstSector + 1 ) * partition()->sectorSize() ) );
|
||||
|
@ -25,7 +25,7 @@ ResizeVolumeGroupJob::ResizeVolumeGroupJob( Device*, LvmDevice* device, QVector<
|
||||
QString
|
||||
ResizeVolumeGroupJob::prettyName() const
|
||||
{
|
||||
return tr( "Resizing volume group named %1 from %2 to %3…", "@status" )
|
||||
return tr( "Resize volume group named %1 from %2 to %3", "@title" )
|
||||
.arg( m_device->name() )
|
||||
.arg( currentPartitions() )
|
||||
.arg( targetPartitions() );
|
||||
@ -34,7 +34,8 @@ ResizeVolumeGroupJob::prettyName() const
|
||||
QString
|
||||
ResizeVolumeGroupJob::prettyDescription() const
|
||||
{
|
||||
return tr( "Resizing volume group named <strong>%1</strong> from <strong>%2</strong> to <strong>%3</strong>…", "@status" )
|
||||
return tr( "Resize volume group named <strong>%1</strong> from <strong>%2</strong> to <strong>%3</strong>",
|
||||
"@info" )
|
||||
.arg( m_device->name() )
|
||||
.arg( currentPartitions() )
|
||||
.arg( targetPartitions() );
|
||||
|
Loading…
Reference in New Issue
Block a user