From 3a2b78e143964b7033c0d145e59b6e1729beda65 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andrius=20=C5=A0tikonas?= Date: Sun, 17 Jul 2016 23:41:00 +0100 Subject: [PATCH] Improve semantic markup of translations. --- src/core/operationstack.cpp | 30 +++++----- src/core/partition.cpp | 8 +-- src/core/partitionalignment.cpp | 4 +- src/core/partitionrole.cpp | 12 ++-- src/core/partitiontable.cpp | 38 ++++++------- src/core/smartattribute.cpp | 14 ++--- src/core/smartstatus.cpp | 34 +++++------ src/fs/btrfs.cpp | 8 +-- src/fs/fat16.cpp | 2 +- src/fs/filesystem.cpp | 56 +++++++++---------- src/fs/jfs.cpp | 8 +-- src/fs/linuxswap.cpp | 4 +- src/fs/luks.cpp | 14 ++--- src/fs/nilfs2.cpp | 8 +-- src/fs/ntfs.cpp | 10 ++-- src/fs/xfs.cpp | 8 +-- src/jobs/backupfilesystemjob.cpp | 6 +- src/jobs/checkfilesystemjob.cpp | 2 +- src/jobs/copyfilesystemjob.cpp | 10 ++-- src/jobs/createfilesystemjob.cpp | 8 +-- src/jobs/createpartitionjob.cpp | 10 ++-- src/jobs/createpartitiontablejob.cpp | 4 +- src/jobs/deletefilesystemjob.cpp | 10 ++-- src/jobs/deletepartitionjob.cpp | 8 +-- src/jobs/job.cpp | 32 +++++------ src/jobs/movefilesystemjob.cpp | 10 ++-- src/jobs/resizefilesystemjob.cpp | 18 +++--- src/jobs/restorefilesystemjob.cpp | 8 +-- src/jobs/setfilesystemlabeljob.cpp | 4 +- src/jobs/setpartflagsjob.cpp | 12 ++-- src/jobs/setpartgeometryjob.cpp | 4 +- src/jobs/shredfilesystemjob.cpp | 8 +-- src/ops/backupoperation.cpp | 2 +- src/ops/checkoperation.cpp | 2 +- src/ops/copyoperation.cpp | 20 +++---- src/ops/createfilesystemoperation.cpp | 2 +- src/ops/createpartitiontableoperation.cpp | 2 +- src/ops/deleteoperation.cpp | 4 +- src/ops/newoperation.cpp | 2 +- src/ops/operation.cpp | 14 ++--- src/ops/resizeoperation.cpp | 44 +++++++-------- src/ops/restoreoperation.cpp | 14 ++--- src/ops/setfilesystemlabeloperation.cpp | 4 +- src/ops/setpartflagsoperation.cpp | 4 +- src/plugins/libparted/libpartedbackend.cpp | 6 +- src/plugins/libparted/libparteddevice.cpp | 6 +- src/plugins/libparted/libpartedpartition.cpp | 2 +- .../libparted/libpartedpartitiontable.cpp | 42 +++++++------- src/util/capacity.cpp | 20 +++---- src/util/externalcommand.cpp | 6 +- src/util/helpers.cpp | 2 +- 51 files changed, 305 insertions(+), 305 deletions(-) diff --git a/src/core/operationstack.cpp b/src/core/operationstack.cpp index 1fe3083..4f4d2c9 100644 --- a/src/core/operationstack.cpp +++ b/src/core/operationstack.cpp @@ -106,7 +106,7 @@ bool OperationStack::mergeNewOperation(Operation*& currentOp, Operation*& pushed // -- 1 -- 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; 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 // extended again (a second resize): The ResizeOp still has the pointer to the original extended that // 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()); newPartition->setFirstSector(pushedResizeOp->newFirstSector()); @@ -144,7 +144,7 @@ bool OperationStack::mergeNewOperation(Operation*& currentOp, Operation*& pushed // -- 3 -- 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()); newPartition->setFirstSector(pushedCopyOp->copiedPartition().firstSector()); @@ -161,7 +161,7 @@ bool OperationStack::mergeNewOperation(Operation*& currentOp, Operation*& pushed // -- 4 -- 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->newPartition().fileSystem().setLabel(pushedLabelOp->newLabel()); @@ -174,7 +174,7 @@ bool OperationStack::mergeNewOperation(Operation*& currentOp, Operation*& pushed // -- 5 -- 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(); @@ -191,7 +191,7 @@ bool OperationStack::mergeNewOperation(Operation*& currentOp, Operation*& pushed // -- 6 -- 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; 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 // copy operation, forget the delete and be done. 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; pushedOp = nullptr; } 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()); } @@ -256,7 +256,7 @@ bool OperationStack::mergeCopyOperation(Operation*& currentOp, Operation*& pushe // -- 2 -- if (pushedCopyOp && ©Op->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(©Op->sourcePartition()); } @@ -285,12 +285,12 @@ bool OperationStack::mergeRestoreOperation(Operation*& currentOp, Operation*& pu if (pushedDeleteOp && &restoreOp->restorePartition() == &pushedDeleteOp->deletedPartition()) { 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; pushedOp = nullptr; } 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()); } @@ -323,7 +323,7 @@ bool OperationStack::mergePartFlagsOperation(Operation*& currentOp, Operation*& SetPartFlagsOperation* pushedFlagsOp = dynamic_cast(pushedOp); 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()); partFlagsOp->undo(); @@ -354,7 +354,7 @@ bool OperationStack::mergePartLabelOperation(Operation*& currentOp, Operation*& SetFileSystemLabelOperation* pushedLabelOp = dynamic_cast(pushedOp); 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()); partLabelOp->undo(); @@ -380,7 +380,7 @@ bool OperationStack::mergeCreatePartitionTableOperation(Operation*& currentOp, O CreatePartitionTableOperation* pushedCreatePartitionTableOp = dynamic_cast(pushedOp); 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(currentOp); if (createPartitionTableOp != nullptr) @@ -429,7 +429,7 @@ void OperationStack::push(Operation* o) } if (o != nullptr) { - Log() << i18nc("@info/plain", "Add operation: %1", o->description()); + Log() << xi18nc("@info:status", "Add operation: %1", o->description()); operations().append(o); o->preview(); o->setStatus(Operation::StatusPending); diff --git a/src/core/partition.cpp b/src/core/partition.cpp index 92ced34..b1095b9 100644 --- a/src/core/partition.cpp +++ b/src/core/partition.cpp @@ -158,16 +158,16 @@ bool Partition::operator!=(const Partition& other) const QString Partition::deviceNode() const { if (roles().has(PartitionRole::None) || roles().has(PartitionRole::Unallocated)) - return i18nc("@item partition name", "unallocated"); + return xi18nc("@item partition name", "unallocated"); if (state() == StateNew) - return i18nc("@item partition name", "New Partition"); + return xi18nc("@item partition name", "New Partition"); if (state() == StateRestore) - return i18nc("@item partition name", "Restored Partition"); + return xi18nc("@item partition name", "Restored Partition"); if (state() == StateCopy) - return i18nc("@item partition name", "Copy of %1", partitionPath()); + return xi18nc("@item partition name", "Copy of %1", partitionPath()); return partitionPath(); } diff --git a/src/core/partitionalignment.cpp b/src/core/partitionalignment.cpp index 86f212d..97fa827 100644 --- a/src/core/partitionalignment.cpp +++ b/src/core/partitionalignment.cpp @@ -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) { if (firstDelta(d, p, newFirst) && !quiet) - Log(Log::warning) << xi18nc("@info/plain", "Partition %1 is not properly aligned (first sector: %2, modulo: %3).", p.deviceNode(), newFirst, firstDelta(d, p, newFirst)); + Log(Log::warning) << xi18nc("@info:status", "Partition %1 is not properly aligned (first sector: %2, modulo: %3).", p.deviceNode(), newFirst, firstDelta(d, p, newFirst)); if (lastDelta(d, p, newLast) && !quiet) - Log(Log::warning) << xi18nc("@info/plain", "Partition %1 is not properly aligned (last sector: %2, modulo: %3).", p.deviceNode(), newLast, lastDelta(d, p, newLast)); + Log(Log::warning) << xi18nc("@info:status", "Partition %1 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; } diff --git a/src/core/partitionrole.cpp b/src/core/partitionrole.cpp index 2900b89..9a7ddbe 100644 --- a/src/core/partitionrole.cpp +++ b/src/core/partitionrole.cpp @@ -26,19 +26,19 @@ QString PartitionRole::toString() const { if (roles() & Unallocated) - return i18nc("@item partition role", "unallocated"); + return xi18nc("@item partition role", "unallocated"); if (roles() & Logical) - return i18nc("@item partition role", "logical"); + return xi18nc("@item partition role", "logical"); if (roles() & Extended) - return i18nc("@item partition role", "extended"); + return xi18nc("@item partition role", "extended"); if (roles() & Primary) - return i18nc("@item partition role", "primary"); + return xi18nc("@item partition role", "primary"); 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"); } diff --git a/src/core/partitiontable.cpp b/src/core/partitiontable.cpp index 542ec8a..3f88628 100644 --- a/src/core/partitiontable.cpp +++ b/src/core/partitiontable.cpp @@ -151,41 +151,41 @@ QString PartitionTable::flagName(Flag f) { switch (f) { case PartitionTable::FlagBoot: - return i18nc("@item partition flag", "boot"); + return xi18nc("@item partition flag", "boot"); case PartitionTable::FlagRoot: - return i18nc("@item partition flag", "root"); + return xi18nc("@item partition flag", "root"); case PartitionTable::FlagSwap: - return i18nc("@item partition flag", "swap"); + return xi18nc("@item partition flag", "swap"); case PartitionTable::FlagHidden: - return i18nc("@item partition flag", "hidden"); + return xi18nc("@item partition flag", "hidden"); case PartitionTable::FlagRaid: - return i18nc("@item partition flag", "raid"); + return xi18nc("@item partition flag", "raid"); case PartitionTable::FlagLvm: - return i18nc("@item partition flag", "lvm"); + return xi18nc("@item partition flag", "lvm"); case PartitionTable::FlagLba: - return i18nc("@item partition flag", "lba"); + return xi18nc("@item partition flag", "lba"); case PartitionTable::FlagHpService: - return i18nc("@item partition flag", "hpservice"); + return xi18nc("@item partition flag", "hpservice"); case PartitionTable::FlagPalo: - return i18nc("@item partition flag", "palo"); + return xi18nc("@item partition flag", "palo"); case PartitionTable::FlagPrep: - return i18nc("@item partition flag", "prep"); + return xi18nc("@item partition flag", "prep"); case PartitionTable::FlagMsftReserved: - return i18nc("@item partition flag", "msft-reserved"); + return xi18nc("@item partition flag", "msft-reserved"); case PartitionTable::FlagBiosGrub: - return i18nc("@item partition flag", "bios-grub"); + return xi18nc("@item partition flag", "bios-grub"); case PartitionTable::FlagAppleTvRecovery: - return i18nc("@item partition flag", "apple-tv-recovery"); + return xi18nc("@item partition flag", "apple-tv-recovery"); case PartitionTable::FlagDiag: - return i18nc("@item partition flag", "diag"); + return xi18nc("@item partition flag", "diag"); case PartitionTable::FlagLegacyBoot: - return i18nc("@item partition flag", "legacy-boot"); + return xi18nc("@item partition flag", "legacy-boot"); case PartitionTable::FlagMsftData: - return i18nc("@item partition flag", "msft-data"); + return xi18nc("@item partition flag", "msft-data"); case PartitionTable::FlagIrst: - return i18nc("@item partition flag", "irst"); + return xi18nc("@item partition flag", "irst"); case PartitionTable::FlagEsp: - return i18nc("@item partition flag", "esp"); + return xi18nc("@item partition flag", "esp"); default: break; } @@ -416,7 +416,7 @@ QString PartitionTable::tableTypeToName(TableType l) if (l == tableTypes[i].type) return tableTypes[i].name; - return i18nc("@item partition table name", "unknown"); + return xi18nc("@item partition table name", "unknown"); } qint64 PartitionTable::maxPrimariesForTableType(TableType l) diff --git a/src/core/smartattribute.cpp b/src/core/smartattribute.cpp index 6833ad5..913ef70 100644 --- a/src/core/smartattribute.cpp +++ b/src/core/smartattribute.cpp @@ -51,20 +51,20 @@ QString SmartAttribute::assessmentToString(Assessment a) { switch (a) { case Failing: - return i18nc("@item:intable", "failing"); + return xi18nc("@item:intable", "failing"); case HasFailed: - return i18nc("@item:intable", "has failed"); + return xi18nc("@item:intable", "has failed"); case Warning: - return i18nc("@item:intable", "warning"); + return xi18nc("@item:intable", "warning"); case Good: - return i18nc("@item:intable", "good"); + return xi18nc("@item:intable", "good"); case NotApplicable: 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; 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; case SK_SMART_ATTRIBUTE_UNIT_MKELVIN: @@ -91,7 +91,7 @@ static QString getPrettyValue(qint64 value, qint64 unit) case SK_SMART_ATTRIBUTE_UNIT_UNKNOWN: default: - rval = i18nc("@item:intable not applicable", "N/A"); + rval = xi18nc("@item:intable not applicable", "N/A"); break; } diff --git a/src/core/smartstatus.cpp b/src/core/smartstatus.cpp index ac8bc8e..b2a44a0 100644 --- a/src/core/smartstatus.cpp +++ b/src/core/smartstatus.cpp @@ -196,42 +196,42 @@ QString SmartStatus::tempToString(qint64 mkelvin) { const double celsius = (mkelvin - 273150.0) / 1000.0; 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) { switch (s) { case Aborted: - return i18nc("@item", "Aborted"); + return xi18nc("@item", "Aborted"); case Interrupted: - return i18nc("@item", "Interrupted"); + return xi18nc("@item", "Interrupted"); case Fatal: - return i18nc("@item", "Fatal error"); + return xi18nc("@item", "Fatal error"); case ErrorUnknown: - return i18nc("@item", "Unknown error"); + return xi18nc("@item", "Unknown error"); case ErrorEletrical: - return i18nc("@item", "Electrical error"); + return xi18nc("@item", "Electrical error"); case ErrorServo: - return i18nc("@item", "Servo error"); + return xi18nc("@item", "Servo error"); case ErrorRead: - return i18nc("@item", "Read error"); + return xi18nc("@item", "Read error"); case ErrorHandling: - return i18nc("@item", "Handling error"); + return xi18nc("@item", "Handling error"); case InProgress: - return i18nc("@item", "Self test in progress"); + return xi18nc("@item", "Self test in progress"); case Success: default: - return i18nc("@item", "Success"); + return xi18nc("@item", "Success"); } } @@ -240,23 +240,23 @@ QString SmartStatus::overallAssessmentToString(Overall o) { switch (o) { case Good: - return i18nc("@item", "Healthy"); + return xi18nc("@item", "Healthy"); 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: - return i18nc("@item", "Has some bad sectors."); + return xi18nc("@item", "Has some bad sectors."); 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: - return i18nc("@item", "Has many bad sectors."); + return xi18nc("@item", "Has many bad sectors."); case Bad: default: - return i18nc("@item", "Disk failure is imminent. Backup all data!"); + return xi18nc("@item", "Disk failure is imminent. Backup all data!"); } } diff --git a/src/fs/btrfs.cpp b/src/fs/btrfs.cpp index 22c72cc..585fa6b 100644 --- a/src/fs/btrfs.cpp +++ b/src/fs/btrfs.cpp @@ -136,7 +136,7 @@ bool btrfs::resize(Report& report, const QString& deviceNode, qint64 length) con { QTemporaryDir tempDir; if (!tempDir.isValid()) { - report.line() << xi18nc("@info/plain", "Resizing Btrfs file system on partition %1 failed: Could not create temp dir.", deviceNode); + report.line() << xi18nc("@info:progress", "Resizing Btrfs file system on partition %1 failed: Could not create temp dir.", deviceNode); return false; } @@ -152,14 +152,14 @@ bool btrfs::resize(Report& report, const QString& deviceNode, qint64 length) con if (resizeCmd.run(-1) && resizeCmd.exitCode() == 0) rval = true; else - report.line() << xi18nc("@info/plain", "Resizing Btrfs file system on partition %1 failed: btrfs file system resize failed.", deviceNode); + report.line() << xi18nc("@info:progress", "Resizing Btrfs file system on partition %1 failed: btrfs file system resize failed.", deviceNode); ExternalCommand unmountCmd(report, QStringLiteral("umount"), { tempDir.path() }); if (!unmountCmd.run(-1) && unmountCmd.exitCode() == 0) - report.line() << xi18nc("@info/plain", "Warning: Resizing Btrfs file system on partition %1: Unmount failed.", deviceNode); + report.line() << xi18nc("@info:progress", "Warning: Resizing Btrfs file system on partition %1: Unmount failed.", deviceNode); } else - report.line() << xi18nc("@info/plain", "Resizing Btrfs file system on partition %1 failed: Initial mount failed.", deviceNode); + report.line() << xi18nc("@info:progress", "Resizing Btrfs file system on partition %1 failed: Initial mount failed.", deviceNode); return rval; } diff --git a/src/fs/fat16.cpp b/src/fs/fat16.cpp index 8882054..f553afc 100644 --- a/src/fs/fat16.cpp +++ b/src/fs/fat16.cpp @@ -131,7 +131,7 @@ qint64 fat16::readUsedCapacity(const QString& deviceNode) const bool fat16::writeLabel(Report& report, const QString& deviceNode, const QString& newLabel) { - report.line() << xi18nc("@info/plain", "Setting label for partition %1 to %2", deviceNode, newLabel); + report.line() << xi18nc("@info:progress", "Setting label for partition %1 to %2", deviceNode, newLabel); ExternalCommand cmd(report, QStringLiteral("fatlabel"), { deviceNode, newLabel }); return cmd.run(-1) && cmd.exitCode() == 0; diff --git a/src/fs/filesystem.cpp b/src/fs/filesystem.cpp index 8f43cee..82596f7 100644 --- a/src/fs/filesystem.cpp +++ b/src/fs/filesystem.cpp @@ -305,33 +305,33 @@ QString FileSystem::name() const static const QString* typeNames() { static const QString s[] = { - i18nc("@item filesystem name", "unknown"), - i18nc("@item filesystem name", "extended"), + xi18nc("@item filesystem name", "unknown"), + xi18nc("@item filesystem name", "extended"), - i18nc("@item filesystem name", "ext2"), - i18nc("@item filesystem name", "ext3"), - i18nc("@item filesystem name", "ext4"), - i18nc("@item filesystem name", "linuxswap"), - i18nc("@item filesystem name", "fat16"), - i18nc("@item filesystem name", "fat32"), - i18nc("@item filesystem name", "ntfs"), - i18nc("@item filesystem name", "reiser"), - i18nc("@item filesystem name", "reiser4"), - i18nc("@item filesystem name", "xfs"), - i18nc("@item filesystem name", "jfs"), - i18nc("@item filesystem name", "hfs"), - i18nc("@item filesystem name", "hfsplus"), - i18nc("@item filesystem name", "ufs"), - i18nc("@item filesystem name", "unformatted"), - i18nc("@item filesystem name", "btrfs"), - i18nc("@item filesystem name", "hpfs"), - i18nc("@item filesystem name", "luks"), - i18nc("@item filesystem name", "ocfs2"), - i18nc("@item filesystem name", "zfs"), - i18nc("@item filesystem name", "exfat"), - i18nc("@item filesystem name", "nilfs2"), - i18nc("@item filesystem name", "lvm2 pv"), - i18nc("@item filesystem name", "f2fs"), + xi18nc("@item filesystem name", "ext2"), + xi18nc("@item filesystem name", "ext3"), + xi18nc("@item filesystem name", "ext4"), + xi18nc("@item filesystem name", "linuxswap"), + xi18nc("@item filesystem name", "fat16"), + xi18nc("@item filesystem name", "fat32"), + xi18nc("@item filesystem name", "ntfs"), + xi18nc("@item filesystem name", "reiser"), + xi18nc("@item filesystem name", "reiser4"), + xi18nc("@item filesystem name", "xfs"), + xi18nc("@item filesystem name", "jfs"), + xi18nc("@item filesystem name", "hfs"), + xi18nc("@item filesystem name", "hfsplus"), + xi18nc("@item filesystem name", "ufs"), + xi18nc("@item filesystem name", "unformatted"), + xi18nc("@item filesystem name", "btrfs"), + xi18nc("@item filesystem name", "hpfs"), + xi18nc("@item filesystem name", "luks"), + xi18nc("@item filesystem name", "ocfs2"), + xi18nc("@item filesystem name", "zfs"), + xi18nc("@item filesystem name", "exfat"), + xi18nc("@item filesystem name", "nilfs2"), + xi18nc("@item filesystem name", "lvm2 pv"), + xi18nc("@item filesystem name", "f2fs"), }; return s; @@ -375,13 +375,13 @@ QList FileSystem::types() /** @return printable menu title for mounting this FileSystem */ QString FileSystem::mountTitle() const { - return i18nc("@title:menu", "Mount"); + return xi18nc("@title:menu", "Mount"); } /** @return printable menu title for unmounting this FileSystem */ QString FileSystem::unmountTitle() const { - return i18nc("@title:menu", "Unmount"); + return xi18nc("@title:menu", "Unmount"); } /** Moves a FileSystem to a new start sector. diff --git a/src/fs/jfs.cpp b/src/fs/jfs.cpp index 8d1ba44..b0732c6 100644 --- a/src/fs/jfs.cpp +++ b/src/fs/jfs.cpp @@ -156,7 +156,7 @@ bool jfs::resize(Report& report, const QString& deviceNode, qint64) const { QTemporaryDir tempDir; if (!tempDir.isValid()) { - report.line() << xi18nc("@info/plain", "Resizing JFS file system on partition %1 failed: Could not create temp dir.", deviceNode); + report.line() << xi18nc("@info:progress", "Resizing JFS file system on partition %1 failed: Could not create temp dir.", deviceNode); return false; } @@ -170,14 +170,14 @@ bool jfs::resize(Report& report, const QString& deviceNode, qint64) const if (resizeMountCmd.run(-1)) rval = true; else - report.line() << xi18nc("@info/plain", "Resizing JFS file system on partition %1 failed: Remount failed.", deviceNode); + report.line() << xi18nc("@info:progress", "Resizing JFS file system on partition %1 failed: Remount failed.", deviceNode); ExternalCommand unmountCmd(report, QStringLiteral("umount"), { tempDir.path() }); if (!unmountCmd.run(-1)) - report.line() << xi18nc("@info/plain", "Warning: Resizing JFS file system on partition %1: Unmount failed.", deviceNode); + report.line() << xi18nc("@info:progress", "Warning: Resizing JFS file system on partition %1: Unmount failed.", deviceNode); } else - report.line() << xi18nc("@info/plain", "Resizing JFS file system on partition %1 failed: Initial mount failed.", deviceNode); + report.line() << xi18nc("@info:progress", "Resizing JFS file system on partition %1 failed: Initial mount failed.", deviceNode); return rval; } diff --git a/src/fs/linuxswap.cpp b/src/fs/linuxswap.cpp index 51f8479..f58773c 100644 --- a/src/fs/linuxswap.cpp +++ b/src/fs/linuxswap.cpp @@ -125,12 +125,12 @@ bool linuxswap::writeLabel(Report& report, const QString& deviceNode, const QStr QString linuxswap::mountTitle() const { - return i18nc("@title:menu", "Activate swap"); + return xi18nc("@title:menu", "Activate swap"); } 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 { diff --git a/src/fs/luks.cpp b/src/fs/luks.cpp index fa4d1df..32c4c28 100644 --- a/src/fs/luks.cpp +++ b/src/fs/luks.cpp @@ -140,22 +140,22 @@ bool luks::create(Report& report, const QString& deviceNode) const QString luks::mountTitle() const { - return i18nc("@title:menu", "Mount"); + return xi18nc("@title:menu", "Mount"); } QString luks::unmountTitle() const { - return i18nc("@title:menu", "Unmount"); + return xi18nc("@title:menu", "Unmount"); } QString luks::cryptOpenTitle() const { - return i18nc("@title:menu", "Decrypt"); + return xi18nc("@title:menu", "Decrypt"); } QString luks::cryptCloseTitle() const { - return i18nc("@title:menu", "Deactivate"); + return xi18nc("@title:menu", "Deactivate"); } 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 ) { ExternalCommand cryptResizeCmd(report, QStringLiteral("cryptsetup"), { QStringLiteral("resize"), mapperNode }); - report.line() << xi18nc("@info/plain", "Resizing LUKS crypt on partition %1.", deviceNode); + report.line() << xi18nc("@info:progress", "Resizing LUKS crypt on partition %1.", deviceNode); 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)) { 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 %1.", deviceNode); + report.line() << xi18nc("@info:progress", "Resizing LUKS crypt on partition %1.", deviceNode); if (cryptResizeCmd.run(-1) && cryptResizeCmd.exitCode() == 0) { return true; } } - report.line() << xi18nc("@info/plain", "Resizing encrypted file system on partition %1 failed.", deviceNode); + report.line() << xi18nc("@info:progress", "Resizing encrypted file system on partition %1 failed.", deviceNode); return false; } diff --git a/src/fs/nilfs2.cpp b/src/fs/nilfs2.cpp index 6fbdecc..c9c05b6 100644 --- a/src/fs/nilfs2.cpp +++ b/src/fs/nilfs2.cpp @@ -143,7 +143,7 @@ bool nilfs2::resize(Report& report, const QString& deviceNode, qint64 length) co { QTemporaryDir tempDir; if (!tempDir.isValid()) { - report.line() << xi18nc("@info/plain", "Resizing NILFS2 file system on partition %1 failed: Could not create temp dir.", deviceNode); + report.line() << xi18nc("@info:progress", "Resizing NILFS2 file system on partition %1 failed: Could not create temp dir.", deviceNode); return false; } @@ -157,14 +157,14 @@ bool nilfs2::resize(Report& report, const QString& deviceNode, qint64 length) co if (resizeCmd.run(-1) && resizeCmd.exitCode() == 0) rval = true; else - report.line() << xi18nc("@info/plain", "Resizing NILFS2 file system on partition %1 failed: NILFS2 file system resize failed.", deviceNode); + report.line() << xi18nc("@info:progress", "Resizing NILFS2 file system on partition %1 failed: NILFS2 file system resize failed.", deviceNode); ExternalCommand unmountCmd(report, QStringLiteral("umount"), { tempDir.path() }); if (!unmountCmd.run(-1) && unmountCmd.exitCode() == 0) - report.line() << xi18nc("@info/plain", "Warning: Resizing NILFS2 file system on partition %1: Unmount failed.", deviceNode); + report.line() << xi18nc("@info:progress", "Warning: Resizing NILFS2 file system on partition %1: Unmount failed.", deviceNode); } else - report.line() << xi18nc("@info/plain", "Resizing NILFS2 file system on partition %1 failed: Initial mount failed.", deviceNode); + report.line() << xi18nc("@info:progress", "Resizing NILFS2 file system on partition %1 failed: Initial mount failed.", deviceNode); return rval; } diff --git a/src/fs/ntfs.cpp b/src/fs/ntfs.cpp index 8d5c6ed..33de2ad 100644 --- a/src/fs/ntfs.cpp +++ b/src/fs/ntfs.cpp @@ -179,7 +179,7 @@ bool ntfs::updateUUID(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 %1.", deviceNode); + report.line() << xi18nc("@info:progress", "Updating boot sector for NTFS file system on partition %1.", deviceNode); quint32 n = firstSector(); char* s = reinterpret_cast(&n); @@ -191,21 +191,21 @@ bool ntfs::updateBootSector(Report& report, const QString& deviceNode) const QFile device(deviceNode); if (!device.open(QFile::ReadWrite | QFile::Unbuffered)) { - Log() << xi18nc("@info/plain", "Could not open partition %1 for writing when trying to update the NTFS boot sector.", deviceNode); + Log() << xi18nc("@info:progress", "Could not open partition %1 for writing when trying to update the NTFS boot sector.", deviceNode); return false; } if (!device.seek(0x1c)) { - Log() << xi18nc("@info/plain", "Could not seek to position 0x1c on partition %1 when trying to update the NTFS boot sector.", deviceNode); + Log() << xi18nc("@info:progress", "Could not seek to position 0x1c on partition %1 when trying to update the NTFS boot sector.", deviceNode); return false; } if (device.write(s, 4) != 4) { - Log() << xi18nc("@info/plain", "Could not write new start sector to partition %1 when trying to update the NTFS boot sector.", deviceNode); + Log() << xi18nc("@info:progress", "Could not write new start sector to partition %1 when trying to update the NTFS boot sector.", deviceNode); return false; } - Log() << xi18nc("@info/plain", "Updated NTFS boot sector for partition %1 successfully.", deviceNode); + Log() << xi18nc("@info:progress", "Updated NTFS boot sector for partition %1 successfully.", deviceNode); return true; } diff --git a/src/fs/xfs.cpp b/src/fs/xfs.cpp index 2dd32e4..dda0bac 100644 --- a/src/fs/xfs.cpp +++ b/src/fs/xfs.cpp @@ -166,7 +166,7 @@ bool xfs::resize(Report& report, const QString& deviceNode, qint64) const { QTemporaryDir tempDir; if (!tempDir.isValid()) { - report.line() << xi18nc("@info/plain", "Resizing XFS file system on partition %1 failed: Could not create temp dir.", deviceNode); + report.line() << xi18nc("@info:progress", "Resizing XFS file system on partition %1 failed: Could not create temp dir.", deviceNode); return false; } @@ -180,14 +180,14 @@ bool xfs::resize(Report& report, const QString& deviceNode, qint64) const if (resizeCmd.run(-1)) rval = true; else - report.line() << xi18nc("@info/plain", "Resizing XFS file system on partition %1 failed: xfs_growfs failed.", deviceNode); + report.line() << xi18nc("@info:progress", "Resizing XFS file system on partition %1 failed: xfs_growfs failed.", deviceNode); ExternalCommand unmountCmd(report, QStringLiteral("umount"), { tempDir.path() }); if (!unmountCmd.run(-1)) - report.line() << xi18nc("@info/plain", "Warning: Resizing XFS file system on partition %1: Unmount failed.", deviceNode); + report.line() << xi18nc("@info:progress", "Warning: Resizing XFS file system on partition %1: Unmount failed.", deviceNode); } else - report.line() << xi18nc("@info/plain", "Resizing XFS file system on partition %1 failed: Initial mount failed.", deviceNode); + report.line() << xi18nc("@info:progress", "Resizing XFS file system on partition %1 failed: Initial mount failed.", deviceNode); return rval; } diff --git a/src/jobs/backupfilesystemjob.cpp b/src/jobs/backupfilesystemjob.cpp index 5dcedfc..4fc2183 100644 --- a/src/jobs/backupfilesystemjob.cpp +++ b/src/jobs/backupfilesystemjob.cpp @@ -60,9 +60,9 @@ bool BackupFileSystemJob::run(Report& parent) CopyTargetFile copyTarget(fileName(), sourceDevice().logicalSectorSize()); if (!copySource.open()) - report->line() << xi18nc("@info/plain", "Could not open file system on source partition %1 for backup.", sourcePartition().deviceNode()); + report->line() << xi18nc("@info:progress", "Could not open file system on source partition %1 for backup.", sourcePartition().deviceNode()); else if (!copyTarget.open()) - report->line() << xi18nc("@info/plain", "Could not create backup file %1.", fileName()); + report->line() << xi18nc("@info:progress", "Could not create backup file %1.", fileName()); else rval = copyBlocks(*report, copyTarget, copySource); } @@ -74,5 +74,5 @@ bool BackupFileSystemJob::run(Report& parent) QString BackupFileSystemJob::description() const { - return xi18nc("@info/plain", "Back up file system on partition %1 to %2", sourcePartition().deviceNode(), fileName()); + return xi18nc("@info:progress", "Back up file system on partition %1 to %2", sourcePartition().deviceNode(), fileName()); } diff --git a/src/jobs/checkfilesystemjob.cpp b/src/jobs/checkfilesystemjob.cpp index 820804f..9ac2a19 100644 --- a/src/jobs/checkfilesystemjob.cpp +++ b/src/jobs/checkfilesystemjob.cpp @@ -52,5 +52,5 @@ bool CheckFileSystemJob::run(Report& parent) QString CheckFileSystemJob::description() const { - return xi18nc("@info/plain", "Check file system on partition %1", partition().deviceNode()); + return xi18nc("@info:progress", "Check file system on partition %1", partition().deviceNode()); } diff --git a/src/jobs/copyfilesystemjob.cpp b/src/jobs/copyfilesystemjob.cpp index 4f0a81b..2c028f9 100644 --- a/src/jobs/copyfilesystemjob.cpp +++ b/src/jobs/copyfilesystemjob.cpp @@ -56,7 +56,7 @@ bool CopyFileSystemJob::run(Report& parent) Report* report = jobStarted(parent); if (targetPartition().fileSystem().length() < sourcePartition().fileSystem().length()) - report->line() << xi18nc("@info/plain", "Cannot copy file system: File system on target partition %1 is smaller than the file system on source partition %2.", targetPartition().deviceNode(), sourcePartition().deviceNode()); + report->line() << xi18nc("@info:progress", "Cannot copy file system: File system on target partition %1 is smaller than the file system on source partition %2.", targetPartition().deviceNode(), sourcePartition().deviceNode()); else if (sourcePartition().fileSystem().supportCopy() == FileSystem::cmdSupportFileSystem) rval = sourcePartition().fileSystem().copy(*report, targetPartition().deviceNode(), sourcePartition().deviceNode()); 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()); if (!copySource.open()) - report->line() << xi18nc("@info/plain", "Could not open file system on source partition %1 for copying.", sourcePartition().deviceNode()); + report->line() << xi18nc("@info:progress", "Could not open file system on source partition %1 for copying.", sourcePartition().deviceNode()); else if (!copyTarget.open()) - report->line() << xi18nc("@info/plain", "Could not open file system on target partition %1 for copying.", targetPartition().deviceNode()); + report->line() << xi18nc("@info:progress", "Could not open file system on target partition %1 for copying.", targetPartition().deviceNode()); else { 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 { - return xi18nc("@info/plain", "Copy file system on partition %1 to partition %2", sourcePartition().deviceNode(), targetPartition().deviceNode()); + return xi18nc("@info:progress", "Copy file system on partition %1 to partition %2", sourcePartition().deviceNode(), targetPartition().deviceNode()); } diff --git a/src/jobs/createfilesystemjob.cpp b/src/jobs/createfilesystemjob.cpp index 35c9e23..293a269 100644 --- a/src/jobs/createfilesystemjob.cpp +++ b/src/jobs/createfilesystemjob.cpp @@ -63,15 +63,15 @@ bool CreateFileSystemJob::run(Report& parent) rval = true; backendPartitionTable->commit(); } else - report->line() << xi18nc("@info/plain", "Failed to set the system type for the file system on partition %1.", partition().deviceNode()); + report->line() << xi18nc("@info:progress", "Failed to set the system type for the file system on partition %1.", partition().deviceNode()); delete backendPartitionTable; } else - report->line() << xi18nc("@info/plain", "Could not open partition table on device %1 to set the system type for partition %2.", device().deviceNode(), partition().deviceNode()); + report->line() << xi18nc("@info:progress", "Could not open partition table on device %1 to set the system type for partition %2.", device().deviceNode(), partition().deviceNode()); delete backendDevice; } else - report->line() << xi18nc("@info/plain", "Could not open device %1 to set the system type for partition %2.", device().deviceNode(), partition().deviceNode()); + report->line() << xi18nc("@info:progress", "Could not open device %1 to set the system type for partition %2.", device().deviceNode(), partition().deviceNode()); } } @@ -82,5 +82,5 @@ bool CreateFileSystemJob::run(Report& parent) QString CreateFileSystemJob::description() const { - return xi18nc("@info/plain", "Create file system %1 on partition %2", partition().fileSystem().name(), partition().deviceNode()); + return xi18nc("@info:progress", "Create file system %1 on partition %2", partition().fileSystem().name(), partition().deviceNode()); } diff --git a/src/jobs/createpartitionjob.cpp b/src/jobs/createpartitionjob.cpp index a0b3ea5..87ad824 100644 --- a/src/jobs/createpartitionjob.cpp +++ b/src/jobs/createpartitionjob.cpp @@ -63,15 +63,15 @@ bool CreatePartitionJob::run(Report& parent) partition().setState(Partition::StateNone); backendPartitionTable->commit(); } else - report->line() << xi18nc("@info/plain", "Failed to add partition %1 to device %2.", partition().deviceNode(), device().deviceNode()); + report->line() << xi18nc("@info:progress", "Failed to add partition %1 to device %2.", partition().deviceNode(), device().deviceNode()); delete backendPartitionTable; } else - report->line() << xi18nc("@info/plain", "Could not open partition table on device %1 to create new partition %2.", device().deviceNode(), partition().deviceNode()); + report->line() << xi18nc("@info:progress", "Could not open partition table on device %1 to create new partition %2.", device().deviceNode(), partition().deviceNode()); delete backendDevice; } else - report->line() << xi18nc("@info/plain", "Could not open device %1 to create new partition %2.", device().deviceNode(), partition().deviceNode()); + report->line() << xi18nc("@info:progress", "Could not open device %1 to create new partition %2.", device().deviceNode(), partition().deviceNode()); jobFinished(*report, rval); @@ -81,7 +81,7 @@ bool CreatePartitionJob::run(Report& parent) QString CreatePartitionJob::description() const { if (partition().number() > 0) - return xi18nc("@info/plain", "Create new partition %1", partition().deviceNode()); + return xi18nc("@info:progress", "Create new partition %1", partition().deviceNode()); - return xi18nc("@info/plain", "Create new partition on device %1", device().deviceNode()); + return xi18nc("@info:progress", "Create new partition on device %1", device().deviceNode()); } diff --git a/src/jobs/createpartitiontablejob.cpp b/src/jobs/createpartitiontablejob.cpp index a7772e4..895382f 100644 --- a/src/jobs/createpartitiontablejob.cpp +++ b/src/jobs/createpartitiontablejob.cpp @@ -53,7 +53,7 @@ bool CreatePartitionTableJob::run(Report& parent) delete backendDevice; } else - report->line() << xi18nc("@info/plain", "Creating partition table failed: Could not open device %1.", device().deviceNode()); + report->line() << xi18nc("@info:progress", "Creating partition table failed: Could not open device %1.", device().deviceNode()); jobFinished(*report, rval); @@ -62,5 +62,5 @@ bool CreatePartitionTableJob::run(Report& parent) QString CreatePartitionTableJob::description() const { - return xi18nc("@info/plain", "Create new partition table on device %1", device().deviceNode()); + return xi18nc("@info:progress", "Create new partition table on device %1", device().deviceNode()); } diff --git a/src/jobs/deletefilesystemjob.cpp b/src/jobs/deletefilesystemjob.cpp index 60fc263..f719fa7 100644 --- a/src/jobs/deletefilesystemjob.cpp +++ b/src/jobs/deletefilesystemjob.cpp @@ -58,7 +58,7 @@ bool DeleteFileSystemJob::run(Report& parent) Report* report = jobStarted(parent); if (isMounted(partition().partitionPath())) { - report->line() << xi18nc("@info/plain", "Could not delete file system: file system on %1 is mounted.", partition().deviceNode()); + report->line() << xi18nc("@info:progress", "Could not delete file system: file system on %1 is mounted.", partition().deviceNode()); jobFinished(*report, rval); return false; } @@ -80,18 +80,18 @@ bool DeleteFileSystemJob::run(Report& parent) rval = backendPartitionTable->clobberFileSystem(*report, partition()); if (!rval) - report->line() << xi18nc("@info/plain", "Could not delete file system on %1.", partition().deviceNode()); + report->line() << xi18nc("@info:progress", "Could not delete file system on %1.", partition().deviceNode()); else backendPartitionTable->commit(); delete backendPartitionTable; } else - report->line() << xi18nc("@info/plain", "Could not open partition table on device %1 to delete file system on %2.", device().deviceNode(), partition().deviceNode()); + report->line() << xi18nc("@info:progress", "Could not open partition table on device %1 to delete file system on %2.", device().deviceNode(), partition().deviceNode()); delete backendDevice; } else - report->line() << xi18nc("@info/plain", "Could not delete file system signature for partition %1: Failed to open device %2.", partition().deviceNode(), device().deviceNode()); + report->line() << xi18nc("@info:progress", "Could not delete file system signature for partition %1: Failed to open device %2.", partition().deviceNode(), device().deviceNode()); } jobFinished(*report, rval); @@ -101,5 +101,5 @@ bool DeleteFileSystemJob::run(Report& parent) QString DeleteFileSystemJob::description() const { - return xi18nc("@info/plain", "Delete file system on %1", partition().deviceNode()); + return xi18nc("@info:progress", "Delete file system on %1", partition().deviceNode()); } diff --git a/src/jobs/deletepartitionjob.cpp b/src/jobs/deletepartitionjob.cpp index 7527c55..b7df76a 100644 --- a/src/jobs/deletepartitionjob.cpp +++ b/src/jobs/deletepartitionjob.cpp @@ -65,18 +65,18 @@ bool DeletePartitionJob::run(Report& parent) rval = backendPartitionTable->deletePartition(*report, partition()); if (!rval) - report->line() << xi18nc("@info/plain", "Could not delete partition %1.", partition().deviceNode()); + report->line() << xi18nc("@info:progress", "Could not delete partition %1.", partition().deviceNode()); else backendPartitionTable->commit(); delete backendPartitionTable; } else - report->line() << xi18nc("@info/plain", "Could not open partition table on device %1 to delete partition %2.", device().deviceNode(), partition().deviceNode()); + report->line() << xi18nc("@info:progress", "Could not open partition table on device %1 to delete partition %2.", device().deviceNode(), partition().deviceNode()); delete backendDevice; } else - report->line() << xi18nc("@info/plain", "Deleting partition failed: Could not open device %1.", device().deviceNode()); + report->line() << xi18nc("@info:progress", "Deleting partition failed: Could not open device %1.", device().deviceNode()); jobFinished(*report, rval); @@ -85,5 +85,5 @@ bool DeletePartitionJob::run(Report& parent) QString DeletePartitionJob::description() const { - return xi18nc("@info/plain", "Delete the partition %1", partition().deviceNode()); + return xi18nc("@info:progress", "Delete the partition %1", partition().deviceNode()); } diff --git a/src/jobs/job.cpp b/src/jobs/job.cpp index fa97d0b..716e256 100644 --- a/src/jobs/job.cpp +++ b/src/jobs/job.cpp @@ -43,7 +43,7 @@ bool Job::copyBlocks(Report& report, CopyTarget& target, CopySource& source) /** @todo copyBlocks() assumes that 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; } @@ -61,7 +61,7 @@ bool Job::copyBlocks(Report& report, CopyTarget& target, CopySource& source) 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; @@ -83,7 +83,7 @@ bool Job::copyBlocks(Report& report, CopyTarget& target, CopySource& source) if (percent % 5 == 0 && t.elapsed() > 1000) { const qint64 mibsPerSec = (blocksCopied * blockSize * source.sectorSize() / 1024 / 1024) / (t.elapsed() / 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); } @@ -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 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); @@ -111,7 +111,7 @@ bool Job::copyBlocks(Report& report, CopyTarget& target, CopySource& source) 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; } @@ -119,7 +119,7 @@ bool Job::copyBlocks(Report& report, CopyTarget& target, CopySource& source) bool Job::rollbackCopyBlocks(Report& report, CopyTarget& origTarget, CopySource& origSource) { 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; } @@ -143,24 +143,24 @@ bool Job::rollbackCopyBlocks(Report& report, CopyTarget& origTarget, CopySource& undoTargetLastSector = origSource.lastSector(); } - report.line() << i18nc("@info/plain", "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 from: First sector: %1, last sector: %2.", undoSourceFirstSector, undoSourceLastSector); + report.line() << xi18nc("@info:progress", "Rollback to: First sector: %1, last sector: %2.", undoTargetFirstSector, undoTargetLastSector); CopySourceDevice undoSource(ctd.device(), undoSourceFirstSector, undoSourceLastSector); if (!undoSource.open()) { - report.line() << xi18nc("@info/plain", "Could not open device %1 to rollback copying.", ctd.device().deviceNode()); + report.line() << xi18nc("@info:progress", "Could not open device %1 to rollback copying.", ctd.device().deviceNode()); return false; } CopyTargetDevice undoTarget(csd.device(), undoTargetFirstSector, undoTargetLastSector); if (!undoTarget.open()) { - report.line() << xi18nc("@info/plain", "Could not open device %1 to rollback copying.", csd.device().deviceNode()); + report.line() << xi18nc("@info:progress", "Could not open device %1 to rollback copying.", csd.device().deviceNode()); return false; } return copyBlocks(report, undoTarget, undoSource); } 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; @@ -175,7 +175,7 @@ Report* Job::jobStarted(Report& parent) { 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) @@ -184,7 +184,7 @@ void Job::jobFinished(Report& report, bool b) emit progress(numSteps()); 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 */ @@ -208,9 +208,9 @@ QIcon Job::statusIcon() const QString Job::statusText() const { static const QString s[] = { - i18nc("@info:progress job", "Pending"), - i18nc("@info:progress job", "Success"), - i18nc("@info:progress job", "Error") + xi18nc("@info:progress job", "Pending"), + xi18nc("@info:progress job", "Success"), + xi18nc("@info:progress job", "Error") }; Q_ASSERT(status() >= 0 && static_cast(status()) < sizeof(s) / sizeof(s[0])); diff --git a/src/jobs/movefilesystemjob.cpp b/src/jobs/movefilesystemjob.cpp index 1e8891b..5cd50f4 100644 --- a/src/jobs/movefilesystemjob.cpp +++ b/src/jobs/movefilesystemjob.cpp @@ -59,9 +59,9 @@ bool MoveFileSystemJob::run(Report& parent) CopyTargetDevice moveTarget(device(), newStart(), newStart() + partition().fileSystem().length()); if (!moveSource.open()) - report->line() << xi18nc("@info/plain", "Could not open file system on partition %1 for moving.", partition().deviceNode()); + report->line() << xi18nc("@info:progress", "Could not open file system on partition %1 for moving.", partition().deviceNode()); else if (!moveTarget.open()) - report->line() << xi18nc("@info/plain", "Could not create target for moving file system on partition %1.", partition().deviceNode()); + report->line() << xi18nc("@info:progress", "Could not create target for moving file system on partition %1.", partition().deviceNode()); else { rval = copyBlocks(*report, moveTarget, moveSource); @@ -70,9 +70,9 @@ bool MoveFileSystemJob::run(Report& parent) partition().fileSystem().setFirstSector(newStart()); partition().fileSystem().setLastSector(newStart() + savedLength); } else if (!rollbackCopyBlocks(*report, moveTarget, moveSource)) - report->line() << xi18nc("@info/plain", "Rollback for file system on partition %1 failed.", partition().deviceNode()); + report->line() << xi18nc("@info:progress", "Rollback for file system on partition %1 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 { - return xi18nc("@info/plain", "Move the file system on partition %1 to sector %2", partition().deviceNode(), newStart()); + return xi18nc("@info:progress", "Move the file system on partition %1 to sector %2", partition().deviceNode(), newStart()); } diff --git a/src/jobs/resizefilesystemjob.cpp b/src/jobs/resizefilesystemjob.cpp index 8cd4403..9f0ccff 100644 --- a/src/jobs/resizefilesystemjob.cpp +++ b/src/jobs/resizefilesystemjob.cpp @@ -70,17 +70,17 @@ bool ResizeFileSystemJob::run(Report& parent) Report* report = jobStarted(parent); if (partition().fileSystem().length() == newLength()) { - report->line() << xi18ncp("@info/plain", "The file system on partition %2 already has the requested length of 1 sector.", "The file system on partition %2 already has the requested length of %1 sectors.", newLength(), partition().deviceNode()); + report->line() << xi18ncp("@info:progress", "The file system on partition %2 already has the requested length of 1 sector.", "The file system on partition %2 already has the requested length of %1 sectors.", newLength(), partition().deviceNode()); rval = true; } 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(); switch (support) { case FileSystem::cmdSupportBackend: { 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); break; } @@ -92,7 +92,7 @@ bool ResizeFileSystemJob::run(Report& parent) } default: - report->line() << xi18nc("@info/plain", "The file system on partition %1 cannot be resized because there is no support for it.", partition().deviceNode()); + report->line() << xi18nc("@info:progress", "The file system on partition %1 cannot be resized because there is no support for it.", partition().deviceNode()); break; } @@ -120,17 +120,17 @@ bool ResizeFileSystemJob::resizeFileSystemBackend(Report& report) disconnect(CoreBackendManager::self()->backend(), &CoreBackend::progress, this, &ResizeFileSystemJob::progress); 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(); } delete backendPartitionTable; } else - report.line() << xi18nc("@info/plain", "Could not open partition %1 while trying to resize the file system.", partition().deviceNode()); + report.line() << xi18nc("@info:progress", "Could not open partition %1 while trying to resize the file system.", partition().deviceNode()); delete backendDevice; } else - report.line() << xi18nc("@info/plain", "Could not read geometry for partition %1 while trying to resize the file system.", partition().deviceNode()); + report.line() << xi18nc("@info:progress", "Could not read geometry for partition %1 while trying to resize the file system.", partition().deviceNode()); return rval; } @@ -138,7 +138,7 @@ bool ResizeFileSystemJob::resizeFileSystemBackend(Report& report) QString ResizeFileSystemJob::description() const { if (isMaximizing()) - return xi18nc("@info/plain", "Maximize file system on %1 to fill the partition", partition().deviceNode()); + return xi18nc("@info:progress", "Maximize file system on %1 to fill the partition", partition().deviceNode()); - return xi18ncp("@info/plain", "Resize file system on partition %2 to 1 sector", "Resize file system on partition %2 to %1 sectors", newLength(), partition().deviceNode()); + return xi18ncp("@info:progress", "Resize file system on partition %2 to 1 sector", "Resize file system on partition %2 to %1 sectors", newLength(), partition().deviceNode()); } diff --git a/src/jobs/restorefilesystemjob.cpp b/src/jobs/restorefilesystemjob.cpp index 934a721..60373dc 100644 --- a/src/jobs/restorefilesystemjob.cpp +++ b/src/jobs/restorefilesystemjob.cpp @@ -70,9 +70,9 @@ bool RestoreFileSystemJob::run(Report& parent) CopySourceFile copySource(fileName(), copyTarget.sectorSize()); if (!copySource.open()) - report->line() << xi18nc("@info/plain", "Could not open backup file %1 to restore from.", fileName()); + report->line() << xi18nc("@info:progress", "Could not open backup file %1 to restore from.", fileName()); else if (!copyTarget.open()) - report->line() << xi18nc("@info/plain", "Could not open target partition %1 to restore to.", targetPartition().deviceNode()); + report->line() << xi18nc("@info:progress", "Could not open target partition %1 to restore to.", targetPartition().deviceNode()); else { rval = copyBlocks(*report, copyTarget, copySource); @@ -97,7 +97,7 @@ bool RestoreFileSystemJob::run(Report& parent) 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 { - return xi18nc("@info/plain", "Restore the file system from file %1 to partition %2", fileName(), targetPartition().deviceNode()); + return xi18nc("@info:progress", "Restore the file system from file %1 to partition %2", fileName(), targetPartition().deviceNode()); } diff --git a/src/jobs/setfilesystemlabeljob.cpp b/src/jobs/setfilesystemlabeljob.cpp index d8eed23..8c36e23 100644 --- a/src/jobs/setfilesystemlabeljob.cpp +++ b/src/jobs/setfilesystemlabeljob.cpp @@ -47,7 +47,7 @@ bool SetFileSystemLabelJob::run(Report& parent) // 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. if (partition().fileSystem().supportSetLabel() == FileSystem::cmdSupportNone) - report->line() << xi18nc("@info/plain", "File system on partition %1 does not support setting labels. Job ignored.", partition().deviceNode()); + report->line() << xi18nc("@info:progress", "File system on partition %1 does not support setting labels. Job ignored.", partition().deviceNode()); else if (partition().fileSystem().supportSetLabel() == FileSystem::cmdSupportFileSystem) { rval = partition().fileSystem().writeLabel(*report, partition().deviceNode(), label()); @@ -62,5 +62,5 @@ bool SetFileSystemLabelJob::run(Report& parent) QString SetFileSystemLabelJob::description() const { - return xi18nc("@info/plain", "Set the file system label on partition %1 to \"%2\"", partition().deviceNode(), label()); + return xi18nc("@info:progress", "Set the file system label on partition %1 to \"%2\"", partition().deviceNode(), label()); } diff --git a/src/jobs/setpartflagsjob.cpp b/src/jobs/setpartflagsjob.cpp index 5c3f8e8..6e9f7ee 100644 --- a/src/jobs/setpartflagsjob.cpp +++ b/src/jobs/setpartflagsjob.cpp @@ -76,7 +76,7 @@ bool SetPartFlagsJob::run(Report& parent) const bool state = (flags() & f) ? true : false; if (!backendPartition->setFlag(*report, f, state)) { - report->line() << xi18nc("@info/plain", "There was an error setting flag %1 for partition %2 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 %2 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; } @@ -84,18 +84,18 @@ bool SetPartFlagsJob::run(Report& parent) delete backendPartition; } else - report->line() << xi18nc("@info/plain", "Could not find partition %1 on device %2 to set partition flags.", partition().deviceNode(), device().deviceNode()); + report->line() << xi18nc("@info:progress", "Could not find partition %1 on device %2 to set partition flags.", partition().deviceNode(), device().deviceNode()); if (rval) backendPartitionTable->commit(); delete backendPartitionTable; } else - report->line() << xi18nc("@info/plain", "Could not open partition table on device %1 to set partition flags for partition %2.", device().deviceNode(), partition().deviceNode()); + report->line() << xi18nc("@info:progress", "Could not open partition table on device %1 to set partition flags for partition %2.", device().deviceNode(), partition().deviceNode()); delete backendDevice; } else - report->line() << xi18nc("@info/plain", "Could not open device %1 to set partition flags for partition %2.", device().deviceNode(), partition().deviceNode()); + report->line() << xi18nc("@info:progress", "Could not open device %1 to set partition flags for partition %2.", device().deviceNode(), partition().deviceNode()); if (rval) partition().setFlags(flags()); @@ -108,7 +108,7 @@ bool SetPartFlagsJob::run(Report& parent) QString SetPartFlagsJob::description() const { if (PartitionTable::flagNames(flags()).size() == 0) - return xi18nc("@info/plain", "Clear flags for partition %1", partition().deviceNode()); + return xi18nc("@info:progress", "Clear flags for partition %1", partition().deviceNode()); - return xi18nc("@info/plain", "Set the flags for partition %1 to \"%2\"", partition().deviceNode(), PartitionTable::flagNames(flags()).join(QStringLiteral(","))); + return xi18nc("@info:progress", "Set the flags for partition %1 to \"%2\"", partition().deviceNode(), PartitionTable::flagNames(flags()).join(QStringLiteral(","))); } diff --git a/src/jobs/setpartgeometryjob.cpp b/src/jobs/setpartgeometryjob.cpp index 84c9d5e..2281ce4 100644 --- a/src/jobs/setpartgeometryjob.cpp +++ b/src/jobs/setpartgeometryjob.cpp @@ -73,7 +73,7 @@ bool SetPartGeometryJob::run(Report& parent) delete backendDevice; } else - report->line() << xi18nc("@info/plain", "Could not open device %1 while trying to resize/move partition %2.", device().deviceNode(), partition().deviceNode()); + report->line() << xi18nc("@info:progress", "Could not open device %1 while trying to resize/move partition %2.", device().deviceNode(), partition().deviceNode()); jobFinished(*report, rval); @@ -82,5 +82,5 @@ bool SetPartGeometryJob::run(Report& parent) QString SetPartGeometryJob::description() const { - return xi18nc("@info/plain", "Set geometry of partition %1: Start sector: %2, length: %3", partition().deviceNode(), newStart(), newLength()); + return xi18nc("@info:progress", "Set geometry of partition %1: Start sector: %2, length: %3", partition().deviceNode(), newStart(), newLength()); } diff --git a/src/jobs/shredfilesystemjob.cpp b/src/jobs/shredfilesystemjob.cpp index dc2cdf3..66f5b95 100644 --- a/src/jobs/shredfilesystemjob.cpp +++ b/src/jobs/shredfilesystemjob.cpp @@ -68,12 +68,12 @@ bool ShredFileSystemJob::run(Report& parent) CopySourceShred copySource(partition().capacity(), copyTarget.sectorSize(), m_RandomShred); 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()) - report->line() << xi18nc("@info/plain", "Could not open target partition %1 to restore to.", partition().deviceNode()); + report->line() << xi18nc("@info:progress", "Could not open target partition %1 to restore to.", partition().deviceNode()); else { 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 { - return xi18nc("@info/plain", "Shred the file system on %1", partition().deviceNode()); + return xi18nc("@info:progress", "Shred the file system on %1", partition().deviceNode()); } diff --git a/src/ops/backupoperation.cpp b/src/ops/backupoperation.cpp index 92fbb30..1cc42ff 100644 --- a/src/ops/backupoperation.cpp +++ b/src/ops/backupoperation.cpp @@ -46,7 +46,7 @@ BackupOperation::BackupOperation(Device& d, Partition& p, const QString& filenam QString BackupOperation::description() const { - return xi18nc("@info/plain", "Backup partition %1 (%2, %3) to %4", backupPartition().deviceNode(), Capacity::formatByteSize(backupPartition().capacity()), backupPartition().fileSystem().name(), fileName()); + return xi18nc("@info:status", "Backup partition %1 (%2, %3) to %4", backupPartition().deviceNode(), Capacity::formatByteSize(backupPartition().capacity()), backupPartition().fileSystem().name(), fileName()); } /** Can the given Partition be backed up? diff --git a/src/ops/checkoperation.cpp b/src/ops/checkoperation.cpp index b0a0331..8e9921a 100644 --- a/src/ops/checkoperation.cpp +++ b/src/ops/checkoperation.cpp @@ -57,7 +57,7 @@ bool CheckOperation::targets(const Partition& p) const QString CheckOperation::description() const { - return xi18nc("@info/plain", "Check and repair partition %1 (%2, %3)", checkedPartition().deviceNode(), Capacity::formatByteSize(checkedPartition().capacity()), checkedPartition().fileSystem().name()); + return xi18nc("@info:status", "Check and repair partition %1 (%2, %3)", checkedPartition().deviceNode(), Capacity::formatByteSize(checkedPartition().capacity()), checkedPartition().fileSystem().name()); } /** Can a Partition be checked? diff --git a/src/ops/copyoperation.cpp b/src/ops/copyoperation.cpp index 95f91d2..33451d3 100644 --- a/src/ops/copyoperation.cpp +++ b/src/ops/copyoperation.cpp @@ -154,30 +154,30 @@ bool CopyOperation::execute(Report& parent) // if maximizing doesn't work, just warn the user, don't fail if (!maximizeJob()->run(*report)) { - report->line() << xi18nc("@info/plain", "Warning: Maximizing file system on target partition %1 to the size of the partition failed.", copiedPartition().deviceNode()); + report->line() << xi18nc("@info:status", "Warning: Maximizing file system on target partition %1 to the size of the partition failed.", copiedPartition().deviceNode()); warning = true; } } else - report->line() << xi18nc("@info/plain", "Checking target partition %1 after copy failed.", copiedPartition().deviceNode()); + report->line() << xi18nc("@info:status", "Checking target partition %1 after copy failed.", copiedPartition().deviceNode()); } else { if (createPartitionJob()) { DeletePartitionJob deleteJob(targetDevice(), copiedPartition()); 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 - report->line() << i18nc("@info/plain", "Creating target partition for copying failed."); + report->line() << xi18nc("@info:status", "Creating target partition for copying failed."); } else - report->line() << xi18nc("@info/plain", "Checking source partition %1 failed.", sourcePartition().deviceNode()); + report->line() << xi18nc("@info:status", "Checking source partition %1 failed.", sourcePartition().deviceNode()); if (rval) setStatus(warning ? StatusFinishedWarning : StatusFinishedSuccess); else 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; } @@ -186,7 +186,7 @@ QString CopyOperation::updateDescription() const { if (overwrittenPartition()) { if (copiedPartition().length() == overwrittenPartition()->length()) - return xi18nc("@info/plain", "Copy partition %1 (%2, %3) to %4 (%5, %6)", + return xi18nc("@info:status", "Copy partition %1 (%2, %3) to %4 (%5, %6)", sourcePartition().deviceNode(), Capacity::formatByteSize(sourcePartition().capacity()), sourcePartition().fileSystem().name(), @@ -195,7 +195,7 @@ QString CopyOperation::updateDescription() const overwrittenPartition()->fileSystem().name() ); - return xi18nc("@info/plain", "Copy partition %1 (%2, %3) to %4 (%5, %6) and grow it to %7", + return xi18nc("@info:status", "Copy partition %1 (%2, %3) to %4 (%5, %6) and grow it to %7", sourcePartition().deviceNode(), Capacity::formatByteSize(sourcePartition().capacity()), sourcePartition().fileSystem().name(), @@ -207,7 +207,7 @@ QString CopyOperation::updateDescription() const } if (copiedPartition().length() == sourcePartition().length()) - return xi18nc("@info/plain", "Copy partition %1 (%2, %3) to unallocated space (starting at %4) on %5", + return xi18nc("@info:status", "Copy partition %1 (%2, %3) to unallocated space (starting at %4) on %5", sourcePartition().deviceNode(), Capacity::formatByteSize(sourcePartition().capacity()), sourcePartition().fileSystem().name(), @@ -215,7 +215,7 @@ QString CopyOperation::updateDescription() const targetDevice().deviceNode() ); - return xi18nc("@info/plain", "Copy partition %1 (%2, %3) to unallocated space (starting at %4) on %5 and grow it to %6", + return xi18nc("@info:status", "Copy partition %1 (%2, %3) to unallocated space (starting at %4) on %5 and grow it to %6", sourcePartition().deviceNode(), Capacity::formatByteSize(sourcePartition().capacity()), sourcePartition().fileSystem().name(), diff --git a/src/ops/createfilesystemoperation.cpp b/src/ops/createfilesystemoperation.cpp index f7123bc..7f32374 100644 --- a/src/ops/createfilesystemoperation.cpp +++ b/src/ops/createfilesystemoperation.cpp @@ -92,5 +92,5 @@ bool CreateFileSystemOperation::execute(Report& parent) QString CreateFileSystemOperation::description() const { - return xi18nc("@info/plain", "Create filesystem %1 on partition %2", newFileSystem()->name(), partition().deviceNode()); + return xi18nc("@info:status", "Create filesystem %1 on partition %2", newFileSystem()->name(), partition().deviceNode()); } diff --git a/src/ops/createpartitiontableoperation.cpp b/src/ops/createpartitiontableoperation.cpp index 61ab1bf..5929ce8 100644 --- a/src/ops/createpartitiontableoperation.cpp +++ b/src/ops/createpartitiontableoperation.cpp @@ -98,5 +98,5 @@ bool CreatePartitionTableOperation::canCreate(const Device* device) QString CreatePartitionTableOperation::description() const { - return xi18nc("@info/plain", "Create a new partition table (type: %1) on %2", partitionTable()->typeName(), targetDevice().deviceNode()); + return xi18nc("@info:status", "Create a new partition table (type: %1) on %2", partitionTable()->typeName(), targetDevice().deviceNode()); } diff --git a/src/ops/deleteoperation.cpp b/src/ops/deleteoperation.cpp index 8b8f996..551f253 100644 --- a/src/ops/deleteoperation.cpp +++ b/src/ops/deleteoperation.cpp @@ -90,9 +90,9 @@ void DeleteOperation::undo() QString DeleteOperation::description() const { if (shredAction() != NoShred) - return xi18nc("@info/plain", "Shred partition %1 (%2, %3)", deletedPartition().deviceNode(), Capacity::formatByteSize(deletedPartition().capacity()), deletedPartition().fileSystem().name()); + return xi18nc("@info:status", "Shred partition %1 (%2, %3)", deletedPartition().deviceNode(), Capacity::formatByteSize(deletedPartition().capacity()), deletedPartition().fileSystem().name()); else - return xi18nc("@info/plain", "Delete partition %1 (%2, %3)", deletedPartition().deviceNode(), Capacity::formatByteSize(deletedPartition().capacity()), deletedPartition().fileSystem().name()); + return xi18nc("@info:status", "Delete partition %1 (%2, %3)", deletedPartition().deviceNode(), Capacity::formatByteSize(deletedPartition().capacity()), deletedPartition().fileSystem().name()); } void DeleteOperation::checkAdjustLogicalNumbers(Partition& p, bool undo) diff --git a/src/ops/newoperation.cpp b/src/ops/newoperation.cpp index f11974b..b11f559 100644 --- a/src/ops/newoperation.cpp +++ b/src/ops/newoperation.cpp @@ -106,7 +106,7 @@ void NewOperation::undo() QString NewOperation::description() const { - return xi18nc("@info/plain", "Create a new partition (%1, %2) on %3", Capacity::formatByteSize(newPartition().capacity()), newPartition().fileSystem().name(), targetDevice().deviceNode()); + return xi18nc("@info:status", "Create a new partition (%1, %2) on %3", Capacity::formatByteSize(newPartition().capacity()), newPartition().fileSystem().name(), targetDevice().deviceNode()); } /** Can a Partition be created somewhere? diff --git a/src/ops/operation.cpp b/src/ops/operation.cpp index a34c061..e5db5e2 100644 --- a/src/ops/operation.cpp +++ b/src/ops/operation.cpp @@ -70,12 +70,12 @@ void Operation::removePreviewPartition(Device& device, Partition& p) QString Operation::statusText() const { static const QString s[] = { - i18nc("@info:progress operation", "None"), - i18nc("@info:progress operation", "Pending"), - i18nc("@info:progress operation", "Running"), - i18nc("@info:progress operation", "Success"), - i18nc("@info:progress operation", "Warning"), - i18nc("@info:progress operation", "Error") + xi18nc("@info:progress operation", "None"), + xi18nc("@info:progress operation", "Pending"), + xi18nc("@info:progress operation", "Running"), + xi18nc("@info:progress operation", "Success"), + xi18nc("@info:progress operation", "Warning"), + xi18nc("@info:progress operation", "Error") }; Q_ASSERT(status() >= 0 && static_cast(status()) < sizeof(s) / sizeof(s[0])); @@ -168,7 +168,7 @@ bool Operation::execute(Report& parent) 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; } diff --git a/src/ops/resizeoperation.cpp b/src/ops/resizeoperation.cpp index eda1019..97acc5c 100644 --- a/src/ops/resizeoperation.cpp +++ b/src/ops/resizeoperation.cpp @@ -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. if (moveExtendedJob()) { if (!(rval = moveExtendedJob()->run(*report))) - report->line() << xi18nc("@info/plain", "Moving extended partition %1 failed.", partition().deviceNode()); + report->line() << xi18nc("@info:status", "Moving extended partition %1 failed.", partition().deviceNode()); } else { // We run all three methods. Any of them returns true if it has nothing to do. rval = shrink(*report) && move(*report) && grow(*report); if (rval) { if (!(rval = checkResizedJob()->run(*report))) - report->line() << xi18nc("@info/plain", "Checking partition %1 after resize/move failed.", partition().deviceNode()); + report->line() << xi18nc("@info:status", "Checking partition %1 after resize/move failed.", partition().deviceNode()); } else - report->line() << xi18nc("@info/plain", "Resizing/moving partition %1 failed.", partition().deviceNode()); + report->line() << xi18nc("@info:status", "Resizing/moving partition %1 failed.", partition().deviceNode()); } } else - report->line() << xi18nc("@info/plain", "Checking partition %1 before resize/move failed.", partition().deviceNode()); + report->line() << xi18nc("@info:status", "Checking partition %1 before resize/move failed.", partition().deviceNode()); 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; } @@ -194,35 +194,35 @@ QString ResizeOperation::description() const switch (resizeAction()) { case MoveLeft: - return xi18nc("@info/plain describe resize/move action", "Move partition %1 to the left by %2", partition().deviceNode(), moveDelta); + return xi18nc("@info:status describe resize/move action", "Move partition %1 to the left by %2", partition().deviceNode(), moveDelta); case MoveRight: - return xi18nc("@info/plain describe resize/move action", "Move partition %1 to the right by %2", partition().deviceNode(), moveDelta); + return xi18nc("@info:status describe resize/move action", "Move partition %1 to the right by %2", partition().deviceNode(), moveDelta); case Grow: - return xi18nc("@info/plain describe resize/move action", "Grow partition %1 from %2 to %3", partition().deviceNode(), origCapacity, newCapacity); + return xi18nc("@info:status describe resize/move action", "Grow partition %1 from %2 to %3", partition().deviceNode(), origCapacity, newCapacity); case Shrink: - return xi18nc("@info/plain describe resize/move action", "Shrink partition %1 from %2 to %3", partition().deviceNode(), origCapacity, newCapacity); + return xi18nc("@info:status describe resize/move action", "Shrink partition %1 from %2 to %3", partition().deviceNode(), origCapacity, newCapacity); case MoveLeftGrow: - return xi18nc("@info/plain describe resize/move action", "Move partition %1 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 %1 to the left by %2 and grow it from %3 to %4", partition().deviceNode(), moveDelta, origCapacity, newCapacity); case MoveRightGrow: - return xi18nc("@info/plain describe resize/move action", "Move partition %1 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 %1 to the right by %2 and grow it from %3 to %4", partition().deviceNode(), moveDelta, origCapacity, newCapacity); case MoveLeftShrink: - return xi18nc("@info/plain describe resize/move action", "Move partition %1 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 %1 to the left by %2 and shrink it from %3 to %4", partition().deviceNode(), moveDelta, origCapacity, newCapacity); case MoveRightShrink: - return xi18nc("@info/plain describe resize/move action", "Move partition %1 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 %1 to the right by %2 and shrink it from %3 to %4", partition().deviceNode(), moveDelta, origCapacity, newCapacity); default: qWarning() << "Could not determine what to do with partition " << partition().deviceNode() << "."; 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 @@ -251,12 +251,12 @@ ResizeOperation::ResizeAction ResizeOperation::resizeAction() const bool ResizeOperation::shrink(Report& report) { if (shrinkResizeJob() && !shrinkResizeJob()->run(report)) { - report.line() << xi18nc("@info/plain", "Resize/move failed: Could not resize file system to shrink partition %1.", partition().deviceNode()); + report.line() << xi18nc("@info:status", "Resize/move failed: Could not resize file system to shrink partition %1.", partition().deviceNode()); return false; } if (shrinkSetGeomJob() && !shrinkSetGeomJob()->run(report)) { - report.line() << xi18nc("@info/plain", "Resize/move failed: Could not shrink partition %1.", partition().deviceNode()); + report.line() << xi18nc("@info:status", "Resize/move failed: Could not shrink partition %1.", partition().deviceNode()); return false; /** @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. const qint64 oldStart = partition().firstSector(); if (moveSetGeomJob() && !moveSetGeomJob()->run(report)) { - report.line() << xi18nc("@info/plain", "Moving partition %1 failed.", partition().deviceNode()); + report.line() << xi18nc("@info:status", "Moving partition %1 failed.", partition().deviceNode()); return false; } if (moveFileSystemJob() && !moveFileSystemJob()->run(report)) { - report.line() << xi18nc("@info/plain", "Moving the filesystem for partition %1 failed. Rolling back.", partition().deviceNode()); + report.line() << xi18nc("@info:status", "Moving the filesystem for partition %1 failed. Rolling back.", partition().deviceNode()); // see above: We now have to move back the partition itself. if (!SetPartGeometryJob(targetDevice(), partition(), oldStart, partition().length()).run(report)) - report.line() << xi18nc("@info/plain", "Moving back partition %1 to its original position failed.", partition().deviceNode()); + report.line() << xi18nc("@info:status", "Moving back partition %1 to its original position failed.", partition().deviceNode()); return false; } @@ -297,15 +297,15 @@ bool ResizeOperation::grow(Report& report) const qint64 oldLength = partition().length(); if (growSetGeomJob() && !growSetGeomJob()->run(report)) { - report.line() << xi18nc("@info/plain", "Resize/move failed: Could not grow partition %1.", partition().deviceNode()); + report.line() << xi18nc("@info:status", "Resize/move failed: Could not grow partition %1.", partition().deviceNode()); return false; } if (growResizeJob() && !growResizeJob()->run(report)) { - report.line() << xi18nc("@info/plain", "Resize/move failed: Could not resize the file system on partition %1", partition().deviceNode()); + report.line() << xi18nc("@info:status", "Resize/move failed: Could not resize the file system on partition %1", partition().deviceNode()); if (!SetPartGeometryJob(targetDevice(), partition(), partition().firstSector(), oldLength).run(report)) - report.line() << xi18nc("@info/plain", "Could not restore old partition size for partition %1.", partition().deviceNode()); + report.line() << xi18nc("@info:status", "Could not restore old partition size for partition %1.", partition().deviceNode()); return false; } diff --git a/src/ops/restoreoperation.cpp b/src/ops/restoreoperation.cpp index 56d98ee..de7459f 100644 --- a/src/ops/restoreoperation.cpp +++ b/src/ops/restoreoperation.cpp @@ -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 // warn the user. if ((warning = !maximizeJob()->run(*report))) - report->line() << xi18nc("@info/plain", "Warning: Maximizing file system on target partition %1 to the size of the partition failed.", restorePartition().deviceNode()); + report->line() << xi18nc("@info:status", "Maximizing file system on target partition %1 to the size of the partition failed.", restorePartition().deviceNode()); } else - report->line() << xi18nc("@info/plain", "Checking target file system on partition %1 after the restore failed.", restorePartition().deviceNode()); + report->line() << xi18nc("@info:status", "Checking target file system on partition %1 after the restore failed.", restorePartition().deviceNode()); } else { if (!overwrittenPartition()) DeletePartitionJob(targetDevice(), restorePartition()).run(*report); - report->line() << i18nc("@info/plain", "Restoring file system failed."); + report->line() << xi18nc("@info:status", "Restoring file system failed."); } } 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) setStatus(warning ? StatusFinishedWarning : StatusFinishedSuccess); else 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; } @@ -162,9 +162,9 @@ bool RestoreOperation::execute(Report& parent) QString RestoreOperation::description() const { if (overwrittenPartition()) - return xi18nc("@info/plain", "Restore partition from %1 to %2", fileName(), overwrittenPartition()->deviceNode()); + return xi18nc("@info:status", "Restore partition from %1 to %2", fileName(), overwrittenPartition()->deviceNode()); - return xi18nc("@info/plain", "Restore partition on %1 at %2 from %3", targetDevice().deviceNode(), Capacity::formatByteSize(restorePartition().firstSector() * targetDevice().logicalSectorSize()), fileName()); + return xi18nc("@info:status", "Restore partition on %1 at %2 from %3", targetDevice().deviceNode(), Capacity::formatByteSize(restorePartition().firstSector() * targetDevice().logicalSectorSize()), fileName()); } void RestoreOperation::setOverwrittenPartition(Partition* p) diff --git a/src/ops/setfilesystemlabeloperation.cpp b/src/ops/setfilesystemlabeloperation.cpp index f30df8b..ef6f8b7 100644 --- a/src/ops/setfilesystemlabeloperation.cpp +++ b/src/ops/setfilesystemlabeloperation.cpp @@ -66,7 +66,7 @@ void SetFileSystemLabelOperation::undo() QString SetFileSystemLabelOperation::description() const { if (oldLabel().isEmpty()) - return xi18nc("@info/plain", "Set label for partition %1 to \"%2\"", labeledPartition().deviceNode(), newLabel()); + return xi18nc("@info:status", "Set label for partition %1 to \"%2\"", labeledPartition().deviceNode(), newLabel()); - return xi18nc("@info/plain", "Set label for partition %1 from \"%2\" to \"%3\"", labeledPartition().deviceNode(), oldLabel(), newLabel()); + return xi18nc("@info:status", "Set label for partition %1 from \"%2\" to \"%3\"", labeledPartition().deviceNode(), oldLabel(), newLabel()); } diff --git a/src/ops/setpartflagsoperation.cpp b/src/ops/setpartflagsoperation.cpp index 1ad9c7b..f392d7f 100644 --- a/src/ops/setpartflagsoperation.cpp +++ b/src/ops/setpartflagsoperation.cpp @@ -70,7 +70,7 @@ void SetPartFlagsOperation::undo() QString SetPartFlagsOperation::description() const { if (PartitionTable::flagNames(newFlags()).size() == 0) - return xi18nc("@info/plain", "Clear flags for partition %1", flagPartition().deviceNode()); + return xi18nc("@info:status", "Clear flags for partition %1", flagPartition().deviceNode()); - return xi18nc("@info/plain", "Set flags for partition %1 to \"%2\"", flagPartition().deviceNode(), PartitionTable::flagNames(newFlags()).join(QStringLiteral(","))); + return xi18nc("@info:status", "Set flags for partition %1 to \"%2\"", flagPartition().deviceNode(), PartitionTable::flagNames(newFlags()).join(QStringLiteral(","))); } diff --git a/src/plugins/libparted/libpartedbackend.cpp b/src/plugins/libparted/libpartedbackend.cpp index c7aa68c..45e8c65 100644 --- a/src/plugins/libparted/libpartedbackend.cpp +++ b/src/plugins/libparted/libpartedbackend.cpp @@ -86,7 +86,7 @@ static QString s_lastPartedExceptionMessage; */ 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); return PED_EXCEPTION_UNHANDLED; } @@ -433,11 +433,11 @@ Device* LibPartedBackend::scanDevice(const QString& device_node) PedDevice* pedDevice = ped_device_get(device_node.toLocal8Bit().constData()); if (pedDevice == nullptr) { - Log(Log::warning) << xi18nc("@info/plain", "Could not access device %1", device_node); + Log(Log::warning) << xi18nc("@info:status", "Could not access device %1", device_node); 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); diff --git a/src/plugins/libparted/libparteddevice.cpp b/src/plugins/libparted/libparteddevice.cpp index c07277e..0c26540 100644 --- a/src/plugins/libparted/libparteddevice.cpp +++ b/src/plugins/libparted/libparteddevice.cpp @@ -92,21 +92,21 @@ bool LibPartedDevice::createPartitionTable(Report& report, const PartitionTable& PedDiskType* pedDiskType = ped_disk_type_get(ptable.typeName().toLatin1().constData()); if (pedDiskType == nullptr) { - report.line() << xi18nc("@info/plain", "Creating partition table failed: Could not retrieve partition table type \"%1\" for %2.", ptable.typeName(), deviceNode()); + report.line() << xi18nc("@info:progress", "Creating partition table failed: Could not retrieve partition table type \"%1\" for %2.", ptable.typeName(), deviceNode()); return false; } PedDevice* dev = ped_device_get(deviceNode().toLatin1().constData()); if (dev == nullptr) { - report.line() << xi18nc("@info/plain", "Creating partition table failed: Could not open backend device %1.", deviceNode()); + report.line() << xi18nc("@info:progress", "Creating partition table failed: Could not open backend device %1.", deviceNode()); return false; } PedDisk* disk = ped_disk_new_fresh(dev, pedDiskType); if (disk == nullptr) { - report.line() << xi18nc("@info/plain", "Creating partition table failed: Could not create a new partition table in the backend for device %1.", deviceNode()); + report.line() << xi18nc("@info:progress", "Creating partition table failed: Could not create a new partition table in the backend for device %1.", deviceNode()); return false; } diff --git a/src/plugins/libparted/libpartedpartition.cpp b/src/plugins/libparted/libpartedpartition.cpp index d7af323..1b24f40 100644 --- a/src/plugins/libparted/libpartedpartition.cpp +++ b/src/plugins/libparted/libpartedpartition.cpp @@ -37,7 +37,7 @@ bool LibPartedPartition::setFlag(Report& report, PartitionTable::Flag partitionM // ignore flags that don't exist for this partition 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; } diff --git a/src/plugins/libparted/libpartedpartitiontable.cpp b/src/plugins/libparted/libpartedpartitiontable.cpp index 9f5f4c6..fc44dc0 100644 --- a/src/plugins/libparted/libpartedpartitiontable.cpp +++ b/src/plugins/libparted/libpartedpartitiontable.cpp @@ -148,7 +148,7 @@ QString LibPartedPartitionTable::createPartition(Report& report, const Partition pedType = PED_PARTITION_NORMAL; if (pedType == static_cast(0xffffffff)) { - report.line() << xi18nc("@info/plain", "Unknown partition role for new partition %1 (roles: %2)", partition.deviceNode(), partition.roles().toString()); + report.line() << xi18nc("@info:progress", "Unknown partition role for new partition %1 (roles: %2)", partition.deviceNode(), partition.roles().toString()); 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()); if (pedPartition == nullptr) { - report.line() << xi18nc("@info/plain", "Failed to create new partition %1.", partition.deviceNode()); + report.line() << xi18nc("@info:progress", "Failed to create new partition %1.", partition.deviceNode()); return QString(); } @@ -169,7 +169,7 @@ QString LibPartedPartitionTable::createPartition(Report& report, const Partition ped_geometry_destroy(pedGeometry); 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(); } @@ -179,7 +179,7 @@ QString LibPartedPartitionTable::createPartition(Report& report, const Partition free(pedPath); } else { - report.line() << xi18nc("@info/plain", "Failed to add partition %1 to device %2.", partition.deviceNode(), QString::fromUtf8(pedDisk()->dev->path)); + report.line() << xi18nc("@info:progress", "Failed to add partition %1 to device %2.", partition.deviceNode(), QString::fromUtf8(pedDisk()->dev->path)); report.line() << LibPartedBackend::lastPartedExceptionMessage(); } @@ -202,9 +202,9 @@ bool LibPartedPartitionTable::deletePartition(Report& report, const Partition& p rval = ped_disk_delete_partition(pedDisk(), pedPartition); if (!rval) - report.line() << xi18nc("@info/plain", "Could not delete partition %1.", partition.deviceNode()); + report.line() << xi18nc("@info:progress", "Could not delete partition %1.", partition.deviceNode()); } else - report.line() << xi18nc("@info/plain", "Deleting partition failed: Partition to delete (%1) not found on disk.", partition.deviceNode()); + report.line() << xi18nc("@info:progress", "Deleting partition failed: Partition to delete (%1) not found on disk.", partition.deviceNode()); 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)) rval = true; else - report.line() << xi18nc("@info/plain", "Could not set geometry for partition %1 while trying to resize/move it.", partition.deviceNode()); + report.line() << xi18nc("@info:progress", "Could not set geometry for partition %1 while trying to resize/move it.", partition.deviceNode()); ped_constraint_destroy(pedConstraint); } else - report.line() << xi18nc("@info/plain", "Could not get constraint for partition %1 while trying to resize/move it.", partition.deviceNode()); + report.line() << xi18nc("@info:progress", "Could not get constraint for partition %1 while trying to resize/move it.", partition.deviceNode()); ped_geometry_destroy(pedGeometry); } else - report.line() << xi18nc("@info/plain", "Could not get geometry for partition %1 while trying to resize/move it.", partition.deviceNode()); + report.line() << xi18nc("@info:progress", "Could not get geometry for partition %1 while trying to resize/move it.", partition.deviceNode()); } else - report.line() << xi18nc("@info/plain", "Could not open partition %1 while trying to resize/move it.", partition.deviceNode()); + report.line() << xi18nc("@info:progress", "Could not open partition %1 while trying to resize/move it.", partition.deviceNode()); return rval; } @@ -255,14 +255,14 @@ bool LibPartedPartitionTable::clobberFileSystem(Report& report, const Partition& rval = ped_geometry_write(&pedPartition->geom, zeroes, 0, 129); if (!rval) - report.line() << xi18nc("@info/plain", "Failed to erase filesystem signature on partition %1.", partition.deviceNode()); + report.line() << xi18nc("@info:progress", "Failed to erase filesystem signature on partition %1.", partition.deviceNode()); ped_device_close(pedDevice()); } } else rval = true; } else - report.line() << xi18nc("@info/plain", "Could not delete file system on partition %1: Failed to get partition.", partition.deviceNode()); + report.line() << xi18nc("@info:progress", "Could not delete file system on partition %1: Failed to get partition.", partition.deviceNode()); return rval; } @@ -287,17 +287,17 @@ bool LibPartedPartitionTable::resizeFileSystem(Report& report, const Partition& ped_timer_destroy(pedTimer); if (!rval) - report.line() << xi18nc("@info/plain", "Could not resize file system on partition %1.", partition.deviceNode()); + report.line() << xi18nc("@info:progress", "Could not resize file system on partition %1.", partition.deviceNode()); ped_geometry_destroy(resizedGeometry); } else - report.line() << xi18nc("@info/plain", "Could not get geometry for resized partition %1 while trying to resize the file system.", partition.deviceNode()); + report.line() << xi18nc("@info:progress", "Could not get geometry for resized partition %1 while trying to resize the file system.", partition.deviceNode()); ped_file_system_close(pedFileSystem); } else - report.line() << xi18nc("@info/plain", "Could not open partition %1 while trying to resize the file system.", partition.deviceNode()); + report.line() << xi18nc("@info:progress", "Could not open partition %1 while trying to resize the file system.", partition.deviceNode()); ped_geometry_destroy(originalGeometry); } else - report.line() << xi18nc("@info/plain", "Could not read geometry for partition %1 while trying to resize the file system.", partition.deviceNode()); + report.line() << xi18nc("@info:progress", "Could not read geometry for partition %1 while trying to resize the file system.", partition.deviceNode()); #else Q_UNUSED(report); Q_UNUSED(partition); @@ -316,7 +316,7 @@ FileSystem::Type LibPartedPartitionTable::detectFileSystemBySector(Report& repor if (pedPartition && pedPath) type = CoreBackendManager::self()->backend()->detectFileSystem(QString::fromUtf8(pedPath)); else - report.line() << xi18nc("@info/plain", "Could not determine file system of partition at sector %1 on device %2.", sector, device.deviceNode()); + report.line() << xi18nc("@info:progress", "Could not determine file system of partition at sector %1 on device %2.", sector, device.deviceNode()); free(pedPath); 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()); if (pedFsType == nullptr) { - report.line() << xi18nc("@info/plain", "Could not update the system type for partition %1.", partition.deviceNode()); - report.line() << xi18nc("@info/plain", "No file system defined."); + report.line() << xi18nc("@info:progress", "Could not update the system type for partition %1.", partition.deviceNode()); + report.line() << xi18nc("@info:progress", "No file system defined."); return false; } PedPartition* pedPartition = ped_disk_get_partition_by_sector(pedDisk(), partition.firstSector()); if (pedPartition == nullptr) { - report.line() << xi18nc("@info/plain", "Could not update the system type for partition %1.", partition.deviceNode()); - report.line() << xi18nc("@info/plain", "No partition found at sector %1.", partition.firstSector()); + report.line() << xi18nc("@info:progress", "Could not update the system type for partition %1.", partition.deviceNode()); + report.line() << xi18nc("@info:progress", "No partition found at sector %1.", partition.firstSector()); return false; } diff --git a/src/util/capacity.cpp b/src/util/capacity.cpp index 069b197..092f91e 100644 --- a/src/util/capacity.cpp +++ b/src/util/capacity.cpp @@ -109,19 +109,19 @@ qint64 Capacity::unitFactor(Unit from, Unit to) QString Capacity::unitName(Unit u, qint64 val) { static QString unitNames[] = { - i18ncp("@info/plain unit", "Byte", "Bytes", val), - i18nc("@info/plain unit", "KiB"), - i18nc("@info/plain unit", "MiB"), - i18nc("@info/plain unit", "GiB"), - i18nc("@info/plain unit", "TiB"), - i18nc("@info/plain unit", "PiB"), - i18nc("@info/plain unit", "EiB"), - i18nc("@info/plain unit", "ZiB"), - i18nc("@info/plain unit", "YiB") + xi18ncp("@item:intext unit", "Byte", "Bytes", val), + xi18nc("@item:intext unit", "KiB"), + xi18nc("@item:intext unit", "MiB"), + xi18nc("@item:intext unit", "GiB"), + xi18nc("@item:intext unit", "TiB"), + xi18nc("@item:intext unit", "PiB"), + xi18nc("@item:intext unit", "EiB"), + xi18nc("@item:intext unit", "ZiB"), + xi18nc("@item:intext unit", "YiB") }; if (static_cast(u) >= sizeof(unitNames) / sizeof(unitNames[0])) - return i18nc("@info/plain unit", "(unknown unit)"); + return xi18nc("@item:intext unit", "(unknown unit)"); return unitNames[u]; } diff --git a/src/util/externalcommand.cpp b/src/util/externalcommand.cpp index 7f43b57..9fe8e0e 100644 --- a/src/util/externalcommand.cpp +++ b/src/util/externalcommand.cpp @@ -76,13 +76,13 @@ bool ExternalCommand::start(int timeout) QProcess::start(command(), args()); 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 (report()) - report()->line() << i18nc("@info/plain", "(Command timeout while starting)"); + report()->line() << xi18nc("@info:status", "(Command timeout while starting)"); return false; } @@ -99,7 +99,7 @@ bool ExternalCommand::waitFor(int timeout) if (!waitForFinished(timeout)) { if (report()) - report()->line() << i18nc("@info/plain", "(Command timeout while running)"); + report()->line() << xi18nc("@info:status", "(Command timeout while running)"); return false; } diff --git a/src/util/helpers.cpp b/src/util/helpers.cpp index 192fdcf..0ac2f0c 100644 --- a/src/util/helpers.cpp +++ b/src/util/helpers.cpp @@ -44,7 +44,7 @@ bool caseInsensitiveLessThan(const QString& s1, const QString& s2) void showColumnsContextMenu(const QPoint& p, QTreeWidget& tree) { - QMenu headerMenu(i18nc("@title:menu", "Columns")); + QMenu headerMenu(xi18nc("@title:menu", "Columns")); QHeaderView* header = tree.header();