Improve semantic markup of translations.

This commit is contained in:
Andrius Štikonas 2016-07-17 23:41:00 +01:00
parent 9d040e6081
commit 3a2b78e143
51 changed files with 305 additions and 305 deletions

View File

@ -106,7 +106,7 @@ bool OperationStack::mergeNewOperation(Operation*& currentOp, Operation*& pushed
// -- 1 -- // -- 1 --
if (pushedDeleteOp && &newOp->newPartition() == &pushedDeleteOp->deletedPartition() && !pushedDeleteOp->deletedPartition().roles().has(PartitionRole::Extended)) { if (pushedDeleteOp && &newOp->newPartition() == &pushedDeleteOp->deletedPartition() && !pushedDeleteOp->deletedPartition().roles().has(PartitionRole::Extended)) {
Log() << i18nc("@info/plain", "Deleting a partition just created: Undoing the operation to create the partition."); Log() << xi18nc("@info:status", "Deleting a partition just created: Undoing the operation to create the partition.");
delete pushedOp; delete pushedOp;
pushedOp = nullptr; pushedOp = nullptr;
@ -124,7 +124,7 @@ bool OperationStack::mergeNewOperation(Operation*& currentOp, Operation*& pushed
// a resizeop is added to the stack. Next, the user deletes the child. Then he resizes the // a resizeop is added to the stack. Next, the user deletes the child. Then he resizes the
// extended again (a second resize): The ResizeOp still has the pointer to the original extended that // extended again (a second resize): The ResizeOp still has the pointer to the original extended that
// will now be deleted. // will now be deleted.
Log() << i18nc("@info/plain", "Resizing a partition just created: Updating start and end in existing operation."); Log() << xi18nc("@info:status", "Resizing a partition just created: Updating start and end in existing operation.");
Partition* newPartition = new Partition(newOp->newPartition()); Partition* newPartition = new Partition(newOp->newPartition());
newPartition->setFirstSector(pushedResizeOp->newFirstSector()); newPartition->setFirstSector(pushedResizeOp->newFirstSector());
@ -144,7 +144,7 @@ bool OperationStack::mergeNewOperation(Operation*& currentOp, Operation*& pushed
// -- 3 -- // -- 3 --
if (pushedCopyOp && &newOp->newPartition() == &pushedCopyOp->sourcePartition()) { if (pushedCopyOp && &newOp->newPartition() == &pushedCopyOp->sourcePartition()) {
Log() << i18nc("@info/plain", "Copying a new partition: Creating a new partition instead."); Log() << xi18nc("@info:status", "Copying a new partition: Creating a new partition instead.");
Partition* newPartition = new Partition(newOp->newPartition()); Partition* newPartition = new Partition(newOp->newPartition());
newPartition->setFirstSector(pushedCopyOp->copiedPartition().firstSector()); newPartition->setFirstSector(pushedCopyOp->copiedPartition().firstSector());
@ -161,7 +161,7 @@ bool OperationStack::mergeNewOperation(Operation*& currentOp, Operation*& pushed
// -- 4 -- // -- 4 --
if (pushedLabelOp && &newOp->newPartition() == &pushedLabelOp->labeledPartition()) { if (pushedLabelOp && &newOp->newPartition() == &pushedLabelOp->labeledPartition()) {
Log() << i18nc("@info/plain", "Changing label for a new partition: No new operation required."); Log() << xi18nc("@info:status", "Changing label for a new partition: No new operation required.");
newOp->setLabelJob()->setLabel(pushedLabelOp->newLabel()); newOp->setLabelJob()->setLabel(pushedLabelOp->newLabel());
newOp->newPartition().fileSystem().setLabel(pushedLabelOp->newLabel()); newOp->newPartition().fileSystem().setLabel(pushedLabelOp->newLabel());
@ -174,7 +174,7 @@ bool OperationStack::mergeNewOperation(Operation*& currentOp, Operation*& pushed
// -- 5 -- // -- 5 --
if (pushedCreateFileSystemOp && &newOp->newPartition() == &pushedCreateFileSystemOp->partition()) { if (pushedCreateFileSystemOp && &newOp->newPartition() == &pushedCreateFileSystemOp->partition()) {
Log() << i18nc("@info/plain", "Changing file system for a new partition: No new operation required."); Log() << xi18nc("@info:status", "Changing file system for a new partition: No new operation required.");
FileSystem* oldFs = &newOp->newPartition().fileSystem(); FileSystem* oldFs = &newOp->newPartition().fileSystem();
@ -191,7 +191,7 @@ bool OperationStack::mergeNewOperation(Operation*& currentOp, Operation*& pushed
// -- 6 -- // -- 6 --
if (pushedCheckOp && &newOp->newPartition() == &pushedCheckOp->checkedPartition()) { if (pushedCheckOp && &newOp->newPartition() == &pushedCheckOp->checkedPartition()) {
Log() << i18nc("@info/plain", "Checking file systems is automatically done when creating them: No new operation required."); Log() << xi18nc("@info:status", "Checking file systems is automatically done when creating them: No new operation required.");
delete pushedOp; delete pushedOp;
pushedOp = nullptr; pushedOp = nullptr;
@ -238,12 +238,12 @@ bool OperationStack::mergeCopyOperation(Operation*& currentOp, Operation*& pushe
// If the copy operation didn't overwrite, but create a new partition, just remove the // If the copy operation didn't overwrite, but create a new partition, just remove the
// copy operation, forget the delete and be done. // copy operation, forget the delete and be done.
if (copyOp->overwrittenPartition() == nullptr) { if (copyOp->overwrittenPartition() == nullptr) {
Log() << i18nc("@info/plain", "Deleting a partition just copied: Removing the copy."); Log() << xi18nc("@info:status", "Deleting a partition just copied: Removing the copy.");
delete pushedOp; delete pushedOp;
pushedOp = nullptr; pushedOp = nullptr;
} else { } else {
Log() << i18nc("@info/plain", "Deleting a partition just copied over an existing partition: Removing the copy and deleting the existing partition."); Log() << xi18nc("@info:status", "Deleting a partition just copied over an existing partition: Removing the copy and deleting the existing partition.");
pushedDeleteOp->setDeletedPartition(copyOp->overwrittenPartition()); pushedDeleteOp->setDeletedPartition(copyOp->overwrittenPartition());
} }
@ -256,7 +256,7 @@ bool OperationStack::mergeCopyOperation(Operation*& currentOp, Operation*& pushe
// -- 2 -- // -- 2 --
if (pushedCopyOp && &copyOp->copiedPartition() == &pushedCopyOp->sourcePartition()) { if (pushedCopyOp && &copyOp->copiedPartition() == &pushedCopyOp->sourcePartition()) {
Log() << i18nc("@info/plain", "Copying a partition that is itself a copy: Copying the original source partition instead."); Log() << xi18nc("@info:status", "Copying a partition that is itself a copy: Copying the original source partition instead.");
pushedCopyOp->setSourcePartition(&copyOp->sourcePartition()); pushedCopyOp->setSourcePartition(&copyOp->sourcePartition());
} }
@ -285,12 +285,12 @@ bool OperationStack::mergeRestoreOperation(Operation*& currentOp, Operation*& pu
if (pushedDeleteOp && &restoreOp->restorePartition() == &pushedDeleteOp->deletedPartition()) { if (pushedDeleteOp && &restoreOp->restorePartition() == &pushedDeleteOp->deletedPartition()) {
if (restoreOp->overwrittenPartition() == nullptr) { if (restoreOp->overwrittenPartition() == nullptr) {
Log() << i18nc("@info/plain", "Deleting a partition just restored: Removing the restore operation."); Log() << xi18nc("@info:status", "Deleting a partition just restored: Removing the restore operation.");
delete pushedOp; delete pushedOp;
pushedOp = nullptr; pushedOp = nullptr;
} else { } else {
Log() << i18nc("@info/plain", "Deleting a partition just restored to an existing partition: Removing the restore operation and deleting the existing partition."); Log() << xi18nc("@info:status", "Deleting a partition just restored to an existing partition: Removing the restore operation and deleting the existing partition.");
pushedDeleteOp->setDeletedPartition(restoreOp->overwrittenPartition()); pushedDeleteOp->setDeletedPartition(restoreOp->overwrittenPartition());
} }
@ -323,7 +323,7 @@ bool OperationStack::mergePartFlagsOperation(Operation*& currentOp, Operation*&
SetPartFlagsOperation* pushedFlagsOp = dynamic_cast<SetPartFlagsOperation*>(pushedOp); SetPartFlagsOperation* pushedFlagsOp = dynamic_cast<SetPartFlagsOperation*>(pushedOp);
if (pushedFlagsOp && &partFlagsOp->flagPartition() == &pushedFlagsOp->flagPartition()) { if (pushedFlagsOp && &partFlagsOp->flagPartition() == &pushedFlagsOp->flagPartition()) {
Log() << i18nc("@info/plain", "Changing flags again for the same partition: Removing old operation."); Log() << xi18nc("@info:status", "Changing flags again for the same partition: Removing old operation.");
pushedFlagsOp->setOldFlags(partFlagsOp->oldFlags()); pushedFlagsOp->setOldFlags(partFlagsOp->oldFlags());
partFlagsOp->undo(); partFlagsOp->undo();
@ -354,7 +354,7 @@ bool OperationStack::mergePartLabelOperation(Operation*& currentOp, Operation*&
SetFileSystemLabelOperation* pushedLabelOp = dynamic_cast<SetFileSystemLabelOperation*>(pushedOp); SetFileSystemLabelOperation* pushedLabelOp = dynamic_cast<SetFileSystemLabelOperation*>(pushedOp);
if (pushedLabelOp && &partLabelOp->labeledPartition() == &pushedLabelOp->labeledPartition()) { if (pushedLabelOp && &partLabelOp->labeledPartition() == &pushedLabelOp->labeledPartition()) {
Log() << i18nc("@info/plain", "Changing label again for the same partition: Removing old operation."); Log() << xi18nc("@info:status", "Changing label again for the same partition: Removing old operation.");
pushedLabelOp->setOldLabel(partLabelOp->oldLabel()); pushedLabelOp->setOldLabel(partLabelOp->oldLabel());
partLabelOp->undo(); partLabelOp->undo();
@ -380,7 +380,7 @@ bool OperationStack::mergeCreatePartitionTableOperation(Operation*& currentOp, O
CreatePartitionTableOperation* pushedCreatePartitionTableOp = dynamic_cast<CreatePartitionTableOperation*>(pushedOp); CreatePartitionTableOperation* pushedCreatePartitionTableOp = dynamic_cast<CreatePartitionTableOperation*>(pushedOp);
if (pushedCreatePartitionTableOp && currentOp->targets(pushedCreatePartitionTableOp->targetDevice())) { if (pushedCreatePartitionTableOp && currentOp->targets(pushedCreatePartitionTableOp->targetDevice())) {
Log() << i18nc("@info/plain", "Creating new partition table, discarding previous operation on device."); Log() << xi18nc("@info:status", "Creating new partition table, discarding previous operation on device.");
CreatePartitionTableOperation* createPartitionTableOp = dynamic_cast<CreatePartitionTableOperation*>(currentOp); CreatePartitionTableOperation* createPartitionTableOp = dynamic_cast<CreatePartitionTableOperation*>(currentOp);
if (createPartitionTableOp != nullptr) if (createPartitionTableOp != nullptr)
@ -429,7 +429,7 @@ void OperationStack::push(Operation* o)
} }
if (o != nullptr) { if (o != nullptr) {
Log() << i18nc("@info/plain", "Add operation: %1", o->description()); Log() << xi18nc("@info:status", "Add operation: %1", o->description());
operations().append(o); operations().append(o);
o->preview(); o->preview();
o->setStatus(Operation::StatusPending); o->setStatus(Operation::StatusPending);

View File

@ -158,16 +158,16 @@ bool Partition::operator!=(const Partition& other) const
QString Partition::deviceNode() const QString Partition::deviceNode() const
{ {
if (roles().has(PartitionRole::None) || roles().has(PartitionRole::Unallocated)) if (roles().has(PartitionRole::None) || roles().has(PartitionRole::Unallocated))
return i18nc("@item partition name", "unallocated"); return xi18nc("@item partition name", "unallocated");
if (state() == StateNew) if (state() == StateNew)
return i18nc("@item partition name", "New Partition"); return xi18nc("@item partition name", "New Partition");
if (state() == StateRestore) if (state() == StateRestore)
return i18nc("@item partition name", "Restored Partition"); return xi18nc("@item partition name", "Restored Partition");
if (state() == StateCopy) if (state() == StateCopy)
return i18nc("@item partition name", "Copy of %1", partitionPath()); return xi18nc("@item partition name", "Copy of %1", partitionPath());
return partitionPath(); return partitionPath();
} }

View File

@ -82,10 +82,10 @@ bool PartitionAlignment::isAligned(const Device& d, const Partition& p, bool qui
bool PartitionAlignment::isAligned(const Device& d, const Partition& p, qint64 newFirst, qint64 newLast, bool quiet) bool PartitionAlignment::isAligned(const Device& d, const Partition& p, qint64 newFirst, qint64 newLast, bool quiet)
{ {
if (firstDelta(d, p, newFirst) && !quiet) if (firstDelta(d, p, newFirst) && !quiet)
Log(Log::warning) << xi18nc("@info/plain", "Partition <filename>%1</filename> is not properly aligned (first sector: %2, modulo: %3).", p.deviceNode(), newFirst, firstDelta(d, p, newFirst)); Log(Log::warning) << xi18nc("@info:status", "Partition <filename>%1</filename> is not properly aligned (first sector: %2, modulo: %3).", p.deviceNode(), newFirst, firstDelta(d, p, newFirst));
if (lastDelta(d, p, newLast) && !quiet) if (lastDelta(d, p, newLast) && !quiet)
Log(Log::warning) << xi18nc("@info/plain", "Partition <filename>%1</filename> is not properly aligned (last sector: %2, modulo: %3).", p.deviceNode(), newLast, lastDelta(d, p, newLast)); Log(Log::warning) << xi18nc("@info:status", "Partition <filename>%1</filename> is not properly aligned (last sector: %2, modulo: %3).", p.deviceNode(), newLast, lastDelta(d, p, newLast));
return firstDelta(d, p, newFirst) == 0 && lastDelta(d, p, newLast) == 0; return firstDelta(d, p, newFirst) == 0 && lastDelta(d, p, newLast) == 0;
} }

View File

@ -26,19 +26,19 @@
QString PartitionRole::toString() const QString PartitionRole::toString() const
{ {
if (roles() & Unallocated) if (roles() & Unallocated)
return i18nc("@item partition role", "unallocated"); return xi18nc("@item partition role", "unallocated");
if (roles() & Logical) if (roles() & Logical)
return i18nc("@item partition role", "logical"); return xi18nc("@item partition role", "logical");
if (roles() & Extended) if (roles() & Extended)
return i18nc("@item partition role", "extended"); return xi18nc("@item partition role", "extended");
if (roles() & Primary) if (roles() & Primary)
return i18nc("@item partition role", "primary"); return xi18nc("@item partition role", "primary");
if (roles() & Luks) if (roles() & Luks)
return i18nc("@item partition role", "LUKS"); return xi18nc("@item partition role", "LUKS");
return i18nc("@item partition role", "none"); return xi18nc("@item partition role", "none");
} }

View File

@ -151,41 +151,41 @@ QString PartitionTable::flagName(Flag f)
{ {
switch (f) { switch (f) {
case PartitionTable::FlagBoot: case PartitionTable::FlagBoot:
return i18nc("@item partition flag", "boot"); return xi18nc("@item partition flag", "boot");
case PartitionTable::FlagRoot: case PartitionTable::FlagRoot:
return i18nc("@item partition flag", "root"); return xi18nc("@item partition flag", "root");
case PartitionTable::FlagSwap: case PartitionTable::FlagSwap:
return i18nc("@item partition flag", "swap"); return xi18nc("@item partition flag", "swap");
case PartitionTable::FlagHidden: case PartitionTable::FlagHidden:
return i18nc("@item partition flag", "hidden"); return xi18nc("@item partition flag", "hidden");
case PartitionTable::FlagRaid: case PartitionTable::FlagRaid:
return i18nc("@item partition flag", "raid"); return xi18nc("@item partition flag", "raid");
case PartitionTable::FlagLvm: case PartitionTable::FlagLvm:
return i18nc("@item partition flag", "lvm"); return xi18nc("@item partition flag", "lvm");
case PartitionTable::FlagLba: case PartitionTable::FlagLba:
return i18nc("@item partition flag", "lba"); return xi18nc("@item partition flag", "lba");
case PartitionTable::FlagHpService: case PartitionTable::FlagHpService:
return i18nc("@item partition flag", "hpservice"); return xi18nc("@item partition flag", "hpservice");
case PartitionTable::FlagPalo: case PartitionTable::FlagPalo:
return i18nc("@item partition flag", "palo"); return xi18nc("@item partition flag", "palo");
case PartitionTable::FlagPrep: case PartitionTable::FlagPrep:
return i18nc("@item partition flag", "prep"); return xi18nc("@item partition flag", "prep");
case PartitionTable::FlagMsftReserved: case PartitionTable::FlagMsftReserved:
return i18nc("@item partition flag", "msft-reserved"); return xi18nc("@item partition flag", "msft-reserved");
case PartitionTable::FlagBiosGrub: case PartitionTable::FlagBiosGrub:
return i18nc("@item partition flag", "bios-grub"); return xi18nc("@item partition flag", "bios-grub");
case PartitionTable::FlagAppleTvRecovery: case PartitionTable::FlagAppleTvRecovery:
return i18nc("@item partition flag", "apple-tv-recovery"); return xi18nc("@item partition flag", "apple-tv-recovery");
case PartitionTable::FlagDiag: case PartitionTable::FlagDiag:
return i18nc("@item partition flag", "diag"); return xi18nc("@item partition flag", "diag");
case PartitionTable::FlagLegacyBoot: case PartitionTable::FlagLegacyBoot:
return i18nc("@item partition flag", "legacy-boot"); return xi18nc("@item partition flag", "legacy-boot");
case PartitionTable::FlagMsftData: case PartitionTable::FlagMsftData:
return i18nc("@item partition flag", "msft-data"); return xi18nc("@item partition flag", "msft-data");
case PartitionTable::FlagIrst: case PartitionTable::FlagIrst:
return i18nc("@item partition flag", "irst"); return xi18nc("@item partition flag", "irst");
case PartitionTable::FlagEsp: case PartitionTable::FlagEsp:
return i18nc("@item partition flag", "esp"); return xi18nc("@item partition flag", "esp");
default: default:
break; break;
} }
@ -416,7 +416,7 @@ QString PartitionTable::tableTypeToName(TableType l)
if (l == tableTypes[i].type) if (l == tableTypes[i].type)
return tableTypes[i].name; return tableTypes[i].name;
return i18nc("@item partition table name", "unknown"); return xi18nc("@item partition table name", "unknown");
} }
qint64 PartitionTable::maxPrimariesForTableType(TableType l) qint64 PartitionTable::maxPrimariesForTableType(TableType l)

View File

@ -51,20 +51,20 @@ QString SmartAttribute::assessmentToString(Assessment a)
{ {
switch (a) { switch (a) {
case Failing: case Failing:
return i18nc("@item:intable", "failing"); return xi18nc("@item:intable", "failing");
case HasFailed: case HasFailed:
return i18nc("@item:intable", "has failed"); return xi18nc("@item:intable", "has failed");
case Warning: case Warning:
return i18nc("@item:intable", "warning"); return xi18nc("@item:intable", "warning");
case Good: case Good:
return i18nc("@item:intable", "good"); return xi18nc("@item:intable", "good");
case NotApplicable: case NotApplicable:
default: default:
return i18nc("@item:intable not applicable", "N/A"); return xi18nc("@item:intable not applicable", "N/A");
} }
} }
@ -78,7 +78,7 @@ static QString getPrettyValue(qint64 value, qint64 unit)
break; break;
case SK_SMART_ATTRIBUTE_UNIT_SECTORS: case SK_SMART_ATTRIBUTE_UNIT_SECTORS:
rval = i18ncp("@item:intable", "%1 sector", "%1 sectors", value); rval = xi18ncp("@item:intable", "%1 sector", "%1 sectors", value);
break; break;
case SK_SMART_ATTRIBUTE_UNIT_MKELVIN: case SK_SMART_ATTRIBUTE_UNIT_MKELVIN:
@ -91,7 +91,7 @@ static QString getPrettyValue(qint64 value, qint64 unit)
case SK_SMART_ATTRIBUTE_UNIT_UNKNOWN: case SK_SMART_ATTRIBUTE_UNIT_UNKNOWN:
default: default:
rval = i18nc("@item:intable not applicable", "N/A"); rval = xi18nc("@item:intable not applicable", "N/A");
break; break;
} }

View File

@ -196,42 +196,42 @@ QString SmartStatus::tempToString(qint64 mkelvin)
{ {
const double celsius = (mkelvin - 273150.0) / 1000.0; const double celsius = (mkelvin - 273150.0) / 1000.0;
const double fahrenheit = 9.0 * celsius / 5.0 + 32; const double fahrenheit = 9.0 * celsius / 5.0 + 32;
return i18nc("@item:intable degrees in Celsius and Fahrenheit", "%1° C / %2° F", QLocale().toString(celsius, 1), QLocale().toString(fahrenheit, 1)); return xi18nc("@item:intable degrees in Celsius and Fahrenheit", "%1° C / %2° F", QLocale().toString(celsius, 1), QLocale().toString(fahrenheit, 1));
} }
QString SmartStatus::selfTestStatusToString(SmartStatus::SelfTestStatus s) QString SmartStatus::selfTestStatusToString(SmartStatus::SelfTestStatus s)
{ {
switch (s) { switch (s) {
case Aborted: case Aborted:
return i18nc("@item", "Aborted"); return xi18nc("@item", "Aborted");
case Interrupted: case Interrupted:
return i18nc("@item", "Interrupted"); return xi18nc("@item", "Interrupted");
case Fatal: case Fatal:
return i18nc("@item", "Fatal error"); return xi18nc("@item", "Fatal error");
case ErrorUnknown: case ErrorUnknown:
return i18nc("@item", "Unknown error"); return xi18nc("@item", "Unknown error");
case ErrorEletrical: case ErrorEletrical:
return i18nc("@item", "Electrical error"); return xi18nc("@item", "Electrical error");
case ErrorServo: case ErrorServo:
return i18nc("@item", "Servo error"); return xi18nc("@item", "Servo error");
case ErrorRead: case ErrorRead:
return i18nc("@item", "Read error"); return xi18nc("@item", "Read error");
case ErrorHandling: case ErrorHandling:
return i18nc("@item", "Handling error"); return xi18nc("@item", "Handling error");
case InProgress: case InProgress:
return i18nc("@item", "Self test in progress"); return xi18nc("@item", "Self test in progress");
case Success: case Success:
default: default:
return i18nc("@item", "Success"); return xi18nc("@item", "Success");
} }
} }
@ -240,23 +240,23 @@ QString SmartStatus::overallAssessmentToString(Overall o)
{ {
switch (o) { switch (o) {
case Good: case Good:
return i18nc("@item", "Healthy"); return xi18nc("@item", "Healthy");
case BadPast: case BadPast:
return i18nc("@item", "Has been used outside of its design parameters in the past."); return xi18nc("@item", "Has been used outside of its design parameters in the past.");
case BadSectors: case BadSectors:
return i18nc("@item", "Has some bad sectors."); return xi18nc("@item", "Has some bad sectors.");
case BadNow: case BadNow:
return i18nc("@item", "Is being used outside of its design parameters right now."); return xi18nc("@item", "Is being used outside of its design parameters right now.");
case BadSectorsMany: case BadSectorsMany:
return i18nc("@item", "Has many bad sectors."); return xi18nc("@item", "Has many bad sectors.");
case Bad: case Bad:
default: default:
return i18nc("@item", "Disk failure is imminent. Backup all data!"); return xi18nc("@item", "Disk failure is imminent. Backup all data!");
} }
} }

View File

@ -136,7 +136,7 @@ bool btrfs::resize(Report& report, const QString& deviceNode, qint64 length) con
{ {
QTemporaryDir tempDir; QTemporaryDir tempDir;
if (!tempDir.isValid()) { if (!tempDir.isValid()) {
report.line() << xi18nc("@info/plain", "Resizing Btrfs file system on partition <filename>%1</filename> failed: Could not create temp dir.", deviceNode); report.line() << xi18nc("@info:progress", "Resizing Btrfs file system on partition <filename>%1</filename> failed: Could not create temp dir.", deviceNode);
return false; return false;
} }
@ -152,14 +152,14 @@ bool btrfs::resize(Report& report, const QString& deviceNode, qint64 length) con
if (resizeCmd.run(-1) && resizeCmd.exitCode() == 0) if (resizeCmd.run(-1) && resizeCmd.exitCode() == 0)
rval = true; rval = true;
else else
report.line() << xi18nc("@info/plain", "Resizing Btrfs file system on partition <filename>%1</filename> failed: btrfs file system resize failed.", deviceNode); report.line() << xi18nc("@info:progress", "Resizing Btrfs file system on partition <filename>%1</filename> failed: btrfs file system resize failed.", deviceNode);
ExternalCommand unmountCmd(report, QStringLiteral("umount"), { tempDir.path() }); ExternalCommand unmountCmd(report, QStringLiteral("umount"), { tempDir.path() });
if (!unmountCmd.run(-1) && unmountCmd.exitCode() == 0) if (!unmountCmd.run(-1) && unmountCmd.exitCode() == 0)
report.line() << xi18nc("@info/plain", "Warning: Resizing Btrfs file system on partition <filename>%1</filename>: Unmount failed.", deviceNode); report.line() << xi18nc("@info:progress", "Warning: Resizing Btrfs file system on partition <filename>%1</filename>: Unmount failed.", deviceNode);
} else } else
report.line() << xi18nc("@info/plain", "Resizing Btrfs file system on partition <filename>%1</filename> failed: Initial mount failed.", deviceNode); report.line() << xi18nc("@info:progress", "Resizing Btrfs file system on partition <filename>%1</filename> failed: Initial mount failed.", deviceNode);
return rval; return rval;
} }

View File

@ -131,7 +131,7 @@ qint64 fat16::readUsedCapacity(const QString& deviceNode) const
bool fat16::writeLabel(Report& report, const QString& deviceNode, const QString& newLabel) bool fat16::writeLabel(Report& report, const QString& deviceNode, const QString& newLabel)
{ {
report.line() << xi18nc("@info/plain", "Setting label for partition <filename>%1</filename> to %2", deviceNode, newLabel); report.line() << xi18nc("@info:progress", "Setting label for partition <filename>%1</filename> to %2", deviceNode, newLabel);
ExternalCommand cmd(report, QStringLiteral("fatlabel"), { deviceNode, newLabel }); ExternalCommand cmd(report, QStringLiteral("fatlabel"), { deviceNode, newLabel });
return cmd.run(-1) && cmd.exitCode() == 0; return cmd.run(-1) && cmd.exitCode() == 0;

View File

@ -305,33 +305,33 @@ QString FileSystem::name() const
static const QString* typeNames() static const QString* typeNames()
{ {
static const QString s[] = { static const QString s[] = {
i18nc("@item filesystem name", "unknown"), xi18nc("@item filesystem name", "unknown"),
i18nc("@item filesystem name", "extended"), xi18nc("@item filesystem name", "extended"),
i18nc("@item filesystem name", "ext2"), xi18nc("@item filesystem name", "ext2"),
i18nc("@item filesystem name", "ext3"), xi18nc("@item filesystem name", "ext3"),
i18nc("@item filesystem name", "ext4"), xi18nc("@item filesystem name", "ext4"),
i18nc("@item filesystem name", "linuxswap"), xi18nc("@item filesystem name", "linuxswap"),
i18nc("@item filesystem name", "fat16"), xi18nc("@item filesystem name", "fat16"),
i18nc("@item filesystem name", "fat32"), xi18nc("@item filesystem name", "fat32"),
i18nc("@item filesystem name", "ntfs"), xi18nc("@item filesystem name", "ntfs"),
i18nc("@item filesystem name", "reiser"), xi18nc("@item filesystem name", "reiser"),
i18nc("@item filesystem name", "reiser4"), xi18nc("@item filesystem name", "reiser4"),
i18nc("@item filesystem name", "xfs"), xi18nc("@item filesystem name", "xfs"),
i18nc("@item filesystem name", "jfs"), xi18nc("@item filesystem name", "jfs"),
i18nc("@item filesystem name", "hfs"), xi18nc("@item filesystem name", "hfs"),
i18nc("@item filesystem name", "hfsplus"), xi18nc("@item filesystem name", "hfsplus"),
i18nc("@item filesystem name", "ufs"), xi18nc("@item filesystem name", "ufs"),
i18nc("@item filesystem name", "unformatted"), xi18nc("@item filesystem name", "unformatted"),
i18nc("@item filesystem name", "btrfs"), xi18nc("@item filesystem name", "btrfs"),
i18nc("@item filesystem name", "hpfs"), xi18nc("@item filesystem name", "hpfs"),
i18nc("@item filesystem name", "luks"), xi18nc("@item filesystem name", "luks"),
i18nc("@item filesystem name", "ocfs2"), xi18nc("@item filesystem name", "ocfs2"),
i18nc("@item filesystem name", "zfs"), xi18nc("@item filesystem name", "zfs"),
i18nc("@item filesystem name", "exfat"), xi18nc("@item filesystem name", "exfat"),
i18nc("@item filesystem name", "nilfs2"), xi18nc("@item filesystem name", "nilfs2"),
i18nc("@item filesystem name", "lvm2 pv"), xi18nc("@item filesystem name", "lvm2 pv"),
i18nc("@item filesystem name", "f2fs"), xi18nc("@item filesystem name", "f2fs"),
}; };
return s; return s;
@ -375,13 +375,13 @@ QList<FileSystem::Type> FileSystem::types()
/** @return printable menu title for mounting this FileSystem */ /** @return printable menu title for mounting this FileSystem */
QString FileSystem::mountTitle() const QString FileSystem::mountTitle() const
{ {
return i18nc("@title:menu", "Mount"); return xi18nc("@title:menu", "Mount");
} }
/** @return printable menu title for unmounting this FileSystem */ /** @return printable menu title for unmounting this FileSystem */
QString FileSystem::unmountTitle() const QString FileSystem::unmountTitle() const
{ {
return i18nc("@title:menu", "Unmount"); return xi18nc("@title:menu", "Unmount");
} }
/** Moves a FileSystem to a new start sector. /** Moves a FileSystem to a new start sector.

View File

@ -156,7 +156,7 @@ bool jfs::resize(Report& report, const QString& deviceNode, qint64) const
{ {
QTemporaryDir tempDir; QTemporaryDir tempDir;
if (!tempDir.isValid()) { if (!tempDir.isValid()) {
report.line() << xi18nc("@info/plain", "Resizing JFS file system on partition <filename>%1</filename> failed: Could not create temp dir.", deviceNode); report.line() << xi18nc("@info:progress", "Resizing JFS file system on partition <filename>%1</filename> failed: Could not create temp dir.", deviceNode);
return false; return false;
} }
@ -170,14 +170,14 @@ bool jfs::resize(Report& report, const QString& deviceNode, qint64) const
if (resizeMountCmd.run(-1)) if (resizeMountCmd.run(-1))
rval = true; rval = true;
else else
report.line() << xi18nc("@info/plain", "Resizing JFS file system on partition <filename>%1</filename> failed: Remount failed.", deviceNode); report.line() << xi18nc("@info:progress", "Resizing JFS file system on partition <filename>%1</filename> failed: Remount failed.", deviceNode);
ExternalCommand unmountCmd(report, QStringLiteral("umount"), { tempDir.path() }); ExternalCommand unmountCmd(report, QStringLiteral("umount"), { tempDir.path() });
if (!unmountCmd.run(-1)) if (!unmountCmd.run(-1))
report.line() << xi18nc("@info/plain", "Warning: Resizing JFS file system on partition <filename>%1</filename>: Unmount failed.", deviceNode); report.line() << xi18nc("@info:progress", "Warning: Resizing JFS file system on partition <filename>%1</filename>: Unmount failed.", deviceNode);
} else } else
report.line() << xi18nc("@info/plain", "Resizing JFS file system on partition <filename>%1</filename> failed: Initial mount failed.", deviceNode); report.line() << xi18nc("@info:progress", "Resizing JFS file system on partition <filename>%1</filename> failed: Initial mount failed.", deviceNode);
return rval; return rval;
} }

View File

@ -125,12 +125,12 @@ bool linuxswap::writeLabel(Report& report, const QString& deviceNode, const QStr
QString linuxswap::mountTitle() const QString linuxswap::mountTitle() const
{ {
return i18nc("@title:menu", "Activate swap"); return xi18nc("@title:menu", "Activate swap");
} }
QString linuxswap::unmountTitle() const QString linuxswap::unmountTitle() const
{ {
return i18nc("@title:menu", "Deactivate swap"); return xi18nc("@title:menu", "Deactivate swap");
} }
bool linuxswap::canMount(const QString& deviceNode, const QString& mountPoint) const { bool linuxswap::canMount(const QString& deviceNode, const QString& mountPoint) const {

View File

@ -140,22 +140,22 @@ bool luks::create(Report& report, const QString& deviceNode) const
QString luks::mountTitle() const QString luks::mountTitle() const
{ {
return i18nc("@title:menu", "Mount"); return xi18nc("@title:menu", "Mount");
} }
QString luks::unmountTitle() const QString luks::unmountTitle() const
{ {
return i18nc("@title:menu", "Unmount"); return xi18nc("@title:menu", "Unmount");
} }
QString luks::cryptOpenTitle() const QString luks::cryptOpenTitle() const
{ {
return i18nc("@title:menu", "Decrypt"); return xi18nc("@title:menu", "Decrypt");
} }
QString luks::cryptCloseTitle() const QString luks::cryptCloseTitle() const
{ {
return i18nc("@title:menu", "Deactivate"); return xi18nc("@title:menu", "Deactivate");
} }
void luks::setPassphrase(const QString& passphrase) void luks::setPassphrase(const QString& passphrase)
@ -477,7 +477,7 @@ bool luks::resize(Report& report, const QString& deviceNode, qint64 newLength) c
if ( newLength - length() * m_logicalSectorSize > 0 ) if ( newLength - length() * m_logicalSectorSize > 0 )
{ {
ExternalCommand cryptResizeCmd(report, QStringLiteral("cryptsetup"), { QStringLiteral("resize"), mapperNode }); ExternalCommand cryptResizeCmd(report, QStringLiteral("cryptsetup"), { QStringLiteral("resize"), mapperNode });
report.line() << xi18nc("@info/plain", "Resizing LUKS crypt on partition <filename>%1</filename>.", deviceNode); report.line() << xi18nc("@info:progress", "Resizing LUKS crypt on partition <filename>%1</filename>.", deviceNode);
if (cryptResizeCmd.run(-1) && cryptResizeCmd.exitCode() == 0) if (cryptResizeCmd.run(-1) && cryptResizeCmd.exitCode() == 0)
{ {
@ -487,13 +487,13 @@ bool luks::resize(Report& report, const QString& deviceNode, qint64 newLength) c
else if (m_innerFs->resize(report, mapperNode, payloadLength)) else if (m_innerFs->resize(report, mapperNode, payloadLength))
{ {
ExternalCommand cryptResizeCmd(report, QStringLiteral("cryptsetup"), { QStringLiteral("--size"), QString::number(payloadLength / m_logicalSectorSize), QStringLiteral("resize"), mapperNode }); ExternalCommand cryptResizeCmd(report, QStringLiteral("cryptsetup"), { QStringLiteral("--size"), QString::number(payloadLength / m_logicalSectorSize), QStringLiteral("resize"), mapperNode });
report.line() << xi18nc("@info/plain", "Resizing LUKS crypt on partition <filename>%1</filename>.", deviceNode); report.line() << xi18nc("@info:progress", "Resizing LUKS crypt on partition <filename>%1</filename>.", deviceNode);
if (cryptResizeCmd.run(-1) && cryptResizeCmd.exitCode() == 0) if (cryptResizeCmd.run(-1) && cryptResizeCmd.exitCode() == 0)
{ {
return true; return true;
} }
} }
report.line() << xi18nc("@info/plain", "Resizing encrypted file system on partition <filename>%1</filename> failed.", deviceNode); report.line() << xi18nc("@info:progress", "Resizing encrypted file system on partition <filename>%1</filename> failed.", deviceNode);
return false; return false;
} }

View File

@ -143,7 +143,7 @@ bool nilfs2::resize(Report& report, const QString& deviceNode, qint64 length) co
{ {
QTemporaryDir tempDir; QTemporaryDir tempDir;
if (!tempDir.isValid()) { if (!tempDir.isValid()) {
report.line() << xi18nc("@info/plain", "Resizing NILFS2 file system on partition <filename>%1</filename> failed: Could not create temp dir.", deviceNode); report.line() << xi18nc("@info:progress", "Resizing NILFS2 file system on partition <filename>%1</filename> failed: Could not create temp dir.", deviceNode);
return false; return false;
} }
@ -157,14 +157,14 @@ bool nilfs2::resize(Report& report, const QString& deviceNode, qint64 length) co
if (resizeCmd.run(-1) && resizeCmd.exitCode() == 0) if (resizeCmd.run(-1) && resizeCmd.exitCode() == 0)
rval = true; rval = true;
else else
report.line() << xi18nc("@info/plain", "Resizing NILFS2 file system on partition <filename>%1</filename> failed: NILFS2 file system resize failed.", deviceNode); report.line() << xi18nc("@info:progress", "Resizing NILFS2 file system on partition <filename>%1</filename> failed: NILFS2 file system resize failed.", deviceNode);
ExternalCommand unmountCmd(report, QStringLiteral("umount"), { tempDir.path() }); ExternalCommand unmountCmd(report, QStringLiteral("umount"), { tempDir.path() });
if (!unmountCmd.run(-1) && unmountCmd.exitCode() == 0) if (!unmountCmd.run(-1) && unmountCmd.exitCode() == 0)
report.line() << xi18nc("@info/plain", "Warning: Resizing NILFS2 file system on partition <filename>%1</filename>: Unmount failed.", deviceNode); report.line() << xi18nc("@info:progress", "Warning: Resizing NILFS2 file system on partition <filename>%1</filename>: Unmount failed.", deviceNode);
} else } else
report.line() << xi18nc("@info/plain", "Resizing NILFS2 file system on partition <filename>%1</filename> failed: Initial mount failed.", deviceNode); report.line() << xi18nc("@info:progress", "Resizing NILFS2 file system on partition <filename>%1</filename> failed: Initial mount failed.", deviceNode);
return rval; return rval;
} }

View File

@ -179,7 +179,7 @@ bool ntfs::updateUUID(Report& report, const QString& deviceNode) const
bool ntfs::updateBootSector(Report& report, const QString& deviceNode) const bool ntfs::updateBootSector(Report& report, const QString& deviceNode) const
{ {
report.line() << xi18nc("@info/plain", "Updating boot sector for NTFS file system on partition <filename>%1</filename>.", deviceNode); report.line() << xi18nc("@info:progress", "Updating boot sector for NTFS file system on partition <filename>%1</filename>.", deviceNode);
quint32 n = firstSector(); quint32 n = firstSector();
char* s = reinterpret_cast<char*>(&n); char* s = reinterpret_cast<char*>(&n);
@ -191,21 +191,21 @@ bool ntfs::updateBootSector(Report& report, const QString& deviceNode) const
QFile device(deviceNode); QFile device(deviceNode);
if (!device.open(QFile::ReadWrite | QFile::Unbuffered)) { if (!device.open(QFile::ReadWrite | QFile::Unbuffered)) {
Log() << xi18nc("@info/plain", "Could not open partition <filename>%1</filename> for writing when trying to update the NTFS boot sector.", deviceNode); Log() << xi18nc("@info:progress", "Could not open partition <filename>%1</filename> for writing when trying to update the NTFS boot sector.", deviceNode);
return false; return false;
} }
if (!device.seek(0x1c)) { if (!device.seek(0x1c)) {
Log() << xi18nc("@info/plain", "Could not seek to position 0x1c on partition <filename>%1</filename> when trying to update the NTFS boot sector.", deviceNode); Log() << xi18nc("@info:progress", "Could not seek to position 0x1c on partition <filename>%1</filename> when trying to update the NTFS boot sector.", deviceNode);
return false; return false;
} }
if (device.write(s, 4) != 4) { if (device.write(s, 4) != 4) {
Log() << xi18nc("@info/plain", "Could not write new start sector to partition <filename>%1</filename> when trying to update the NTFS boot sector.", deviceNode); Log() << xi18nc("@info:progress", "Could not write new start sector to partition <filename>%1</filename> when trying to update the NTFS boot sector.", deviceNode);
return false; return false;
} }
Log() << xi18nc("@info/plain", "Updated NTFS boot sector for partition <filename>%1</filename> successfully.", deviceNode); Log() << xi18nc("@info:progress", "Updated NTFS boot sector for partition <filename>%1</filename> successfully.", deviceNode);
return true; return true;
} }

View File

@ -166,7 +166,7 @@ bool xfs::resize(Report& report, const QString& deviceNode, qint64) const
{ {
QTemporaryDir tempDir; QTemporaryDir tempDir;
if (!tempDir.isValid()) { if (!tempDir.isValid()) {
report.line() << xi18nc("@info/plain", "Resizing XFS file system on partition <filename>%1</filename> failed: Could not create temp dir.", deviceNode); report.line() << xi18nc("@info:progress", "Resizing XFS file system on partition <filename>%1</filename> failed: Could not create temp dir.", deviceNode);
return false; return false;
} }
@ -180,14 +180,14 @@ bool xfs::resize(Report& report, const QString& deviceNode, qint64) const
if (resizeCmd.run(-1)) if (resizeCmd.run(-1))
rval = true; rval = true;
else else
report.line() << xi18nc("@info/plain", "Resizing XFS file system on partition <filename>%1</filename> failed: xfs_growfs failed.", deviceNode); report.line() << xi18nc("@info:progress", "Resizing XFS file system on partition <filename>%1</filename> failed: xfs_growfs failed.", deviceNode);
ExternalCommand unmountCmd(report, QStringLiteral("umount"), { tempDir.path() }); ExternalCommand unmountCmd(report, QStringLiteral("umount"), { tempDir.path() });
if (!unmountCmd.run(-1)) if (!unmountCmd.run(-1))
report.line() << xi18nc("@info/plain", "Warning: Resizing XFS file system on partition <filename>%1</filename>: Unmount failed.", deviceNode); report.line() << xi18nc("@info:progress", "Warning: Resizing XFS file system on partition <filename>%1</filename>: Unmount failed.", deviceNode);
} else } else
report.line() << xi18nc("@info/plain", "Resizing XFS file system on partition <filename>%1</filename> failed: Initial mount failed.", deviceNode); report.line() << xi18nc("@info:progress", "Resizing XFS file system on partition <filename>%1</filename> failed: Initial mount failed.", deviceNode);
return rval; return rval;
} }

View File

@ -60,9 +60,9 @@ bool BackupFileSystemJob::run(Report& parent)
CopyTargetFile copyTarget(fileName(), sourceDevice().logicalSectorSize()); CopyTargetFile copyTarget(fileName(), sourceDevice().logicalSectorSize());
if (!copySource.open()) if (!copySource.open())
report->line() << xi18nc("@info/plain", "Could not open file system on source partition <filename>%1</filename> for backup.", sourcePartition().deviceNode()); report->line() << xi18nc("@info:progress", "Could not open file system on source partition <filename>%1</filename> for backup.", sourcePartition().deviceNode());
else if (!copyTarget.open()) else if (!copyTarget.open())
report->line() << xi18nc("@info/plain", "Could not create backup file <filename>%1</filename>.", fileName()); report->line() << xi18nc("@info:progress", "Could not create backup file <filename>%1</filename>.", fileName());
else else
rval = copyBlocks(*report, copyTarget, copySource); rval = copyBlocks(*report, copyTarget, copySource);
} }
@ -74,5 +74,5 @@ bool BackupFileSystemJob::run(Report& parent)
QString BackupFileSystemJob::description() const QString BackupFileSystemJob::description() const
{ {
return xi18nc("@info/plain", "Back up file system on partition <filename>%1</filename> to <filename>%2</filename>", sourcePartition().deviceNode(), fileName()); return xi18nc("@info:progress", "Back up file system on partition <filename>%1</filename> to <filename>%2</filename>", sourcePartition().deviceNode(), fileName());
} }

View File

@ -52,5 +52,5 @@ bool CheckFileSystemJob::run(Report& parent)
QString CheckFileSystemJob::description() const QString CheckFileSystemJob::description() const
{ {
return xi18nc("@info/plain", "Check file system on partition <filename>%1</filename>", partition().deviceNode()); return xi18nc("@info:progress", "Check file system on partition <filename>%1</filename>", partition().deviceNode());
} }

View File

@ -56,7 +56,7 @@ bool CopyFileSystemJob::run(Report& parent)
Report* report = jobStarted(parent); Report* report = jobStarted(parent);
if (targetPartition().fileSystem().length() < sourcePartition().fileSystem().length()) if (targetPartition().fileSystem().length() < sourcePartition().fileSystem().length())
report->line() << xi18nc("@info/plain", "Cannot copy file system: File system on target partition <filename>%1</filename> is smaller than the file system on source partition <filename>%2</filename>.", targetPartition().deviceNode(), sourcePartition().deviceNode()); report->line() << xi18nc("@info:progress", "Cannot copy file system: File system on target partition <filename>%1</filename> is smaller than the file system on source partition <filename>%2</filename>.", targetPartition().deviceNode(), sourcePartition().deviceNode());
else if (sourcePartition().fileSystem().supportCopy() == FileSystem::cmdSupportFileSystem) else if (sourcePartition().fileSystem().supportCopy() == FileSystem::cmdSupportFileSystem)
rval = sourcePartition().fileSystem().copy(*report, targetPartition().deviceNode(), sourcePartition().deviceNode()); rval = sourcePartition().fileSystem().copy(*report, targetPartition().deviceNode(), sourcePartition().deviceNode());
else if (sourcePartition().fileSystem().supportCopy() == FileSystem::cmdSupportCore) { else if (sourcePartition().fileSystem().supportCopy() == FileSystem::cmdSupportCore) {
@ -64,12 +64,12 @@ bool CopyFileSystemJob::run(Report& parent)
CopyTargetDevice copyTarget(targetDevice(), targetPartition().fileSystem().firstSector(), targetPartition().fileSystem().lastSector()); CopyTargetDevice copyTarget(targetDevice(), targetPartition().fileSystem().firstSector(), targetPartition().fileSystem().lastSector());
if (!copySource.open()) if (!copySource.open())
report->line() << xi18nc("@info/plain", "Could not open file system on source partition <filename>%1</filename> for copying.", sourcePartition().deviceNode()); report->line() << xi18nc("@info:progress", "Could not open file system on source partition <filename>%1</filename> for copying.", sourcePartition().deviceNode());
else if (!copyTarget.open()) else if (!copyTarget.open())
report->line() << xi18nc("@info/plain", "Could not open file system on target partition <filename>%1</filename> for copying.", targetPartition().deviceNode()); report->line() << xi18nc("@info:progress", "Could not open file system on target partition <filename>%1</filename> for copying.", targetPartition().deviceNode());
else { else {
rval = copyBlocks(*report, copyTarget, copySource); rval = copyBlocks(*report, copyTarget, copySource);
report->line() << i18nc("@info/plain", "Closing device. This may take a while, especially on slow devices like Memory Sticks."); report->line() << xi18nc("@info:progress", "Closing device. This may take a while, especially on slow devices like Memory Sticks.");
} }
} }
@ -96,5 +96,5 @@ bool CopyFileSystemJob::run(Report& parent)
QString CopyFileSystemJob::description() const QString CopyFileSystemJob::description() const
{ {
return xi18nc("@info/plain", "Copy file system on partition <filename>%1</filename> to partition <filename>%2</filename>", sourcePartition().deviceNode(), targetPartition().deviceNode()); return xi18nc("@info:progress", "Copy file system on partition <filename>%1</filename> to partition <filename>%2</filename>", sourcePartition().deviceNode(), targetPartition().deviceNode());
} }

View File

@ -63,15 +63,15 @@ bool CreateFileSystemJob::run(Report& parent)
rval = true; rval = true;
backendPartitionTable->commit(); backendPartitionTable->commit();
} else } else
report->line() << xi18nc("@info/plain", "Failed to set the system type for the file system on partition <filename>%1</filename>.", partition().deviceNode()); report->line() << xi18nc("@info:progress", "Failed to set the system type for the file system on partition <filename>%1</filename>.", partition().deviceNode());
delete backendPartitionTable; delete backendPartitionTable;
} else } else
report->line() << xi18nc("@info/plain", "Could not open partition table on device <filename>%1</filename> to set the system type for partition <filename>%2</filename>.", device().deviceNode(), partition().deviceNode()); report->line() << xi18nc("@info:progress", "Could not open partition table on device <filename>%1</filename> to set the system type for partition <filename>%2</filename>.", device().deviceNode(), partition().deviceNode());
delete backendDevice; delete backendDevice;
} else } else
report->line() << xi18nc("@info/plain", "Could not open device <filename>%1</filename> to set the system type for partition <filename>%2</filename>.", device().deviceNode(), partition().deviceNode()); report->line() << xi18nc("@info:progress", "Could not open device <filename>%1</filename> to set the system type for partition <filename>%2</filename>.", device().deviceNode(), partition().deviceNode());
} }
} }
@ -82,5 +82,5 @@ bool CreateFileSystemJob::run(Report& parent)
QString CreateFileSystemJob::description() const QString CreateFileSystemJob::description() const
{ {
return xi18nc("@info/plain", "Create file system <filename>%1</filename> on partition <filename>%2</filename>", partition().fileSystem().name(), partition().deviceNode()); return xi18nc("@info:progress", "Create file system <filename>%1</filename> on partition <filename>%2</filename>", partition().fileSystem().name(), partition().deviceNode());
} }

View File

@ -63,15 +63,15 @@ bool CreatePartitionJob::run(Report& parent)
partition().setState(Partition::StateNone); partition().setState(Partition::StateNone);
backendPartitionTable->commit(); backendPartitionTable->commit();
} else } else
report->line() << xi18nc("@info/plain", "Failed to add partition <filename>%1</filename> to device <filename>%2</filename>.", partition().deviceNode(), device().deviceNode()); report->line() << xi18nc("@info:progress", "Failed to add partition <filename>%1</filename> to device <filename>%2</filename>.", partition().deviceNode(), device().deviceNode());
delete backendPartitionTable; delete backendPartitionTable;
} else } else
report->line() << xi18nc("@info/plain", "Could not open partition table on device <filename>%1</filename> to create new partition <filename>%2</filename>.", device().deviceNode(), partition().deviceNode()); report->line() << xi18nc("@info:progress", "Could not open partition table on device <filename>%1</filename> to create new partition <filename>%2</filename>.", device().deviceNode(), partition().deviceNode());
delete backendDevice; delete backendDevice;
} else } else
report->line() << xi18nc("@info/plain", "Could not open device <filename>%1</filename> to create new partition <filename>%2</filename>.", device().deviceNode(), partition().deviceNode()); report->line() << xi18nc("@info:progress", "Could not open device <filename>%1</filename> to create new partition <filename>%2</filename>.", device().deviceNode(), partition().deviceNode());
jobFinished(*report, rval); jobFinished(*report, rval);
@ -81,7 +81,7 @@ bool CreatePartitionJob::run(Report& parent)
QString CreatePartitionJob::description() const QString CreatePartitionJob::description() const
{ {
if (partition().number() > 0) if (partition().number() > 0)
return xi18nc("@info/plain", "Create new partition <filename>%1</filename>", partition().deviceNode()); return xi18nc("@info:progress", "Create new partition <filename>%1</filename>", partition().deviceNode());
return xi18nc("@info/plain", "Create new partition on device <filename>%1</filename>", device().deviceNode()); return xi18nc("@info:progress", "Create new partition on device <filename>%1</filename>", device().deviceNode());
} }

View File

@ -53,7 +53,7 @@ bool CreatePartitionTableJob::run(Report& parent)
delete backendDevice; delete backendDevice;
} else } else
report->line() << xi18nc("@info/plain", "Creating partition table failed: Could not open device <filename>%1</filename>.", device().deviceNode()); report->line() << xi18nc("@info:progress", "Creating partition table failed: Could not open device <filename>%1</filename>.", device().deviceNode());
jobFinished(*report, rval); jobFinished(*report, rval);
@ -62,5 +62,5 @@ bool CreatePartitionTableJob::run(Report& parent)
QString CreatePartitionTableJob::description() const QString CreatePartitionTableJob::description() const
{ {
return xi18nc("@info/plain", "Create new partition table on device <filename>%1</filename>", device().deviceNode()); return xi18nc("@info:progress", "Create new partition table on device <filename>%1</filename>", device().deviceNode());
} }

View File

@ -58,7 +58,7 @@ bool DeleteFileSystemJob::run(Report& parent)
Report* report = jobStarted(parent); Report* report = jobStarted(parent);
if (isMounted(partition().partitionPath())) { if (isMounted(partition().partitionPath())) {
report->line() << xi18nc("@info/plain", "Could not delete file system: file system on <filename>%1</filename> is mounted.", partition().deviceNode()); report->line() << xi18nc("@info:progress", "Could not delete file system: file system on <filename>%1</filename> is mounted.", partition().deviceNode());
jobFinished(*report, rval); jobFinished(*report, rval);
return false; return false;
} }
@ -80,18 +80,18 @@ bool DeleteFileSystemJob::run(Report& parent)
rval = backendPartitionTable->clobberFileSystem(*report, partition()); rval = backendPartitionTable->clobberFileSystem(*report, partition());
if (!rval) if (!rval)
report->line() << xi18nc("@info/plain", "Could not delete file system on <filename>%1</filename>.", partition().deviceNode()); report->line() << xi18nc("@info:progress", "Could not delete file system on <filename>%1</filename>.", partition().deviceNode());
else else
backendPartitionTable->commit(); backendPartitionTable->commit();
delete backendPartitionTable; delete backendPartitionTable;
} else } else
report->line() << xi18nc("@info/plain", "Could not open partition table on device <filename>%1</filename> to delete file system on <filename>%2</filename>.", device().deviceNode(), partition().deviceNode()); report->line() << xi18nc("@info:progress", "Could not open partition table on device <filename>%1</filename> to delete file system on <filename>%2</filename>.", device().deviceNode(), partition().deviceNode());
delete backendDevice; delete backendDevice;
} else } else
report->line() << xi18nc("@info/plain", "Could not delete file system signature for partition <filename>%1</filename>: Failed to open device <filename>%2</filename>.", partition().deviceNode(), device().deviceNode()); report->line() << xi18nc("@info:progress", "Could not delete file system signature for partition <filename>%1</filename>: Failed to open device <filename>%2</filename>.", partition().deviceNode(), device().deviceNode());
} }
jobFinished(*report, rval); jobFinished(*report, rval);
@ -101,5 +101,5 @@ bool DeleteFileSystemJob::run(Report& parent)
QString DeleteFileSystemJob::description() const QString DeleteFileSystemJob::description() const
{ {
return xi18nc("@info/plain", "Delete file system on <filename>%1</filename>", partition().deviceNode()); return xi18nc("@info:progress", "Delete file system on <filename>%1</filename>", partition().deviceNode());
} }

View File

@ -65,18 +65,18 @@ bool DeletePartitionJob::run(Report& parent)
rval = backendPartitionTable->deletePartition(*report, partition()); rval = backendPartitionTable->deletePartition(*report, partition());
if (!rval) if (!rval)
report->line() << xi18nc("@info/plain", "Could not delete partition <filename>%1</filename>.", partition().deviceNode()); report->line() << xi18nc("@info:progress", "Could not delete partition <filename>%1</filename>.", partition().deviceNode());
else else
backendPartitionTable->commit(); backendPartitionTable->commit();
delete backendPartitionTable; delete backendPartitionTable;
} else } else
report->line() << xi18nc("@info/plain", "Could not open partition table on device <filename>%1</filename> to delete partition <filename>%2</filename>.", device().deviceNode(), partition().deviceNode()); report->line() << xi18nc("@info:progress", "Could not open partition table on device <filename>%1</filename> to delete partition <filename>%2</filename>.", device().deviceNode(), partition().deviceNode());
delete backendDevice; delete backendDevice;
} else } else
report->line() << xi18nc("@info/plain", "Deleting partition failed: Could not open device <filename>%1</filename>.", device().deviceNode()); report->line() << xi18nc("@info:progress", "Deleting partition failed: Could not open device <filename>%1</filename>.", device().deviceNode());
jobFinished(*report, rval); jobFinished(*report, rval);
@ -85,5 +85,5 @@ bool DeletePartitionJob::run(Report& parent)
QString DeletePartitionJob::description() const QString DeletePartitionJob::description() const
{ {
return xi18nc("@info/plain", "Delete the partition <filename>%1</filename>", partition().deviceNode()); return xi18nc("@info:progress", "Delete the partition <filename>%1</filename>", partition().deviceNode());
} }

View File

@ -43,7 +43,7 @@ bool Job::copyBlocks(Report& report, CopyTarget& target, CopySource& source)
/** @todo copyBlocks() assumes that source.sectorSize() == target.sectorSize(). */ /** @todo copyBlocks() assumes that source.sectorSize() == target.sectorSize(). */
if (source.sectorSize() != target.sectorSize()) { if (source.sectorSize() != target.sectorSize()) {
report.line() << i18nc("@info/plain", "The logical sector sizes in the source and target for copying are not the same. This is currently unsupported."); report.line() << xi18nc("@info:progress", "The logical sector sizes in the source and target for copying are not the same. This is currently unsupported.");
return false; return false;
} }
@ -61,7 +61,7 @@ bool Job::copyBlocks(Report& report, CopyTarget& target, CopySource& source)
copyDir = -1; copyDir = -1;
} }
report.line() << i18nc("@info/plain", "Copying %1 blocks (%2 sectors) from %3 to %4, direction: %5.", blocksToCopy, source.length(), readOffset, writeOffset, copyDir); report.line() << xi18nc("@info:progress", "Copying %1 blocks (%2 sectors) from %3 to %4, direction: %5.", blocksToCopy, source.length(), readOffset, writeOffset, copyDir);
qint64 blocksCopied = 0; qint64 blocksCopied = 0;
@ -83,7 +83,7 @@ bool Job::copyBlocks(Report& report, CopyTarget& target, CopySource& source)
if (percent % 5 == 0 && t.elapsed() > 1000) { if (percent % 5 == 0 && t.elapsed() > 1000) {
const qint64 mibsPerSec = (blocksCopied * blockSize * source.sectorSize() / 1024 / 1024) / (t.elapsed() / 1000); const qint64 mibsPerSec = (blocksCopied * blockSize * source.sectorSize() / 1024 / 1024) / (t.elapsed() / 1000);
const qint64 estSecsLeft = (100 - percent) * t.elapsed() / percent / 1000; const qint64 estSecsLeft = (100 - percent) * t.elapsed() / percent / 1000;
report.line() << i18nc("@info/plain", "Copying %1 MiB/second, estimated time left: %2", mibsPerSec, QTime(0, 0).addSecs(estSecsLeft).toString()); report.line() << xi18nc("@info:progress", "Copying %1 MiB/second, estimated time left: %2", mibsPerSec, QTime(0, 0).addSecs(estSecsLeft).toString());
} }
emit progress(percent); emit progress(percent);
} }
@ -98,7 +98,7 @@ bool Job::copyBlocks(Report& report, CopyTarget& target, CopySource& source)
const qint64 lastBlockReadOffset = copyDir > 0 ? readOffset + blockSize * blocksCopied : source.firstSector(); const qint64 lastBlockReadOffset = copyDir > 0 ? readOffset + blockSize * blocksCopied : source.firstSector();
const qint64 lastBlockWriteOffset = copyDir > 0 ? writeOffset + blockSize * blocksCopied : target.firstSector(); const qint64 lastBlockWriteOffset = copyDir > 0 ? writeOffset + blockSize * blocksCopied : target.firstSector();
report.line() << i18nc("@info/plain", "Copying remainder of block size %1 from %2 to %3.", lastBlock, lastBlockReadOffset, lastBlockWriteOffset); report.line() << xi18nc("@info:progress", "Copying remainder of block size %1 from %2 to %3.", lastBlock, lastBlockReadOffset, lastBlockWriteOffset);
rval = source.readSectors(buffer, lastBlockReadOffset, lastBlock); rval = source.readSectors(buffer, lastBlockReadOffset, lastBlock);
@ -111,7 +111,7 @@ bool Job::copyBlocks(Report& report, CopyTarget& target, CopySource& source)
free(buffer); free(buffer);
report.line() << i18ncp("@info/plain argument 2 is a string such as 7 sectors (localized accordingly)", "Copying 1 block (%2) finished.", "Copying %1 blocks (%2) finished.", blocksCopied, i18np("1 sector", "%1 sectors", target.sectorsWritten())); report.line() << xi18ncp("@info:progress argument 2 is a string such as 7 sectors (localized accordingly)", "Copying 1 block (%2) finished.", "Copying %1 blocks (%2) finished.", blocksCopied, i18np("1 sector", "%1 sectors", target.sectorsWritten()));
return rval; return rval;
} }
@ -119,7 +119,7 @@ bool Job::copyBlocks(Report& report, CopyTarget& target, CopySource& source)
bool Job::rollbackCopyBlocks(Report& report, CopyTarget& origTarget, CopySource& origSource) bool Job::rollbackCopyBlocks(Report& report, CopyTarget& origTarget, CopySource& origSource)
{ {
if (!origSource.overlaps(origTarget)) { if (!origSource.overlaps(origTarget)) {
report.line() << i18nc("@info/plain", "Source and target for copying do not overlap: Rollback is not required."); report.line() << xi18nc("@info:progress", "Source and target for copying do not overlap: Rollback is not required.");
return true; return true;
} }
@ -143,24 +143,24 @@ bool Job::rollbackCopyBlocks(Report& report, CopyTarget& origTarget, CopySource&
undoTargetLastSector = origSource.lastSector(); undoTargetLastSector = origSource.lastSector();
} }
report.line() << i18nc("@info/plain", "Rollback from: First sector: %1, last sector: %2.", undoSourceFirstSector, undoSourceLastSector); report.line() << xi18nc("@info:progress", "Rollback from: First sector: %1, last sector: %2.", undoSourceFirstSector, undoSourceLastSector);
report.line() << i18nc("@info/plain", "Rollback to: First sector: %1, last sector: %2.", undoTargetFirstSector, undoTargetLastSector); report.line() << xi18nc("@info:progress", "Rollback to: First sector: %1, last sector: %2.", undoTargetFirstSector, undoTargetLastSector);
CopySourceDevice undoSource(ctd.device(), undoSourceFirstSector, undoSourceLastSector); CopySourceDevice undoSource(ctd.device(), undoSourceFirstSector, undoSourceLastSector);
if (!undoSource.open()) { if (!undoSource.open()) {
report.line() << xi18nc("@info/plain", "Could not open device <filename>%1</filename> to rollback copying.", ctd.device().deviceNode()); report.line() << xi18nc("@info:progress", "Could not open device <filename>%1</filename> to rollback copying.", ctd.device().deviceNode());
return false; return false;
} }
CopyTargetDevice undoTarget(csd.device(), undoTargetFirstSector, undoTargetLastSector); CopyTargetDevice undoTarget(csd.device(), undoTargetFirstSector, undoTargetLastSector);
if (!undoTarget.open()) { if (!undoTarget.open()) {
report.line() << xi18nc("@info/plain", "Could not open device <filename>%1</filename> to rollback copying.", csd.device().deviceNode()); report.line() << xi18nc("@info:progress", "Could not open device <filename>%1</filename> to rollback copying.", csd.device().deviceNode());
return false; return false;
} }
return copyBlocks(report, undoTarget, undoSource); return copyBlocks(report, undoTarget, undoSource);
} catch (...) { } catch (...) {
report.line() << i18nc("@info/plain", "Rollback failed: Source or target are not devices."); report.line() << xi18nc("@info:progress", "Rollback failed: Source or target are not devices.");
} }
return false; return false;
@ -175,7 +175,7 @@ Report* Job::jobStarted(Report& parent)
{ {
emit started(); emit started();
return parent.newChild(i18nc("@info/plain", "Job: %1", description())); return parent.newChild(xi18nc("@info:progress", "Job: %1", description()));
} }
void Job::jobFinished(Report& report, bool b) void Job::jobFinished(Report& report, bool b)
@ -184,7 +184,7 @@ void Job::jobFinished(Report& report, bool b)
emit progress(numSteps()); emit progress(numSteps());
emit finished(); emit finished();
report.setStatus(i18nc("@info/plain job status (error, warning, ...)", "%1: %2", description(), statusText())); report.setStatus(xi18nc("@info:progress job status (error, warning, ...)", "%1: %2", description(), statusText()));
} }
/** @return the Job's current status icon */ /** @return the Job's current status icon */
@ -208,9 +208,9 @@ QIcon Job::statusIcon() const
QString Job::statusText() const QString Job::statusText() const
{ {
static const QString s[] = { static const QString s[] = {
i18nc("@info:progress job", "Pending"), xi18nc("@info:progress job", "Pending"),
i18nc("@info:progress job", "Success"), xi18nc("@info:progress job", "Success"),
i18nc("@info:progress job", "Error") xi18nc("@info:progress job", "Error")
}; };
Q_ASSERT(status() >= 0 && static_cast<quint32>(status()) < sizeof(s) / sizeof(s[0])); Q_ASSERT(status() >= 0 && static_cast<quint32>(status()) < sizeof(s) / sizeof(s[0]));

View File

@ -59,9 +59,9 @@ bool MoveFileSystemJob::run(Report& parent)
CopyTargetDevice moveTarget(device(), newStart(), newStart() + partition().fileSystem().length()); CopyTargetDevice moveTarget(device(), newStart(), newStart() + partition().fileSystem().length());
if (!moveSource.open()) if (!moveSource.open())
report->line() << xi18nc("@info/plain", "Could not open file system on partition <filename>%1</filename> for moving.", partition().deviceNode()); report->line() << xi18nc("@info:progress", "Could not open file system on partition <filename>%1</filename> for moving.", partition().deviceNode());
else if (!moveTarget.open()) else if (!moveTarget.open())
report->line() << xi18nc("@info/plain", "Could not create target for moving file system on partition <filename>%1</filename>.", partition().deviceNode()); report->line() << xi18nc("@info:progress", "Could not create target for moving file system on partition <filename>%1</filename>.", partition().deviceNode());
else { else {
rval = copyBlocks(*report, moveTarget, moveSource); rval = copyBlocks(*report, moveTarget, moveSource);
@ -70,9 +70,9 @@ bool MoveFileSystemJob::run(Report& parent)
partition().fileSystem().setFirstSector(newStart()); partition().fileSystem().setFirstSector(newStart());
partition().fileSystem().setLastSector(newStart() + savedLength); partition().fileSystem().setLastSector(newStart() + savedLength);
} else if (!rollbackCopyBlocks(*report, moveTarget, moveSource)) } else if (!rollbackCopyBlocks(*report, moveTarget, moveSource))
report->line() << xi18nc("@info/plain", "Rollback for file system on partition <filename>%1</filename> failed.", partition().deviceNode()); report->line() << xi18nc("@info:progress", "Rollback for file system on partition <filename>%1</filename> failed.", partition().deviceNode());
report->line() << i18nc("@info/plain", "Closing device. This may take a few seconds."); report->line() << xi18nc("@info:progress", "Closing device. This may take a few seconds.");
} }
} }
@ -86,5 +86,5 @@ bool MoveFileSystemJob::run(Report& parent)
QString MoveFileSystemJob::description() const QString MoveFileSystemJob::description() const
{ {
return xi18nc("@info/plain", "Move the file system on partition <filename>%1</filename> to sector %2", partition().deviceNode(), newStart()); return xi18nc("@info:progress", "Move the file system on partition <filename>%1</filename> to sector %2", partition().deviceNode(), newStart());
} }

View File

@ -70,17 +70,17 @@ bool ResizeFileSystemJob::run(Report& parent)
Report* report = jobStarted(parent); Report* report = jobStarted(parent);
if (partition().fileSystem().length() == newLength()) { if (partition().fileSystem().length() == newLength()) {
report->line() << xi18ncp("@info/plain", "The file system on partition <filename>%2</filename> already has the requested length of 1 sector.", "The file system on partition <filename>%2</filename> already has the requested length of %1 sectors.", newLength(), partition().deviceNode()); report->line() << xi18ncp("@info:progress", "The file system on partition <filename>%2</filename> already has the requested length of 1 sector.", "The file system on partition <filename>%2</filename> already has the requested length of %1 sectors.", newLength(), partition().deviceNode());
rval = true; rval = true;
} else { } else {
report->line() << i18nc("@info/plain", "Resizing file system from %1 to %2 sectors.", partition().fileSystem().length(), newLength()); report->line() << i18nc("@info:progress", "Resizing file system from %1 to %2 sectors.", partition().fileSystem().length(), newLength());
FileSystem::CommandSupportType support = (newLength() < partition().fileSystem().length()) ? partition().fileSystem().supportShrink() : partition().fileSystem().supportGrow(); FileSystem::CommandSupportType support = (newLength() < partition().fileSystem().length()) ? partition().fileSystem().supportShrink() : partition().fileSystem().supportGrow();
switch (support) { switch (support) {
case FileSystem::cmdSupportBackend: { case FileSystem::cmdSupportBackend: {
Report* childReport = report->newChild(); Report* childReport = report->newChild();
childReport->line() << i18nc("@info/plain", "Resizing a %1 file system using internal backend functions.", partition().fileSystem().name()); childReport->line() << xi18nc("@info:progress", "Resizing a %1 file system using internal backend functions.", partition().fileSystem().name());
rval = resizeFileSystemBackend(*childReport); rval = resizeFileSystemBackend(*childReport);
break; break;
} }
@ -92,7 +92,7 @@ bool ResizeFileSystemJob::run(Report& parent)
} }
default: default:
report->line() << xi18nc("@info/plain", "The file system on partition <filename>%1</filename> cannot be resized because there is no support for it.", partition().deviceNode()); report->line() << xi18nc("@info:progress", "The file system on partition <filename>%1</filename> cannot be resized because there is no support for it.", partition().deviceNode());
break; break;
} }
@ -120,17 +120,17 @@ bool ResizeFileSystemJob::resizeFileSystemBackend(Report& report)
disconnect(CoreBackendManager::self()->backend(), &CoreBackend::progress, this, &ResizeFileSystemJob::progress); disconnect(CoreBackendManager::self()->backend(), &CoreBackend::progress, this, &ResizeFileSystemJob::progress);
if (rval) { if (rval) {
report.line() << i18nc("@info/plain", "Successfully resized file system using internal backend functions."); report.line() << xi18nc("@info:progress", "Successfully resized file system using internal backend functions.");
backendPartitionTable->commit(); backendPartitionTable->commit();
} }
delete backendPartitionTable; delete backendPartitionTable;
} else } else
report.line() << xi18nc("@info/plain", "Could not open partition <filename>%1</filename> while trying to resize the file system.", partition().deviceNode()); report.line() << xi18nc("@info:progress", "Could not open partition <filename>%1</filename> while trying to resize the file system.", partition().deviceNode());
delete backendDevice; delete backendDevice;
} else } else
report.line() << xi18nc("@info/plain", "Could not read geometry for partition <filename>%1</filename> while trying to resize the file system.", partition().deviceNode()); report.line() << xi18nc("@info:progress", "Could not read geometry for partition <filename>%1</filename> while trying to resize the file system.", partition().deviceNode());
return rval; return rval;
} }
@ -138,7 +138,7 @@ bool ResizeFileSystemJob::resizeFileSystemBackend(Report& report)
QString ResizeFileSystemJob::description() const QString ResizeFileSystemJob::description() const
{ {
if (isMaximizing()) if (isMaximizing())
return xi18nc("@info/plain", "Maximize file system on <filename>%1</filename> to fill the partition", partition().deviceNode()); return xi18nc("@info:progress", "Maximize file system on <filename>%1</filename> to fill the partition", partition().deviceNode());
return xi18ncp("@info/plain", "Resize file system on partition <filename>%2</filename> to 1 sector", "Resize file system on partition <filename>%2</filename> to %1 sectors", newLength(), partition().deviceNode()); return xi18ncp("@info:progress", "Resize file system on partition <filename>%2</filename> to 1 sector", "Resize file system on partition <filename>%2</filename> to %1 sectors", newLength(), partition().deviceNode());
} }

View File

@ -70,9 +70,9 @@ bool RestoreFileSystemJob::run(Report& parent)
CopySourceFile copySource(fileName(), copyTarget.sectorSize()); CopySourceFile copySource(fileName(), copyTarget.sectorSize());
if (!copySource.open()) if (!copySource.open())
report->line() << xi18nc("@info/plain", "Could not open backup file <filename>%1</filename> to restore from.", fileName()); report->line() << xi18nc("@info:progress", "Could not open backup file <filename>%1</filename> to restore from.", fileName());
else if (!copyTarget.open()) else if (!copyTarget.open())
report->line() << xi18nc("@info/plain", "Could not open target partition <filename>%1</filename> to restore to.", targetPartition().deviceNode()); report->line() << xi18nc("@info:progress", "Could not open target partition <filename>%1</filename> to restore to.", targetPartition().deviceNode());
else { else {
rval = copyBlocks(*report, copyTarget, copySource); rval = copyBlocks(*report, copyTarget, copySource);
@ -97,7 +97,7 @@ bool RestoreFileSystemJob::run(Report& parent)
targetPartition().setFileSystem(fs); targetPartition().setFileSystem(fs);
} }
report->line() << i18nc("@info/plain", "Closing device. This may take a few seconds."); report->line() << xi18nc("@info:progress", "Closing device. This may take a few seconds.");
} }
} }
@ -108,5 +108,5 @@ bool RestoreFileSystemJob::run(Report& parent)
QString RestoreFileSystemJob::description() const QString RestoreFileSystemJob::description() const
{ {
return xi18nc("@info/plain", "Restore the file system from file <filename>%1</filename> to partition <filename>%2</filename>", fileName(), targetPartition().deviceNode()); return xi18nc("@info:progress", "Restore the file system from file <filename>%1</filename> to partition <filename>%2</filename>", fileName(), targetPartition().deviceNode());
} }

View File

@ -47,7 +47,7 @@ bool SetFileSystemLabelJob::run(Report& parent)
// just ignore the request and say all is well. This helps in operations because // just ignore the request and say all is well. This helps in operations because
// we don't have to check for support to avoid having a failed job. // we don't have to check for support to avoid having a failed job.
if (partition().fileSystem().supportSetLabel() == FileSystem::cmdSupportNone) if (partition().fileSystem().supportSetLabel() == FileSystem::cmdSupportNone)
report->line() << xi18nc("@info/plain", "File system on partition <filename>%1</filename> does not support setting labels. Job ignored.", partition().deviceNode()); report->line() << xi18nc("@info:progress", "File system on partition <filename>%1</filename> does not support setting labels. Job ignored.", partition().deviceNode());
else if (partition().fileSystem().supportSetLabel() == FileSystem::cmdSupportFileSystem) { else if (partition().fileSystem().supportSetLabel() == FileSystem::cmdSupportFileSystem) {
rval = partition().fileSystem().writeLabel(*report, partition().deviceNode(), label()); rval = partition().fileSystem().writeLabel(*report, partition().deviceNode(), label());
@ -62,5 +62,5 @@ bool SetFileSystemLabelJob::run(Report& parent)
QString SetFileSystemLabelJob::description() const QString SetFileSystemLabelJob::description() const
{ {
return xi18nc("@info/plain", "Set the file system label on partition <filename>%1</filename> to \"%2\"", partition().deviceNode(), label()); return xi18nc("@info:progress", "Set the file system label on partition <filename>%1</filename> to \"%2\"", partition().deviceNode(), label());
} }

View File

@ -76,7 +76,7 @@ bool SetPartFlagsJob::run(Report& parent)
const bool state = (flags() & f) ? true : false; const bool state = (flags() & f) ? true : false;
if (!backendPartition->setFlag(*report, f, state)) { if (!backendPartition->setFlag(*report, f, state)) {
report->line() << xi18nc("@info/plain", "There was an error setting flag %1 for partition <filename>%2</filename> to state %3.", PartitionTable::flagName(f), partition().deviceNode(), state ? i18nc("@info/plain flag turned on, active", "on") : i18nc("@info/plain flag turned off, inactive", "off")); report->line() << xi18nc("@info:progress", "There was an error setting flag %1 for partition <filename>%2</filename> to state %3.", PartitionTable::flagName(f), partition().deviceNode(), state ? xi18nc("@info:progress flag turned on, active", "on") : xi18nc("@info:progress flag turned off, inactive", "off"));
rval = false; rval = false;
} }
@ -84,18 +84,18 @@ bool SetPartFlagsJob::run(Report& parent)
delete backendPartition; delete backendPartition;
} else } else
report->line() << xi18nc("@info/plain", "Could not find partition <filename>%1</filename> on device <filename>%2</filename> to set partition flags.", partition().deviceNode(), device().deviceNode()); report->line() << xi18nc("@info:progress", "Could not find partition <filename>%1</filename> on device <filename>%2</filename> to set partition flags.", partition().deviceNode(), device().deviceNode());
if (rval) if (rval)
backendPartitionTable->commit(); backendPartitionTable->commit();
delete backendPartitionTable; delete backendPartitionTable;
} else } else
report->line() << xi18nc("@info/plain", "Could not open partition table on device <filename>%1</filename> to set partition flags for partition <filename>%2</filename>.", device().deviceNode(), partition().deviceNode()); report->line() << xi18nc("@info:progress", "Could not open partition table on device <filename>%1</filename> to set partition flags for partition <filename>%2</filename>.", device().deviceNode(), partition().deviceNode());
delete backendDevice; delete backendDevice;
} else } else
report->line() << xi18nc("@info/plain", "Could not open device <filename>%1</filename> to set partition flags for partition <filename>%2</filename>.", device().deviceNode(), partition().deviceNode()); report->line() << xi18nc("@info:progress", "Could not open device <filename>%1</filename> to set partition flags for partition <filename>%2</filename>.", device().deviceNode(), partition().deviceNode());
if (rval) if (rval)
partition().setFlags(flags()); partition().setFlags(flags());
@ -108,7 +108,7 @@ bool SetPartFlagsJob::run(Report& parent)
QString SetPartFlagsJob::description() const QString SetPartFlagsJob::description() const
{ {
if (PartitionTable::flagNames(flags()).size() == 0) if (PartitionTable::flagNames(flags()).size() == 0)
return xi18nc("@info/plain", "Clear flags for partition <filename>%1</filename>", partition().deviceNode()); return xi18nc("@info:progress", "Clear flags for partition <filename>%1</filename>", partition().deviceNode());
return xi18nc("@info/plain", "Set the flags for partition <filename>%1</filename> to \"%2\"", partition().deviceNode(), PartitionTable::flagNames(flags()).join(QStringLiteral(","))); return xi18nc("@info:progress", "Set the flags for partition <filename>%1</filename> to \"%2\"", partition().deviceNode(), PartitionTable::flagNames(flags()).join(QStringLiteral(",")));
} }

View File

@ -73,7 +73,7 @@ bool SetPartGeometryJob::run(Report& parent)
delete backendDevice; delete backendDevice;
} else } else
report->line() << xi18nc("@info/plain", "Could not open device <filename>%1</filename> while trying to resize/move partition <filename>%2</filename>.", device().deviceNode(), partition().deviceNode()); report->line() << xi18nc("@info:progress", "Could not open device <filename>%1</filename> while trying to resize/move partition <filename>%2</filename>.", device().deviceNode(), partition().deviceNode());
jobFinished(*report, rval); jobFinished(*report, rval);
@ -82,5 +82,5 @@ bool SetPartGeometryJob::run(Report& parent)
QString SetPartGeometryJob::description() const QString SetPartGeometryJob::description() const
{ {
return xi18nc("@info/plain", "Set geometry of partition <filename>%1</filename>: Start sector: %2, length: %3", partition().deviceNode(), newStart(), newLength()); return xi18nc("@info:progress", "Set geometry of partition <filename>%1</filename>: Start sector: %2, length: %3", partition().deviceNode(), newStart(), newLength());
} }

View File

@ -68,12 +68,12 @@ bool ShredFileSystemJob::run(Report& parent)
CopySourceShred copySource(partition().capacity(), copyTarget.sectorSize(), m_RandomShred); CopySourceShred copySource(partition().capacity(), copyTarget.sectorSize(), m_RandomShred);
if (!copySource.open()) if (!copySource.open())
report->line() << i18nc("@info/plain", "Could not open random data source to overwrite file system."); report->line() << xi18nc("@info:progress", "Could not open random data source to overwrite file system.");
else if (!copyTarget.open()) else if (!copyTarget.open())
report->line() << xi18nc("@info/plain", "Could not open target partition <filename>%1</filename> to restore to.", partition().deviceNode()); report->line() << xi18nc("@info:progress", "Could not open target partition <filename>%1</filename> to restore to.", partition().deviceNode());
else { else {
rval = copyBlocks(*report, copyTarget, copySource); rval = copyBlocks(*report, copyTarget, copySource);
report->line() << i18nc("@info/plain", "Closing device. This may take a few seconds."); report->line() << i18nc("@info:progress", "Closing device. This may take a few seconds.");
} }
} }
@ -84,5 +84,5 @@ bool ShredFileSystemJob::run(Report& parent)
QString ShredFileSystemJob::description() const QString ShredFileSystemJob::description() const
{ {
return xi18nc("@info/plain", "Shred the file system on <filename>%1</filename>", partition().deviceNode()); return xi18nc("@info:progress", "Shred the file system on <filename>%1</filename>", partition().deviceNode());
} }

View File

@ -46,7 +46,7 @@ BackupOperation::BackupOperation(Device& d, Partition& p, const QString& filenam
QString BackupOperation::description() const QString BackupOperation::description() const
{ {
return xi18nc("@info/plain", "Backup partition <filename>%1</filename> (%2, %3) to <filename>%4</filename>", backupPartition().deviceNode(), Capacity::formatByteSize(backupPartition().capacity()), backupPartition().fileSystem().name(), fileName()); return xi18nc("@info:status", "Backup partition <filename>%1</filename> (%2, %3) to <filename>%4</filename>", backupPartition().deviceNode(), Capacity::formatByteSize(backupPartition().capacity()), backupPartition().fileSystem().name(), fileName());
} }
/** Can the given Partition be backed up? /** Can the given Partition be backed up?

View File

@ -57,7 +57,7 @@ bool CheckOperation::targets(const Partition& p) const
QString CheckOperation::description() const QString CheckOperation::description() const
{ {
return xi18nc("@info/plain", "Check and repair partition <filename>%1</filename> (%2, %3)", checkedPartition().deviceNode(), Capacity::formatByteSize(checkedPartition().capacity()), checkedPartition().fileSystem().name()); return xi18nc("@info:status", "Check and repair partition <filename>%1</filename> (%2, %3)", checkedPartition().deviceNode(), Capacity::formatByteSize(checkedPartition().capacity()), checkedPartition().fileSystem().name());
} }
/** Can a Partition be checked? /** Can a Partition be checked?

View File

@ -154,30 +154,30 @@ bool CopyOperation::execute(Report& parent)
// if maximizing doesn't work, just warn the user, don't fail // if maximizing doesn't work, just warn the user, don't fail
if (!maximizeJob()->run(*report)) { if (!maximizeJob()->run(*report)) {
report->line() << xi18nc("@info/plain", "Warning: Maximizing file system on target partition <filename>%1</filename> to the size of the partition failed.", copiedPartition().deviceNode()); report->line() << xi18nc("@info:status", "Warning: Maximizing file system on target partition <filename>%1</filename> to the size of the partition failed.", copiedPartition().deviceNode());
warning = true; warning = true;
} }
} else } else
report->line() << xi18nc("@info/plain", "Checking target partition <filename>%1</filename> after copy failed.", copiedPartition().deviceNode()); report->line() << xi18nc("@info:status", "Checking target partition <filename>%1</filename> after copy failed.", copiedPartition().deviceNode());
} else { } else {
if (createPartitionJob()) { if (createPartitionJob()) {
DeletePartitionJob deleteJob(targetDevice(), copiedPartition()); DeletePartitionJob deleteJob(targetDevice(), copiedPartition());
deleteJob.run(*report); deleteJob.run(*report);
} }
report->line() << i18nc("@info/plain", "Copying source to target partition failed."); report->line() << xi18nc("@info:status", "Copying source to target partition failed.");
} }
} else } else
report->line() << i18nc("@info/plain", "Creating target partition for copying failed."); report->line() << xi18nc("@info:status", "Creating target partition for copying failed.");
} else } else
report->line() << xi18nc("@info/plain", "Checking source partition <filename>%1</filename> failed.", sourcePartition().deviceNode()); report->line() << xi18nc("@info:status", "Checking source partition <filename>%1</filename> failed.", sourcePartition().deviceNode());
if (rval) if (rval)
setStatus(warning ? StatusFinishedWarning : StatusFinishedSuccess); setStatus(warning ? StatusFinishedWarning : StatusFinishedSuccess);
else else
setStatus(StatusError); setStatus(StatusError);
report->setStatus(i18nc("@info/plain status (success, error, warning...) of operation", "%1: %2", description(), statusText())); report->setStatus(xi18nc("@info:status (success, error, warning...) of operation", "%1: %2", description(), statusText()));
return rval; return rval;
} }
@ -186,7 +186,7 @@ QString CopyOperation::updateDescription() const
{ {
if (overwrittenPartition()) { if (overwrittenPartition()) {
if (copiedPartition().length() == overwrittenPartition()->length()) if (copiedPartition().length() == overwrittenPartition()->length())
return xi18nc("@info/plain", "Copy partition <filename>%1</filename> (%2, %3) to <filename>%4</filename> (%5, %6)", return xi18nc("@info:status", "Copy partition <filename>%1</filename> (%2, %3) to <filename>%4</filename> (%5, %6)",
sourcePartition().deviceNode(), sourcePartition().deviceNode(),
Capacity::formatByteSize(sourcePartition().capacity()), Capacity::formatByteSize(sourcePartition().capacity()),
sourcePartition().fileSystem().name(), sourcePartition().fileSystem().name(),
@ -195,7 +195,7 @@ QString CopyOperation::updateDescription() const
overwrittenPartition()->fileSystem().name() overwrittenPartition()->fileSystem().name()
); );
return xi18nc("@info/plain", "Copy partition <filename>%1</filename> (%2, %3) to <filename>%4</filename> (%5, %6) and grow it to %7", return xi18nc("@info:status", "Copy partition <filename>%1</filename> (%2, %3) to <filename>%4</filename> (%5, %6) and grow it to %7",
sourcePartition().deviceNode(), sourcePartition().deviceNode(),
Capacity::formatByteSize(sourcePartition().capacity()), Capacity::formatByteSize(sourcePartition().capacity()),
sourcePartition().fileSystem().name(), sourcePartition().fileSystem().name(),
@ -207,7 +207,7 @@ QString CopyOperation::updateDescription() const
} }
if (copiedPartition().length() == sourcePartition().length()) if (copiedPartition().length() == sourcePartition().length())
return xi18nc("@info/plain", "Copy partition <filename>%1</filename> (%2, %3) to unallocated space (starting at %4) on <filename>%5</filename>", return xi18nc("@info:status", "Copy partition <filename>%1</filename> (%2, %3) to unallocated space (starting at %4) on <filename>%5</filename>",
sourcePartition().deviceNode(), sourcePartition().deviceNode(),
Capacity::formatByteSize(sourcePartition().capacity()), Capacity::formatByteSize(sourcePartition().capacity()),
sourcePartition().fileSystem().name(), sourcePartition().fileSystem().name(),
@ -215,7 +215,7 @@ QString CopyOperation::updateDescription() const
targetDevice().deviceNode() targetDevice().deviceNode()
); );
return xi18nc("@info/plain", "Copy partition <filename>%1</filename> (%2, %3) to unallocated space (starting at %4) on <filename>%5</filename> and grow it to %6", return xi18nc("@info:status", "Copy partition <filename>%1</filename> (%2, %3) to unallocated space (starting at %4) on <filename>%5</filename> and grow it to %6",
sourcePartition().deviceNode(), sourcePartition().deviceNode(),
Capacity::formatByteSize(sourcePartition().capacity()), Capacity::formatByteSize(sourcePartition().capacity()),
sourcePartition().fileSystem().name(), sourcePartition().fileSystem().name(),

View File

@ -92,5 +92,5 @@ bool CreateFileSystemOperation::execute(Report& parent)
QString CreateFileSystemOperation::description() const QString CreateFileSystemOperation::description() const
{ {
return xi18nc("@info/plain", "Create filesystem %1 on partition <filename>%2</filename>", newFileSystem()->name(), partition().deviceNode()); return xi18nc("@info:status", "Create filesystem %1 on partition <filename>%2</filename>", newFileSystem()->name(), partition().deviceNode());
} }

View File

@ -98,5 +98,5 @@ bool CreatePartitionTableOperation::canCreate(const Device* device)
QString CreatePartitionTableOperation::description() const QString CreatePartitionTableOperation::description() const
{ {
return xi18nc("@info/plain", "Create a new partition table (type: %1) on <filename>%2</filename>", partitionTable()->typeName(), targetDevice().deviceNode()); return xi18nc("@info:status", "Create a new partition table (type: %1) on <filename>%2</filename>", partitionTable()->typeName(), targetDevice().deviceNode());
} }

View File

@ -90,9 +90,9 @@ void DeleteOperation::undo()
QString DeleteOperation::description() const QString DeleteOperation::description() const
{ {
if (shredAction() != NoShred) if (shredAction() != NoShred)
return xi18nc("@info/plain", "Shred partition <filename>%1</filename> (%2, %3)", deletedPartition().deviceNode(), Capacity::formatByteSize(deletedPartition().capacity()), deletedPartition().fileSystem().name()); return xi18nc("@info:status", "Shred partition <filename>%1</filename> (%2, %3)", deletedPartition().deviceNode(), Capacity::formatByteSize(deletedPartition().capacity()), deletedPartition().fileSystem().name());
else else
return xi18nc("@info/plain", "Delete partition <filename>%1</filename> (%2, %3)", deletedPartition().deviceNode(), Capacity::formatByteSize(deletedPartition().capacity()), deletedPartition().fileSystem().name()); return xi18nc("@info:status", "Delete partition <filename>%1</filename> (%2, %3)", deletedPartition().deviceNode(), Capacity::formatByteSize(deletedPartition().capacity()), deletedPartition().fileSystem().name());
} }
void DeleteOperation::checkAdjustLogicalNumbers(Partition& p, bool undo) void DeleteOperation::checkAdjustLogicalNumbers(Partition& p, bool undo)

View File

@ -106,7 +106,7 @@ void NewOperation::undo()
QString NewOperation::description() const QString NewOperation::description() const
{ {
return xi18nc("@info/plain", "Create a new partition (%1, %2) on <filename>%3</filename>", Capacity::formatByteSize(newPartition().capacity()), newPartition().fileSystem().name(), targetDevice().deviceNode()); return xi18nc("@info:status", "Create a new partition (%1, %2) on <filename>%3</filename>", Capacity::formatByteSize(newPartition().capacity()), newPartition().fileSystem().name(), targetDevice().deviceNode());
} }
/** Can a Partition be created somewhere? /** Can a Partition be created somewhere?

View File

@ -70,12 +70,12 @@ void Operation::removePreviewPartition(Device& device, Partition& p)
QString Operation::statusText() const QString Operation::statusText() const
{ {
static const QString s[] = { static const QString s[] = {
i18nc("@info:progress operation", "None"), xi18nc("@info:progress operation", "None"),
i18nc("@info:progress operation", "Pending"), xi18nc("@info:progress operation", "Pending"),
i18nc("@info:progress operation", "Running"), xi18nc("@info:progress operation", "Running"),
i18nc("@info:progress operation", "Success"), xi18nc("@info:progress operation", "Success"),
i18nc("@info:progress operation", "Warning"), xi18nc("@info:progress operation", "Warning"),
i18nc("@info:progress operation", "Error") xi18nc("@info:progress operation", "Error")
}; };
Q_ASSERT(status() >= 0 && static_cast<quint32>(status()) < sizeof(s) / sizeof(s[0])); Q_ASSERT(status() >= 0 && static_cast<quint32>(status()) < sizeof(s) / sizeof(s[0]));
@ -168,7 +168,7 @@ bool Operation::execute(Report& parent)
setStatus(rval ? StatusFinishedSuccess : StatusError); setStatus(rval ? StatusFinishedSuccess : StatusError);
report->setStatus(i18nc("@info/plain status (success, error, warning...) of operation", "%1: %2", description(), statusText())); report->setStatus(xi18nc("@info:status (success, error, warning...) of operation", "%1: %2", description(), statusText()));
return rval; return rval;
} }

View File

@ -152,23 +152,23 @@ bool ResizeOperation::execute(Report& parent)
// they might temporarily be outside the extended partition and the backend would not let us do that. // they might temporarily be outside the extended partition and the backend would not let us do that.
if (moveExtendedJob()) { if (moveExtendedJob()) {
if (!(rval = moveExtendedJob()->run(*report))) if (!(rval = moveExtendedJob()->run(*report)))
report->line() << xi18nc("@info/plain", "Moving extended partition <filename>%1</filename> failed.", partition().deviceNode()); report->line() << xi18nc("@info:status", "Moving extended partition <filename>%1</filename> failed.", partition().deviceNode());
} else { } else {
// We run all three methods. Any of them returns true if it has nothing to do. // We run all three methods. Any of them returns true if it has nothing to do.
rval = shrink(*report) && move(*report) && grow(*report); rval = shrink(*report) && move(*report) && grow(*report);
if (rval) { if (rval) {
if (!(rval = checkResizedJob()->run(*report))) if (!(rval = checkResizedJob()->run(*report)))
report->line() << xi18nc("@info/plain", "Checking partition <filename>%1</filename> after resize/move failed.", partition().deviceNode()); report->line() << xi18nc("@info:status", "Checking partition <filename>%1</filename> after resize/move failed.", partition().deviceNode());
} else } else
report->line() << xi18nc("@info/plain", "Resizing/moving partition <filename>%1</filename> failed.", partition().deviceNode()); report->line() << xi18nc("@info:status", "Resizing/moving partition <filename>%1</filename> failed.", partition().deviceNode());
} }
} else } else
report->line() << xi18nc("@info/plain", "Checking partition <filename>%1</filename> before resize/move failed.", partition().deviceNode()); report->line() << xi18nc("@info:status", "Checking partition <filename>%1</filename> before resize/move failed.", partition().deviceNode());
setStatus(rval ? StatusFinishedSuccess : StatusError); setStatus(rval ? StatusFinishedSuccess : StatusError);
report->setStatus(i18nc("@info/plain status (success, error, warning...) of operation", "%1: %2", description(), statusText())); report->setStatus(xi18nc("@info:status (success, error, warning...) of operation", "%1: %2", description(), statusText()));
return rval; return rval;
} }
@ -194,35 +194,35 @@ QString ResizeOperation::description() const
switch (resizeAction()) { switch (resizeAction()) {
case MoveLeft: case MoveLeft:
return xi18nc("@info/plain describe resize/move action", "Move partition <filename>%1</filename> to the left by %2", partition().deviceNode(), moveDelta); return xi18nc("@info:status describe resize/move action", "Move partition <filename>%1</filename> to the left by %2", partition().deviceNode(), moveDelta);
case MoveRight: case MoveRight:
return xi18nc("@info/plain describe resize/move action", "Move partition <filename>%1</filename> to the right by %2", partition().deviceNode(), moveDelta); return xi18nc("@info:status describe resize/move action", "Move partition <filename>%1</filename> to the right by %2", partition().deviceNode(), moveDelta);
case Grow: case Grow:
return xi18nc("@info/plain describe resize/move action", "Grow partition <filename>%1</filename> from %2 to %3", partition().deviceNode(), origCapacity, newCapacity); return xi18nc("@info:status describe resize/move action", "Grow partition <filename>%1</filename> from %2 to %3", partition().deviceNode(), origCapacity, newCapacity);
case Shrink: case Shrink:
return xi18nc("@info/plain describe resize/move action", "Shrink partition <filename>%1</filename> from %2 to %3", partition().deviceNode(), origCapacity, newCapacity); return xi18nc("@info:status describe resize/move action", "Shrink partition <filename>%1</filename> from %2 to %3", partition().deviceNode(), origCapacity, newCapacity);
case MoveLeftGrow: case MoveLeftGrow:
return xi18nc("@info/plain describe resize/move action", "Move partition <filename>%1</filename> to the left by %2 and grow it from %3 to %4", partition().deviceNode(), moveDelta, origCapacity, newCapacity); return xi18nc("@info:status describe resize/move action", "Move partition <filename>%1</filename> to the left by %2 and grow it from %3 to %4", partition().deviceNode(), moveDelta, origCapacity, newCapacity);
case MoveRightGrow: case MoveRightGrow:
return xi18nc("@info/plain describe resize/move action", "Move partition <filename>%1</filename> to the right by %2 and grow it from %3 to %4", partition().deviceNode(), moveDelta, origCapacity, newCapacity); return xi18nc("@info:status describe resize/move action", "Move partition <filename>%1</filename> to the right by %2 and grow it from %3 to %4", partition().deviceNode(), moveDelta, origCapacity, newCapacity);
case MoveLeftShrink: case MoveLeftShrink:
return xi18nc("@info/plain describe resize/move action", "Move partition <filename>%1</filename> to the left by %2 and shrink it from %3 to %4", partition().deviceNode(), moveDelta, origCapacity, newCapacity); return xi18nc("@info:status describe resize/move action", "Move partition <filename>%1</filename> to the left by %2 and shrink it from %3 to %4", partition().deviceNode(), moveDelta, origCapacity, newCapacity);
case MoveRightShrink: case MoveRightShrink:
return xi18nc("@info/plain describe resize/move action", "Move partition <filename>%1</filename> to the right by %2 and shrink it from %3 to %4", partition().deviceNode(), moveDelta, origCapacity, newCapacity); return xi18nc("@info:status describe resize/move action", "Move partition <filename>%1</filename> to the right by %2 and shrink it from %3 to %4", partition().deviceNode(), moveDelta, origCapacity, newCapacity);
default: default:
qWarning() << "Could not determine what to do with partition " << partition().deviceNode() << "."; qWarning() << "Could not determine what to do with partition " << partition().deviceNode() << ".";
break; break;
} }
return i18nc("@info/plain describe resize/move action", "Unknown resize/move action."); return xi18nc("@info:status describe resize/move action", "Unknown resize/move action.");
} }
ResizeOperation::ResizeAction ResizeOperation::resizeAction() const ResizeOperation::ResizeAction ResizeOperation::resizeAction() const
@ -251,12 +251,12 @@ ResizeOperation::ResizeAction ResizeOperation::resizeAction() const
bool ResizeOperation::shrink(Report& report) bool ResizeOperation::shrink(Report& report)
{ {
if (shrinkResizeJob() && !shrinkResizeJob()->run(report)) { if (shrinkResizeJob() && !shrinkResizeJob()->run(report)) {
report.line() << xi18nc("@info/plain", "Resize/move failed: Could not resize file system to shrink partition <filename>%1</filename>.", partition().deviceNode()); report.line() << xi18nc("@info:status", "Resize/move failed: Could not resize file system to shrink partition <filename>%1</filename>.", partition().deviceNode());
return false; return false;
} }
if (shrinkSetGeomJob() && !shrinkSetGeomJob()->run(report)) { if (shrinkSetGeomJob() && !shrinkSetGeomJob()->run(report)) {
report.line() << xi18nc("@info/plain", "Resize/move failed: Could not shrink partition <filename>%1</filename>.", partition().deviceNode()); report.line() << xi18nc("@info:status", "Resize/move failed: Could not shrink partition <filename>%1</filename>.", partition().deviceNode());
return false; return false;
/** @todo if this fails, no one undoes the shrinking of the file system above, because we /** @todo if this fails, no one undoes the shrinking of the file system above, because we
@ -275,16 +275,16 @@ bool ResizeOperation::move(Report& report)
// back to its original position if copyBlocks fails. // back to its original position if copyBlocks fails.
const qint64 oldStart = partition().firstSector(); const qint64 oldStart = partition().firstSector();
if (moveSetGeomJob() && !moveSetGeomJob()->run(report)) { if (moveSetGeomJob() && !moveSetGeomJob()->run(report)) {
report.line() << xi18nc("@info/plain", "Moving partition <filename>%1</filename> failed.", partition().deviceNode()); report.line() << xi18nc("@info:status", "Moving partition <filename>%1</filename> failed.", partition().deviceNode());
return false; return false;
} }
if (moveFileSystemJob() && !moveFileSystemJob()->run(report)) { if (moveFileSystemJob() && !moveFileSystemJob()->run(report)) {
report.line() << xi18nc("@info/plain", "Moving the filesystem for partition <filename>%1</filename> failed. Rolling back.", partition().deviceNode()); report.line() << xi18nc("@info:status", "Moving the filesystem for partition <filename>%1</filename> failed. Rolling back.", partition().deviceNode());
// see above: We now have to move back the partition itself. // see above: We now have to move back the partition itself.
if (!SetPartGeometryJob(targetDevice(), partition(), oldStart, partition().length()).run(report)) if (!SetPartGeometryJob(targetDevice(), partition(), oldStart, partition().length()).run(report))
report.line() << xi18nc("@info/plain", "Moving back partition <filename>%1</filename> to its original position failed.", partition().deviceNode()); report.line() << xi18nc("@info:status", "Moving back partition <filename>%1</filename> to its original position failed.", partition().deviceNode());
return false; return false;
} }
@ -297,15 +297,15 @@ bool ResizeOperation::grow(Report& report)
const qint64 oldLength = partition().length(); const qint64 oldLength = partition().length();
if (growSetGeomJob() && !growSetGeomJob()->run(report)) { if (growSetGeomJob() && !growSetGeomJob()->run(report)) {
report.line() << xi18nc("@info/plain", "Resize/move failed: Could not grow partition <filename>%1</filename>.", partition().deviceNode()); report.line() << xi18nc("@info:status", "Resize/move failed: Could not grow partition <filename>%1</filename>.", partition().deviceNode());
return false; return false;
} }
if (growResizeJob() && !growResizeJob()->run(report)) { if (growResizeJob() && !growResizeJob()->run(report)) {
report.line() << xi18nc("@info/plain", "Resize/move failed: Could not resize the file system on partition <filename>%1</filename>", partition().deviceNode()); report.line() << xi18nc("@info:status", "Resize/move failed: Could not resize the file system on partition <filename>%1</filename>", partition().deviceNode());
if (!SetPartGeometryJob(targetDevice(), partition(), partition().firstSector(), oldLength).run(report)) if (!SetPartGeometryJob(targetDevice(), partition(), partition().firstSector(), oldLength).run(report))
report.line() << xi18nc("@info/plain", "Could not restore old partition size for partition <filename>%1</filename>.", partition().deviceNode()); report.line() << xi18nc("@info:status", "Could not restore old partition size for partition <filename>%1</filename>.", partition().deviceNode());
return false; return false;
} }

View File

@ -137,24 +137,24 @@ bool RestoreOperation::execute(Report& parent)
// or the image length, whichever is larger. If this fails, don't return an error, just // or the image length, whichever is larger. If this fails, don't return an error, just
// warn the user. // warn the user.
if ((warning = !maximizeJob()->run(*report))) if ((warning = !maximizeJob()->run(*report)))
report->line() << xi18nc("@info/plain", "Warning: Maximizing file system on target partition <filename>%1</filename> to the size of the partition failed.", restorePartition().deviceNode()); report->line() << xi18nc("@info:status", "<warning>Maximizing file system on target partition <filename>%1</filename> to the size of the partition failed.</warning>", restorePartition().deviceNode());
} else } else
report->line() << xi18nc("@info/plain", "Checking target file system on partition <filename>%1</filename> after the restore failed.", restorePartition().deviceNode()); report->line() << xi18nc("@info:status", "Checking target file system on partition <filename>%1</filename> after the restore failed.", restorePartition().deviceNode());
} else { } else {
if (!overwrittenPartition()) if (!overwrittenPartition())
DeletePartitionJob(targetDevice(), restorePartition()).run(*report); DeletePartitionJob(targetDevice(), restorePartition()).run(*report);
report->line() << i18nc("@info/plain", "Restoring file system failed."); report->line() << xi18nc("@info:status", "Restoring file system failed.");
} }
} else } else
report->line() << i18nc("@info/plain", "Creating the destination partition to restore to failed."); report->line() << xi18nc("@info:status", "Creating the destination partition to restore to failed.");
if (rval) if (rval)
setStatus(warning ? StatusFinishedWarning : StatusFinishedSuccess); setStatus(warning ? StatusFinishedWarning : StatusFinishedSuccess);
else else
setStatus(StatusError); setStatus(StatusError);
report->setStatus(i18nc("@info/plain status (success, error, warning...) of operation", "%1: %2", description(), statusText())); report->setStatus(xi18nc("@info:status (success, error, warning...) of operation", "%1: %2", description(), statusText()));
return rval; return rval;
} }
@ -162,9 +162,9 @@ bool RestoreOperation::execute(Report& parent)
QString RestoreOperation::description() const QString RestoreOperation::description() const
{ {
if (overwrittenPartition()) if (overwrittenPartition())
return xi18nc("@info/plain", "Restore partition from <filename>%1</filename> to <filename>%2</filename>", fileName(), overwrittenPartition()->deviceNode()); return xi18nc("@info:status", "Restore partition from <filename>%1</filename> to <filename>%2</filename>", fileName(), overwrittenPartition()->deviceNode());
return xi18nc("@info/plain", "Restore partition on <filename>%1</filename> at %2 from <filename>%3</filename>", targetDevice().deviceNode(), Capacity::formatByteSize(restorePartition().firstSector() * targetDevice().logicalSectorSize()), fileName()); return xi18nc("@info:status", "Restore partition on <filename>%1</filename> at %2 from <filename>%3</filename>", targetDevice().deviceNode(), Capacity::formatByteSize(restorePartition().firstSector() * targetDevice().logicalSectorSize()), fileName());
} }
void RestoreOperation::setOverwrittenPartition(Partition* p) void RestoreOperation::setOverwrittenPartition(Partition* p)

View File

@ -66,7 +66,7 @@ void SetFileSystemLabelOperation::undo()
QString SetFileSystemLabelOperation::description() const QString SetFileSystemLabelOperation::description() const
{ {
if (oldLabel().isEmpty()) if (oldLabel().isEmpty())
return xi18nc("@info/plain", "Set label for partition <filename>%1</filename> to \"%2\"", labeledPartition().deviceNode(), newLabel()); return xi18nc("@info:status", "Set label for partition <filename>%1</filename> to \"%2\"", labeledPartition().deviceNode(), newLabel());
return xi18nc("@info/plain", "Set label for partition <filename>%1</filename> from \"%2\" to \"%3\"", labeledPartition().deviceNode(), oldLabel(), newLabel()); return xi18nc("@info:status", "Set label for partition <filename>%1</filename> from \"%2\" to \"%3\"", labeledPartition().deviceNode(), oldLabel(), newLabel());
} }

View File

@ -70,7 +70,7 @@ void SetPartFlagsOperation::undo()
QString SetPartFlagsOperation::description() const QString SetPartFlagsOperation::description() const
{ {
if (PartitionTable::flagNames(newFlags()).size() == 0) if (PartitionTable::flagNames(newFlags()).size() == 0)
return xi18nc("@info/plain", "Clear flags for partition <filename>%1</filename>", flagPartition().deviceNode()); return xi18nc("@info:status", "Clear flags for partition <filename>%1</filename>", flagPartition().deviceNode());
return xi18nc("@info/plain", "Set flags for partition <filename>%1</filename> to \"%2\"", flagPartition().deviceNode(), PartitionTable::flagNames(newFlags()).join(QStringLiteral(","))); return xi18nc("@info:status", "Set flags for partition <filename>%1</filename> to \"%2\"", flagPartition().deviceNode(), PartitionTable::flagNames(newFlags()).join(QStringLiteral(",")));
} }

View File

@ -86,7 +86,7 @@ static QString s_lastPartedExceptionMessage;
*/ */
static PedExceptionOption pedExceptionHandler(PedException* e) static PedExceptionOption pedExceptionHandler(PedException* e)
{ {
Log(Log::error) << i18nc("@info/plain", "LibParted Exception: %1", QString::fromLocal8Bit(e->message)); Log(Log::error) << xi18nc("@info:status", "LibParted Exception: %1", QString::fromLocal8Bit(e->message));
s_lastPartedExceptionMessage = QString::fromLocal8Bit(e->message); s_lastPartedExceptionMessage = QString::fromLocal8Bit(e->message);
return PED_EXCEPTION_UNHANDLED; return PED_EXCEPTION_UNHANDLED;
} }
@ -433,11 +433,11 @@ Device* LibPartedBackend::scanDevice(const QString& device_node)
PedDevice* pedDevice = ped_device_get(device_node.toLocal8Bit().constData()); PedDevice* pedDevice = ped_device_get(device_node.toLocal8Bit().constData());
if (pedDevice == nullptr) { if (pedDevice == nullptr) {
Log(Log::warning) << xi18nc("@info/plain", "Could not access device <filename>%1</filename>", device_node); Log(Log::warning) << xi18nc("@info:status", "Could not access device <filename>%1</filename>", device_node);
return nullptr; return nullptr;
} }
Log(Log::information) << i18nc("@info/plain", "Device found: %1", QString::fromUtf8(pedDevice->model)); Log(Log::information) << xi18nc("@info:status", "Device found: %1", QString::fromUtf8(pedDevice->model));
Device* d = new Device(QString::fromUtf8(pedDevice->model), QString::fromUtf8(pedDevice->path), pedDevice->bios_geom.heads, pedDevice->bios_geom.sectors, pedDevice->bios_geom.cylinders, pedDevice->sector_size); Device* d = new Device(QString::fromUtf8(pedDevice->model), QString::fromUtf8(pedDevice->path), pedDevice->bios_geom.heads, pedDevice->bios_geom.sectors, pedDevice->bios_geom.cylinders, pedDevice->sector_size);

View File

@ -92,21 +92,21 @@ bool LibPartedDevice::createPartitionTable(Report& report, const PartitionTable&
PedDiskType* pedDiskType = ped_disk_type_get(ptable.typeName().toLatin1().constData()); PedDiskType* pedDiskType = ped_disk_type_get(ptable.typeName().toLatin1().constData());
if (pedDiskType == nullptr) { if (pedDiskType == nullptr) {
report.line() << xi18nc("@info/plain", "Creating partition table failed: Could not retrieve partition table type \"%1\" for <filename>%2</filename>.", ptable.typeName(), deviceNode()); report.line() << xi18nc("@info:progress", "Creating partition table failed: Could not retrieve partition table type \"%1\" for <filename>%2</filename>.", ptable.typeName(), deviceNode());
return false; return false;
} }
PedDevice* dev = ped_device_get(deviceNode().toLatin1().constData()); PedDevice* dev = ped_device_get(deviceNode().toLatin1().constData());
if (dev == nullptr) { if (dev == nullptr) {
report.line() << xi18nc("@info/plain", "Creating partition table failed: Could not open backend device <filename>%1</filename>.", deviceNode()); report.line() << xi18nc("@info:progress", "Creating partition table failed: Could not open backend device <filename>%1</filename>.", deviceNode());
return false; return false;
} }
PedDisk* disk = ped_disk_new_fresh(dev, pedDiskType); PedDisk* disk = ped_disk_new_fresh(dev, pedDiskType);
if (disk == nullptr) { if (disk == nullptr) {
report.line() << xi18nc("@info/plain", "Creating partition table failed: Could not create a new partition table in the backend for device <filename>%1</filename>.", deviceNode()); report.line() << xi18nc("@info:progress", "Creating partition table failed: Could not create a new partition table in the backend for device <filename>%1</filename>.", deviceNode());
return false; return false;
} }

View File

@ -37,7 +37,7 @@ bool LibPartedPartition::setFlag(Report& report, PartitionTable::Flag partitionM
// ignore flags that don't exist for this partition // ignore flags that don't exist for this partition
if (!ped_partition_is_flag_available(pedPartition(), f)) { if (!ped_partition_is_flag_available(pedPartition(), f)) {
report.line() << i18nc("@info/plain", "The flag \"%1\" is not available on the partition's partition table.", PartitionTable::flagName(partitionManagerFlag)); report.line() << xi18nc("@info:progress", "The flag \"%1\" is not available on the partition's partition table.", PartitionTable::flagName(partitionManagerFlag));
return true; return true;
} }

View File

@ -148,7 +148,7 @@ QString LibPartedPartitionTable::createPartition(Report& report, const Partition
pedType = PED_PARTITION_NORMAL; pedType = PED_PARTITION_NORMAL;
if (pedType == static_cast<int>(0xffffffff)) { if (pedType == static_cast<int>(0xffffffff)) {
report.line() << xi18nc("@info/plain", "Unknown partition role for new partition <filename>%1</filename> (roles: %2)", partition.deviceNode(), partition.roles().toString()); report.line() << xi18nc("@info:progress", "Unknown partition role for new partition <filename>%1</filename> (roles: %2)", partition.deviceNode(), partition.roles().toString());
return QString(); return QString();
} }
@ -157,7 +157,7 @@ QString LibPartedPartitionTable::createPartition(Report& report, const Partition
PedPartition* pedPartition = ped_partition_new(pedDisk(), pedType, pedFsType, partition.firstSector(), partition.lastSector()); PedPartition* pedPartition = ped_partition_new(pedDisk(), pedType, pedFsType, partition.firstSector(), partition.lastSector());
if (pedPartition == nullptr) { if (pedPartition == nullptr) {
report.line() << xi18nc("@info/plain", "Failed to create new partition <filename>%1</filename>.", partition.deviceNode()); report.line() << xi18nc("@info:progress", "Failed to create new partition <filename>%1</filename>.", partition.deviceNode());
return QString(); return QString();
} }
@ -169,7 +169,7 @@ QString LibPartedPartitionTable::createPartition(Report& report, const Partition
ped_geometry_destroy(pedGeometry); ped_geometry_destroy(pedGeometry);
if (pedConstraint == nullptr) { if (pedConstraint == nullptr) {
report.line() << i18nc("@info/plain", "Failed to create a new partition: could not get geometry for constraint."); report.line() << i18nc("@info:progress", "Failed to create a new partition: could not get geometry for constraint.");
return QString(); return QString();
} }
@ -179,7 +179,7 @@ QString LibPartedPartitionTable::createPartition(Report& report, const Partition
free(pedPath); free(pedPath);
} }
else { else {
report.line() << xi18nc("@info/plain", "Failed to add partition <filename>%1</filename> to device <filename>%2</filename>.", partition.deviceNode(), QString::fromUtf8(pedDisk()->dev->path)); report.line() << xi18nc("@info:progress", "Failed to add partition <filename>%1</filename> to device <filename>%2</filename>.", partition.deviceNode(), QString::fromUtf8(pedDisk()->dev->path));
report.line() << LibPartedBackend::lastPartedExceptionMessage(); report.line() << LibPartedBackend::lastPartedExceptionMessage();
} }
@ -202,9 +202,9 @@ bool LibPartedPartitionTable::deletePartition(Report& report, const Partition& p
rval = ped_disk_delete_partition(pedDisk(), pedPartition); rval = ped_disk_delete_partition(pedDisk(), pedPartition);
if (!rval) if (!rval)
report.line() << xi18nc("@info/plain", "Could not delete partition <filename>%1</filename>.", partition.deviceNode()); report.line() << xi18nc("@info:progress", "Could not delete partition <filename>%1</filename>.", partition.deviceNode());
} else } else
report.line() << xi18nc("@info/plain", "Deleting partition failed: Partition to delete (<filename>%1</filename>) not found on disk.", partition.deviceNode()); report.line() << xi18nc("@info:progress", "Deleting partition failed: Partition to delete (<filename>%1</filename>) not found on disk.", partition.deviceNode());
return rval; return rval;
} }
@ -225,15 +225,15 @@ bool LibPartedPartitionTable::updateGeometry(Report& report, const Partition& pa
if (ped_disk_set_partition_geom(pedDisk(), pedPartition, pedConstraint, sector_start, sector_end)) if (ped_disk_set_partition_geom(pedDisk(), pedPartition, pedConstraint, sector_start, sector_end))
rval = true; rval = true;
else else
report.line() << xi18nc("@info/plain", "Could not set geometry for partition <filename>%1</filename> while trying to resize/move it.", partition.deviceNode()); report.line() << xi18nc("@info:progress", "Could not set geometry for partition <filename>%1</filename> while trying to resize/move it.", partition.deviceNode());
ped_constraint_destroy(pedConstraint); ped_constraint_destroy(pedConstraint);
} else } else
report.line() << xi18nc("@info/plain", "Could not get constraint for partition <filename>%1</filename> while trying to resize/move it.", partition.deviceNode()); report.line() << xi18nc("@info:progress", "Could not get constraint for partition <filename>%1</filename> while trying to resize/move it.", partition.deviceNode());
ped_geometry_destroy(pedGeometry); ped_geometry_destroy(pedGeometry);
} else } else
report.line() << xi18nc("@info/plain", "Could not get geometry for partition <filename>%1</filename> while trying to resize/move it.", partition.deviceNode()); report.line() << xi18nc("@info:progress", "Could not get geometry for partition <filename>%1</filename> while trying to resize/move it.", partition.deviceNode());
} else } else
report.line() << xi18nc("@info/plain", "Could not open partition <filename>%1</filename> while trying to resize/move it.", partition.deviceNode()); report.line() << xi18nc("@info:progress", "Could not open partition <filename>%1</filename> while trying to resize/move it.", partition.deviceNode());
return rval; return rval;
} }
@ -255,14 +255,14 @@ bool LibPartedPartitionTable::clobberFileSystem(Report& report, const Partition&
rval = ped_geometry_write(&pedPartition->geom, zeroes, 0, 129); rval = ped_geometry_write(&pedPartition->geom, zeroes, 0, 129);
if (!rval) if (!rval)
report.line() << xi18nc("@info/plain", "Failed to erase filesystem signature on partition <filename>%1</filename>.", partition.deviceNode()); report.line() << xi18nc("@info:progress", "Failed to erase filesystem signature on partition <filename>%1</filename>.", partition.deviceNode());
ped_device_close(pedDevice()); ped_device_close(pedDevice());
} }
} else } else
rval = true; rval = true;
} else } else
report.line() << xi18nc("@info/plain", "Could not delete file system on partition <filename>%1</filename>: Failed to get partition.", partition.deviceNode()); report.line() << xi18nc("@info:progress", "Could not delete file system on partition <filename>%1</filename>: Failed to get partition.", partition.deviceNode());
return rval; return rval;
} }
@ -287,17 +287,17 @@ bool LibPartedPartitionTable::resizeFileSystem(Report& report, const Partition&
ped_timer_destroy(pedTimer); ped_timer_destroy(pedTimer);
if (!rval) if (!rval)
report.line() << xi18nc("@info/plain", "Could not resize file system on partition <filename>%1</filename>.", partition.deviceNode()); report.line() << xi18nc("@info:progress", "Could not resize file system on partition <filename>%1</filename>.", partition.deviceNode());
ped_geometry_destroy(resizedGeometry); ped_geometry_destroy(resizedGeometry);
} else } else
report.line() << xi18nc("@info/plain", "Could not get geometry for resized partition <filename>%1</filename> while trying to resize the file system.", partition.deviceNode()); report.line() << xi18nc("@info:progress", "Could not get geometry for resized partition <filename>%1</filename> while trying to resize the file system.", partition.deviceNode());
ped_file_system_close(pedFileSystem); ped_file_system_close(pedFileSystem);
} else } else
report.line() << xi18nc("@info/plain", "Could not open partition <filename>%1</filename> while trying to resize the file system.", partition.deviceNode()); report.line() << xi18nc("@info:progress", "Could not open partition <filename>%1</filename> while trying to resize the file system.", partition.deviceNode());
ped_geometry_destroy(originalGeometry); ped_geometry_destroy(originalGeometry);
} else } else
report.line() << xi18nc("@info/plain", "Could not read geometry for partition <filename>%1</filename> while trying to resize the file system.", partition.deviceNode()); report.line() << xi18nc("@info:progress", "Could not read geometry for partition <filename>%1</filename> while trying to resize the file system.", partition.deviceNode());
#else #else
Q_UNUSED(report); Q_UNUSED(report);
Q_UNUSED(partition); Q_UNUSED(partition);
@ -316,7 +316,7 @@ FileSystem::Type LibPartedPartitionTable::detectFileSystemBySector(Report& repor
if (pedPartition && pedPath) if (pedPartition && pedPath)
type = CoreBackendManager::self()->backend()->detectFileSystem(QString::fromUtf8(pedPath)); type = CoreBackendManager::self()->backend()->detectFileSystem(QString::fromUtf8(pedPath));
else else
report.line() << xi18nc("@info/plain", "Could not determine file system of partition at sector %1 on device <filename>%2</filename>.", sector, device.deviceNode()); report.line() << xi18nc("@info:progress", "Could not determine file system of partition at sector %1 on device <filename>%2</filename>.", sector, device.deviceNode());
free(pedPath); free(pedPath);
return type; return type;
@ -326,15 +326,15 @@ bool LibPartedPartitionTable::setPartitionSystemType(Report& report, const Parti
{ {
PedFileSystemType* pedFsType = (partition.roles().has(PartitionRole::Extended) || partition.fileSystem().type() == FileSystem::Unformatted) ? nullptr : getPedFileSystemType(partition.fileSystem().type()); PedFileSystemType* pedFsType = (partition.roles().has(PartitionRole::Extended) || partition.fileSystem().type() == FileSystem::Unformatted) ? nullptr : getPedFileSystemType(partition.fileSystem().type());
if (pedFsType == nullptr) { if (pedFsType == nullptr) {
report.line() << xi18nc("@info/plain", "Could not update the system type for partition <filename>%1</filename>.", partition.deviceNode()); report.line() << xi18nc("@info:progress", "Could not update the system type for partition <filename>%1</filename>.", partition.deviceNode());
report.line() << xi18nc("@info/plain", "No file system defined."); report.line() << xi18nc("@info:progress", "No file system defined.");
return false; return false;
} }
PedPartition* pedPartition = ped_disk_get_partition_by_sector(pedDisk(), partition.firstSector()); PedPartition* pedPartition = ped_disk_get_partition_by_sector(pedDisk(), partition.firstSector());
if (pedPartition == nullptr) { if (pedPartition == nullptr) {
report.line() << xi18nc("@info/plain", "Could not update the system type for partition <filename>%1</filename>.", partition.deviceNode()); report.line() << xi18nc("@info:progress", "Could not update the system type for partition <filename>%1</filename>.", partition.deviceNode());
report.line() << xi18nc("@info/plain", "No partition found at sector %1.", partition.firstSector()); report.line() << xi18nc("@info:progress", "No partition found at sector %1.", partition.firstSector());
return false; return false;
} }

View File

@ -109,19 +109,19 @@ qint64 Capacity::unitFactor(Unit from, Unit to)
QString Capacity::unitName(Unit u, qint64 val) QString Capacity::unitName(Unit u, qint64 val)
{ {
static QString unitNames[] = { static QString unitNames[] = {
i18ncp("@info/plain unit", "Byte", "Bytes", val), xi18ncp("@item:intext unit", "Byte", "Bytes", val),
i18nc("@info/plain unit", "KiB"), xi18nc("@item:intext unit", "KiB"),
i18nc("@info/plain unit", "MiB"), xi18nc("@item:intext unit", "MiB"),
i18nc("@info/plain unit", "GiB"), xi18nc("@item:intext unit", "GiB"),
i18nc("@info/plain unit", "TiB"), xi18nc("@item:intext unit", "TiB"),
i18nc("@info/plain unit", "PiB"), xi18nc("@item:intext unit", "PiB"),
i18nc("@info/plain unit", "EiB"), xi18nc("@item:intext unit", "EiB"),
i18nc("@info/plain unit", "ZiB"), xi18nc("@item:intext unit", "ZiB"),
i18nc("@info/plain unit", "YiB") xi18nc("@item:intext unit", "YiB")
}; };
if (static_cast<quint32>(u) >= sizeof(unitNames) / sizeof(unitNames[0])) if (static_cast<quint32>(u) >= sizeof(unitNames) / sizeof(unitNames[0]))
return i18nc("@info/plain unit", "(unknown unit)"); return xi18nc("@item:intext unit", "(unknown unit)");
return unitNames[u]; return unitNames[u];
} }

View File

@ -76,13 +76,13 @@ bool ExternalCommand::start(int timeout)
QProcess::start(command(), args()); QProcess::start(command(), args());
if (report()) { if (report()) {
report()->setCommand(i18nc("@info/plain", "Command: %1 %2", command(), args().join(QStringLiteral(" ")))); report()->setCommand(xi18nc("@info:status", "Command: %1 %2", command(), args().join(QStringLiteral(" "))));
} }
if (!waitForStarted(timeout)) if (!waitForStarted(timeout))
{ {
if (report()) if (report())
report()->line() << i18nc("@info/plain", "(Command timeout while starting)"); report()->line() << xi18nc("@info:status", "(Command timeout while starting)");
return false; return false;
} }
@ -99,7 +99,7 @@ bool ExternalCommand::waitFor(int timeout)
if (!waitForFinished(timeout)) { if (!waitForFinished(timeout)) {
if (report()) if (report())
report()->line() << i18nc("@info/plain", "(Command timeout while running)"); report()->line() << xi18nc("@info:status", "(Command timeout while running)");
return false; return false;
} }

View File

@ -44,7 +44,7 @@ bool caseInsensitiveLessThan(const QString& s1, const QString& s2)
void showColumnsContextMenu(const QPoint& p, QTreeWidget& tree) void showColumnsContextMenu(const QPoint& p, QTreeWidget& tree)
{ {
QMenu headerMenu(i18nc("@title:menu", "Columns")); QMenu headerMenu(xi18nc("@title:menu", "Columns"));
QHeaderView* header = tree.header(); QHeaderView* header = tree.header();