Improve semantic markup of translations.

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

View File

@ -106,7 +106,7 @@ bool OperationStack::mergeNewOperation(Operation*& currentOp, Operation*& pushed
// -- 1 --
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 && &copyOp->copiedPartition() == &pushedCopyOp->sourcePartition()) {
Log() << i18nc("@info/plain", "Copying a partition that is itself a copy: Copying the original source partition instead.");
Log() << xi18nc("@info:status", "Copying a partition that is itself a copy: Copying the original source partition instead.");
pushedCopyOp->setSourcePartition(&copyOp->sourcePartition());
}
@ -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<SetPartFlagsOperation*>(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<SetFileSystemLabelOperation*>(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<CreatePartitionTableOperation*>(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<CreatePartitionTableOperation*>(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);

View File

@ -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();
}

View File

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

View File

@ -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");
}

View File

@ -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)

View File

@ -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;
}

View File

@ -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!");
}
}

View File

@ -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 <filename>%1</filename> failed: Could not create temp dir.", deviceNode);
report.line() << xi18nc("@info:progress", "Resizing Btrfs file system on partition <filename>%1</filename> failed: Could not create temp dir.", deviceNode);
return false;
}
@ -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 <filename>%1</filename> failed: btrfs file system resize failed.", deviceNode);
report.line() << xi18nc("@info:progress", "Resizing Btrfs file system on partition <filename>%1</filename> failed: btrfs file system resize failed.", deviceNode);
ExternalCommand unmountCmd(report, QStringLiteral("umount"), { tempDir.path() });
if (!unmountCmd.run(-1) && unmountCmd.exitCode() == 0)
report.line() << xi18nc("@info/plain", "Warning: Resizing Btrfs file system on partition <filename>%1</filename>: Unmount failed.", deviceNode);
report.line() << xi18nc("@info:progress", "Warning: Resizing Btrfs file system on partition <filename>%1</filename>: Unmount failed.", deviceNode);
} else
report.line() << xi18nc("@info/plain", "Resizing Btrfs file system on partition <filename>%1</filename> failed: Initial mount failed.", deviceNode);
report.line() << xi18nc("@info:progress", "Resizing Btrfs file system on partition <filename>%1</filename> failed: Initial mount failed.", deviceNode);
return rval;
}

View File

@ -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 <filename>%1</filename> to %2", deviceNode, newLabel);
report.line() << xi18nc("@info:progress", "Setting label for partition <filename>%1</filename> to %2", deviceNode, newLabel);
ExternalCommand cmd(report, QStringLiteral("fatlabel"), { deviceNode, newLabel });
return cmd.run(-1) && cmd.exitCode() == 0;

View File

@ -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::Type> 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.

View File

@ -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 <filename>%1</filename> failed: Could not create temp dir.", deviceNode);
report.line() << xi18nc("@info:progress", "Resizing JFS file system on partition <filename>%1</filename> failed: Could not create temp dir.", deviceNode);
return false;
}
@ -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 <filename>%1</filename> failed: Remount failed.", deviceNode);
report.line() << xi18nc("@info:progress", "Resizing JFS file system on partition <filename>%1</filename> failed: Remount failed.", deviceNode);
ExternalCommand unmountCmd(report, QStringLiteral("umount"), { tempDir.path() });
if (!unmountCmd.run(-1))
report.line() << xi18nc("@info/plain", "Warning: Resizing JFS file system on partition <filename>%1</filename>: Unmount failed.", deviceNode);
report.line() << xi18nc("@info:progress", "Warning: Resizing JFS file system on partition <filename>%1</filename>: Unmount failed.", deviceNode);
} else
report.line() << xi18nc("@info/plain", "Resizing JFS file system on partition <filename>%1</filename> failed: Initial mount failed.", deviceNode);
report.line() << xi18nc("@info:progress", "Resizing JFS file system on partition <filename>%1</filename> failed: Initial mount failed.", deviceNode);
return rval;
}

View File

@ -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 {

View File

@ -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 <filename>%1</filename>.", deviceNode);
report.line() << xi18nc("@info:progress", "Resizing LUKS crypt on partition <filename>%1</filename>.", deviceNode);
if (cryptResizeCmd.run(-1) && cryptResizeCmd.exitCode() == 0)
{
@ -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 <filename>%1</filename>.", deviceNode);
report.line() << xi18nc("@info:progress", "Resizing LUKS crypt on partition <filename>%1</filename>.", deviceNode);
if (cryptResizeCmd.run(-1) && cryptResizeCmd.exitCode() == 0)
{
return true;
}
}
report.line() << xi18nc("@info/plain", "Resizing encrypted file system on partition <filename>%1</filename> failed.", deviceNode);
report.line() << xi18nc("@info:progress", "Resizing encrypted file system on partition <filename>%1</filename> failed.", deviceNode);
return false;
}

View File

@ -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 <filename>%1</filename> failed: Could not create temp dir.", deviceNode);
report.line() << xi18nc("@info:progress", "Resizing NILFS2 file system on partition <filename>%1</filename> failed: Could not create temp dir.", deviceNode);
return false;
}
@ -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 <filename>%1</filename> failed: NILFS2 file system resize failed.", deviceNode);
report.line() << xi18nc("@info:progress", "Resizing NILFS2 file system on partition <filename>%1</filename> failed: NILFS2 file system resize failed.", deviceNode);
ExternalCommand unmountCmd(report, QStringLiteral("umount"), { tempDir.path() });
if (!unmountCmd.run(-1) && unmountCmd.exitCode() == 0)
report.line() << xi18nc("@info/plain", "Warning: Resizing NILFS2 file system on partition <filename>%1</filename>: Unmount failed.", deviceNode);
report.line() << xi18nc("@info:progress", "Warning: Resizing NILFS2 file system on partition <filename>%1</filename>: Unmount failed.", deviceNode);
} else
report.line() << xi18nc("@info/plain", "Resizing NILFS2 file system on partition <filename>%1</filename> failed: Initial mount failed.", deviceNode);
report.line() << xi18nc("@info:progress", "Resizing NILFS2 file system on partition <filename>%1</filename> failed: Initial mount failed.", deviceNode);
return rval;
}

View File

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

View File

@ -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 <filename>%1</filename> failed: Could not create temp dir.", deviceNode);
report.line() << xi18nc("@info:progress", "Resizing XFS file system on partition <filename>%1</filename> failed: Could not create temp dir.", deviceNode);
return false;
}
@ -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 <filename>%1</filename> failed: xfs_growfs failed.", deviceNode);
report.line() << xi18nc("@info:progress", "Resizing XFS file system on partition <filename>%1</filename> failed: xfs_growfs failed.", deviceNode);
ExternalCommand unmountCmd(report, QStringLiteral("umount"), { tempDir.path() });
if (!unmountCmd.run(-1))
report.line() << xi18nc("@info/plain", "Warning: Resizing XFS file system on partition <filename>%1</filename>: Unmount failed.", deviceNode);
report.line() << xi18nc("@info:progress", "Warning: Resizing XFS file system on partition <filename>%1</filename>: Unmount failed.", deviceNode);
} else
report.line() << xi18nc("@info/plain", "Resizing XFS file system on partition <filename>%1</filename> failed: Initial mount failed.", deviceNode);
report.line() << xi18nc("@info:progress", "Resizing XFS file system on partition <filename>%1</filename> failed: Initial mount failed.", deviceNode);
return rval;
}

View File

@ -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 <filename>%1</filename> for backup.", sourcePartition().deviceNode());
report->line() << xi18nc("@info:progress", "Could not open file system on source partition <filename>%1</filename> for backup.", sourcePartition().deviceNode());
else if (!copyTarget.open())
report->line() << xi18nc("@info/plain", "Could not create backup file <filename>%1</filename>.", fileName());
report->line() << xi18nc("@info:progress", "Could not create backup file <filename>%1</filename>.", fileName());
else
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 <filename>%1</filename> to <filename>%2</filename>", sourcePartition().deviceNode(), fileName());
return xi18nc("@info:progress", "Back up file system on partition <filename>%1</filename> to <filename>%2</filename>", sourcePartition().deviceNode(), fileName());
}

View File

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

View File

@ -56,7 +56,7 @@ bool CopyFileSystemJob::run(Report& parent)
Report* report = jobStarted(parent);
if (targetPartition().fileSystem().length() < sourcePartition().fileSystem().length())
report->line() << xi18nc("@info/plain", "Cannot copy file system: File system on target partition <filename>%1</filename> is smaller than the file system on source partition <filename>%2</filename>.", targetPartition().deviceNode(), sourcePartition().deviceNode());
report->line() << xi18nc("@info:progress", "Cannot copy file system: File system on target partition <filename>%1</filename> is smaller than the file system on source partition <filename>%2</filename>.", targetPartition().deviceNode(), sourcePartition().deviceNode());
else if (sourcePartition().fileSystem().supportCopy() == FileSystem::cmdSupportFileSystem)
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 <filename>%1</filename> for copying.", sourcePartition().deviceNode());
report->line() << xi18nc("@info:progress", "Could not open file system on source partition <filename>%1</filename> for copying.", sourcePartition().deviceNode());
else if (!copyTarget.open())
report->line() << xi18nc("@info/plain", "Could not open file system on target partition <filename>%1</filename> for copying.", targetPartition().deviceNode());
report->line() << xi18nc("@info:progress", "Could not open file system on target partition <filename>%1</filename> for copying.", targetPartition().deviceNode());
else {
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 <filename>%1</filename> to partition <filename>%2</filename>", sourcePartition().deviceNode(), targetPartition().deviceNode());
return xi18nc("@info:progress", "Copy file system on partition <filename>%1</filename> to partition <filename>%2</filename>", sourcePartition().deviceNode(), targetPartition().deviceNode());
}

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -43,7 +43,7 @@ bool Job::copyBlocks(Report& report, CopyTarget& target, CopySource& source)
/** @todo copyBlocks() assumes that source.sectorSize() == target.sectorSize(). */
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 <filename>%1</filename> to rollback copying.", ctd.device().deviceNode());
report.line() << xi18nc("@info:progress", "Could not open device <filename>%1</filename> to rollback copying.", ctd.device().deviceNode());
return false;
}
CopyTargetDevice undoTarget(csd.device(), undoTargetFirstSector, undoTargetLastSector);
if (!undoTarget.open()) {
report.line() << xi18nc("@info/plain", "Could not open device <filename>%1</filename> to rollback copying.", csd.device().deviceNode());
report.line() << xi18nc("@info:progress", "Could not open device <filename>%1</filename> to rollback copying.", csd.device().deviceNode());
return false;
}
return 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<quint32>(status()) < sizeof(s) / sizeof(s[0]));

View File

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

View File

@ -70,17 +70,17 @@ bool ResizeFileSystemJob::run(Report& parent)
Report* report = jobStarted(parent);
if (partition().fileSystem().length() == newLength()) {
report->line() << xi18ncp("@info/plain", "The file system on partition <filename>%2</filename> already has the requested length of 1 sector.", "The file system on partition <filename>%2</filename> already has the requested length of %1 sectors.", newLength(), partition().deviceNode());
report->line() << xi18ncp("@info:progress", "The file system on partition <filename>%2</filename> already has the requested length of 1 sector.", "The file system on partition <filename>%2</filename> already has the requested length of %1 sectors.", newLength(), partition().deviceNode());
rval = true;
} 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 <filename>%1</filename> cannot be resized because there is no support for it.", partition().deviceNode());
report->line() << xi18nc("@info:progress", "The file system on partition <filename>%1</filename> cannot be resized because there is no support for it.", partition().deviceNode());
break;
}
@ -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 <filename>%1</filename> while trying to resize the file system.", partition().deviceNode());
report.line() << xi18nc("@info:progress", "Could not open partition <filename>%1</filename> while trying to resize the file system.", partition().deviceNode());
delete backendDevice;
} else
report.line() << xi18nc("@info/plain", "Could not read geometry for partition <filename>%1</filename> while trying to resize the file system.", partition().deviceNode());
report.line() << xi18nc("@info:progress", "Could not read geometry for partition <filename>%1</filename> while trying to resize the file system.", partition().deviceNode());
return rval;
}
@ -138,7 +138,7 @@ bool ResizeFileSystemJob::resizeFileSystemBackend(Report& report)
QString ResizeFileSystemJob::description() const
{
if (isMaximizing())
return xi18nc("@info/plain", "Maximize file system on <filename>%1</filename> to fill the partition", partition().deviceNode());
return xi18nc("@info:progress", "Maximize file system on <filename>%1</filename> to fill the partition", partition().deviceNode());
return xi18ncp("@info/plain", "Resize file system on partition <filename>%2</filename> to 1 sector", "Resize file system on partition <filename>%2</filename> to %1 sectors", newLength(), partition().deviceNode());
return xi18ncp("@info:progress", "Resize file system on partition <filename>%2</filename> to 1 sector", "Resize file system on partition <filename>%2</filename> to %1 sectors", newLength(), partition().deviceNode());
}

View File

@ -70,9 +70,9 @@ bool RestoreFileSystemJob::run(Report& parent)
CopySourceFile copySource(fileName(), copyTarget.sectorSize());
if (!copySource.open())
report->line() << xi18nc("@info/plain", "Could not open backup file <filename>%1</filename> to restore from.", fileName());
report->line() << xi18nc("@info:progress", "Could not open backup file <filename>%1</filename> to restore from.", fileName());
else if (!copyTarget.open())
report->line() << xi18nc("@info/plain", "Could not open target partition <filename>%1</filename> to restore to.", targetPartition().deviceNode());
report->line() << xi18nc("@info:progress", "Could not open target partition <filename>%1</filename> to restore to.", targetPartition().deviceNode());
else {
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 <filename>%1</filename> to partition <filename>%2</filename>", fileName(), targetPartition().deviceNode());
return xi18nc("@info:progress", "Restore the file system from file <filename>%1</filename> to partition <filename>%2</filename>", fileName(), targetPartition().deviceNode());
}

View File

@ -47,7 +47,7 @@ bool SetFileSystemLabelJob::run(Report& parent)
// just ignore the request and say all is well. This helps in operations because
// 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 <filename>%1</filename> does not support setting labels. Job ignored.", partition().deviceNode());
report->line() << xi18nc("@info:progress", "File system on partition <filename>%1</filename> does not support setting labels. Job ignored.", partition().deviceNode());
else if (partition().fileSystem().supportSetLabel() == FileSystem::cmdSupportFileSystem) {
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 <filename>%1</filename> to \"%2\"", partition().deviceNode(), label());
return xi18nc("@info:progress", "Set the file system label on partition <filename>%1</filename> to \"%2\"", partition().deviceNode(), label());
}

View File

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

View File

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

View File

@ -68,12 +68,12 @@ bool ShredFileSystemJob::run(Report& parent)
CopySourceShred copySource(partition().capacity(), copyTarget.sectorSize(), m_RandomShred);
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 <filename>%1</filename> to restore to.", partition().deviceNode());
report->line() << xi18nc("@info:progress", "Could not open target partition <filename>%1</filename> to restore to.", partition().deviceNode());
else {
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 <filename>%1</filename>", partition().deviceNode());
return xi18nc("@info:progress", "Shred the file system on <filename>%1</filename>", partition().deviceNode());
}

View File

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

View File

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

View File

@ -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 <filename>%1</filename> to the size of the partition failed.", copiedPartition().deviceNode());
report->line() << xi18nc("@info:status", "Warning: Maximizing file system on target partition <filename>%1</filename> to the size of the partition failed.", copiedPartition().deviceNode());
warning = true;
}
} else
report->line() << xi18nc("@info/plain", "Checking target partition <filename>%1</filename> after copy failed.", copiedPartition().deviceNode());
report->line() << xi18nc("@info:status", "Checking target partition <filename>%1</filename> after copy failed.", copiedPartition().deviceNode());
} else {
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 <filename>%1</filename> failed.", sourcePartition().deviceNode());
report->line() << xi18nc("@info:status", "Checking source partition <filename>%1</filename> 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 <filename>%1</filename> (%2, %3) to <filename>%4</filename> (%5, %6)",
return xi18nc("@info:status", "Copy partition <filename>%1</filename> (%2, %3) to <filename>%4</filename> (%5, %6)",
sourcePartition().deviceNode(),
Capacity::formatByteSize(sourcePartition().capacity()),
sourcePartition().fileSystem().name(),
@ -195,7 +195,7 @@ QString CopyOperation::updateDescription() const
overwrittenPartition()->fileSystem().name()
);
return xi18nc("@info/plain", "Copy partition <filename>%1</filename> (%2, %3) to <filename>%4</filename> (%5, %6) and grow it to %7",
return xi18nc("@info:status", "Copy partition <filename>%1</filename> (%2, %3) to <filename>%4</filename> (%5, %6) and grow it to %7",
sourcePartition().deviceNode(),
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 <filename>%1</filename> (%2, %3) to unallocated space (starting at %4) on <filename>%5</filename>",
return xi18nc("@info:status", "Copy partition <filename>%1</filename> (%2, %3) to unallocated space (starting at %4) on <filename>%5</filename>",
sourcePartition().deviceNode(),
Capacity::formatByteSize(sourcePartition().capacity()),
sourcePartition().fileSystem().name(),
@ -215,7 +215,7 @@ QString CopyOperation::updateDescription() const
targetDevice().deviceNode()
);
return xi18nc("@info/plain", "Copy partition <filename>%1</filename> (%2, %3) to unallocated space (starting at %4) on <filename>%5</filename> and grow it to %6",
return xi18nc("@info:status", "Copy partition <filename>%1</filename> (%2, %3) to unallocated space (starting at %4) on <filename>%5</filename> and grow it to %6",
sourcePartition().deviceNode(),
Capacity::formatByteSize(sourcePartition().capacity()),
sourcePartition().fileSystem().name(),

View File

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

View File

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

View File

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

View File

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

View File

@ -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<quint32>(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;
}

View File

@ -152,23 +152,23 @@ bool ResizeOperation::execute(Report& parent)
// they might temporarily be outside the extended partition and the backend would not let us do that.
if (moveExtendedJob()) {
if (!(rval = moveExtendedJob()->run(*report)))
report->line() << xi18nc("@info/plain", "Moving extended partition <filename>%1</filename> failed.", partition().deviceNode());
report->line() << xi18nc("@info:status", "Moving extended partition <filename>%1</filename> failed.", partition().deviceNode());
} else {
// 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 <filename>%1</filename> after resize/move failed.", partition().deviceNode());
report->line() << xi18nc("@info:status", "Checking partition <filename>%1</filename> after resize/move failed.", partition().deviceNode());
} else
report->line() << xi18nc("@info/plain", "Resizing/moving partition <filename>%1</filename> failed.", partition().deviceNode());
report->line() << xi18nc("@info:status", "Resizing/moving partition <filename>%1</filename> failed.", partition().deviceNode());
}
} else
report->line() << xi18nc("@info/plain", "Checking partition <filename>%1</filename> before resize/move failed.", partition().deviceNode());
report->line() << xi18nc("@info:status", "Checking partition <filename>%1</filename> before resize/move failed.", partition().deviceNode());
setStatus(rval ? StatusFinishedSuccess : StatusError);
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 <filename>%1</filename> to the left by %2", partition().deviceNode(), moveDelta);
return xi18nc("@info:status describe resize/move action", "Move partition <filename>%1</filename> to the left by %2", partition().deviceNode(), moveDelta);
case MoveRight:
return xi18nc("@info/plain describe resize/move action", "Move partition <filename>%1</filename> to the right by %2", partition().deviceNode(), moveDelta);
return xi18nc("@info:status describe resize/move action", "Move partition <filename>%1</filename> to the right by %2", partition().deviceNode(), moveDelta);
case Grow:
return xi18nc("@info/plain describe resize/move action", "Grow partition <filename>%1</filename> from %2 to %3", partition().deviceNode(), origCapacity, newCapacity);
return xi18nc("@info:status describe resize/move action", "Grow partition <filename>%1</filename> from %2 to %3", partition().deviceNode(), origCapacity, newCapacity);
case Shrink:
return xi18nc("@info/plain describe resize/move action", "Shrink partition <filename>%1</filename> from %2 to %3", partition().deviceNode(), origCapacity, newCapacity);
return xi18nc("@info:status describe resize/move action", "Shrink partition <filename>%1</filename> from %2 to %3", partition().deviceNode(), origCapacity, newCapacity);
case MoveLeftGrow:
return xi18nc("@info/plain describe resize/move action", "Move partition <filename>%1</filename> to the left by %2 and grow it from %3 to %4", partition().deviceNode(), moveDelta, origCapacity, newCapacity);
return xi18nc("@info:status describe resize/move action", "Move partition <filename>%1</filename> to the left by %2 and grow it from %3 to %4", partition().deviceNode(), moveDelta, origCapacity, newCapacity);
case MoveRightGrow:
return xi18nc("@info/plain describe resize/move action", "Move partition <filename>%1</filename> to the right by %2 and grow it from %3 to %4", partition().deviceNode(), moveDelta, origCapacity, newCapacity);
return xi18nc("@info:status describe resize/move action", "Move partition <filename>%1</filename> to the right by %2 and grow it from %3 to %4", partition().deviceNode(), moveDelta, origCapacity, newCapacity);
case MoveLeftShrink:
return xi18nc("@info/plain describe resize/move action", "Move partition <filename>%1</filename> to the left by %2 and shrink it from %3 to %4", partition().deviceNode(), moveDelta, origCapacity, newCapacity);
return xi18nc("@info:status describe resize/move action", "Move partition <filename>%1</filename> to the left by %2 and shrink it from %3 to %4", partition().deviceNode(), moveDelta, origCapacity, newCapacity);
case MoveRightShrink:
return xi18nc("@info/plain describe resize/move action", "Move partition <filename>%1</filename> to the right by %2 and shrink it from %3 to %4", partition().deviceNode(), moveDelta, origCapacity, newCapacity);
return xi18nc("@info:status describe resize/move action", "Move partition <filename>%1</filename> to the right by %2 and shrink it from %3 to %4", partition().deviceNode(), moveDelta, origCapacity, newCapacity);
default:
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 <filename>%1</filename>.", partition().deviceNode());
report.line() << xi18nc("@info:status", "Resize/move failed: Could not resize file system to shrink partition <filename>%1</filename>.", partition().deviceNode());
return false;
}
if (shrinkSetGeomJob() && !shrinkSetGeomJob()->run(report)) {
report.line() << xi18nc("@info/plain", "Resize/move failed: Could not shrink partition <filename>%1</filename>.", partition().deviceNode());
report.line() << xi18nc("@info:status", "Resize/move failed: Could not shrink partition <filename>%1</filename>.", partition().deviceNode());
return false;
/** @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 <filename>%1</filename> failed.", partition().deviceNode());
report.line() << xi18nc("@info:status", "Moving partition <filename>%1</filename> failed.", partition().deviceNode());
return false;
}
if (moveFileSystemJob() && !moveFileSystemJob()->run(report)) {
report.line() << xi18nc("@info/plain", "Moving the filesystem for partition <filename>%1</filename> failed. Rolling back.", partition().deviceNode());
report.line() << xi18nc("@info:status", "Moving the filesystem for partition <filename>%1</filename> failed. Rolling back.", partition().deviceNode());
// see above: We now have to move back the partition itself.
if (!SetPartGeometryJob(targetDevice(), partition(), oldStart, partition().length()).run(report))
report.line() << xi18nc("@info/plain", "Moving back partition <filename>%1</filename> to its original position failed.", partition().deviceNode());
report.line() << xi18nc("@info:status", "Moving back partition <filename>%1</filename> to its original position failed.", partition().deviceNode());
return false;
}
@ -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 <filename>%1</filename>.", partition().deviceNode());
report.line() << xi18nc("@info:status", "Resize/move failed: Could not grow partition <filename>%1</filename>.", 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 <filename>%1</filename>", partition().deviceNode());
report.line() << xi18nc("@info:status", "Resize/move failed: Could not resize the file system on partition <filename>%1</filename>", partition().deviceNode());
if (!SetPartGeometryJob(targetDevice(), partition(), partition().firstSector(), oldLength).run(report))
report.line() << xi18nc("@info/plain", "Could not restore old partition size for partition <filename>%1</filename>.", partition().deviceNode());
report.line() << xi18nc("@info:status", "Could not restore old partition size for partition <filename>%1</filename>.", partition().deviceNode());
return false;
}

View File

@ -137,24 +137,24 @@ bool RestoreOperation::execute(Report& parent)
// or the image length, whichever is larger. If this fails, don't return an error, just
// warn the user.
if ((warning = !maximizeJob()->run(*report)))
report->line() << xi18nc("@info/plain", "Warning: Maximizing file system on target partition <filename>%1</filename> to the size of the partition failed.", restorePartition().deviceNode());
report->line() << xi18nc("@info:status", "<warning>Maximizing file system on target partition <filename>%1</filename> to the size of the partition failed.</warning>", restorePartition().deviceNode());
} else
report->line() << xi18nc("@info/plain", "Checking target file system on partition <filename>%1</filename> after the restore failed.", restorePartition().deviceNode());
report->line() << xi18nc("@info:status", "Checking target file system on partition <filename>%1</filename> after the restore failed.", restorePartition().deviceNode());
} else {
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 <filename>%1</filename> to <filename>%2</filename>", fileName(), overwrittenPartition()->deviceNode());
return xi18nc("@info:status", "Restore partition from <filename>%1</filename> to <filename>%2</filename>", fileName(), overwrittenPartition()->deviceNode());
return xi18nc("@info/plain", "Restore partition on <filename>%1</filename> at %2 from <filename>%3</filename>", targetDevice().deviceNode(), Capacity::formatByteSize(restorePartition().firstSector() * targetDevice().logicalSectorSize()), fileName());
return xi18nc("@info:status", "Restore partition on <filename>%1</filename> at %2 from <filename>%3</filename>", targetDevice().deviceNode(), Capacity::formatByteSize(restorePartition().firstSector() * targetDevice().logicalSectorSize()), fileName());
}
void RestoreOperation::setOverwrittenPartition(Partition* p)

View File

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

View File

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

View File

@ -86,7 +86,7 @@ static QString s_lastPartedExceptionMessage;
*/
static PedExceptionOption pedExceptionHandler(PedException* e)
{
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 <filename>%1</filename>", device_node);
Log(Log::warning) << xi18nc("@info:status", "Could not access device <filename>%1</filename>", 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);

View File

@ -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 <filename>%2</filename>.", ptable.typeName(), deviceNode());
report.line() << xi18nc("@info:progress", "Creating partition table failed: Could not retrieve partition table type \"%1\" for <filename>%2</filename>.", ptable.typeName(), deviceNode());
return false;
}
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 <filename>%1</filename>.", deviceNode());
report.line() << xi18nc("@info:progress", "Creating partition table failed: Could not open backend device <filename>%1</filename>.", 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 <filename>%1</filename>.", deviceNode());
report.line() << xi18nc("@info:progress", "Creating partition table failed: Could not create a new partition table in the backend for device <filename>%1</filename>.", deviceNode());
return false;
}

View File

@ -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;
}

View File

@ -148,7 +148,7 @@ QString LibPartedPartitionTable::createPartition(Report& report, const Partition
pedType = PED_PARTITION_NORMAL;
if (pedType == static_cast<int>(0xffffffff)) {
report.line() << xi18nc("@info/plain", "Unknown partition role for new partition <filename>%1</filename> (roles: %2)", partition.deviceNode(), partition.roles().toString());
report.line() << xi18nc("@info:progress", "Unknown partition role for new partition <filename>%1</filename> (roles: %2)", partition.deviceNode(), partition.roles().toString());
return QString();
}
@ -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 <filename>%1</filename>.", partition.deviceNode());
report.line() << xi18nc("@info:progress", "Failed to create new partition <filename>%1</filename>.", 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 <filename>%1</filename> to device <filename>%2</filename>.", partition.deviceNode(), QString::fromUtf8(pedDisk()->dev->path));
report.line() << xi18nc("@info:progress", "Failed to add partition <filename>%1</filename> to device <filename>%2</filename>.", partition.deviceNode(), QString::fromUtf8(pedDisk()->dev->path));
report.line() << LibPartedBackend::lastPartedExceptionMessage();
}
@ -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 <filename>%1</filename>.", partition.deviceNode());
report.line() << xi18nc("@info:progress", "Could not delete partition <filename>%1</filename>.", partition.deviceNode());
} else
report.line() << xi18nc("@info/plain", "Deleting partition failed: Partition to delete (<filename>%1</filename>) not found on disk.", partition.deviceNode());
report.line() << xi18nc("@info:progress", "Deleting partition failed: Partition to delete (<filename>%1</filename>) not found on disk.", partition.deviceNode());
return rval;
}
@ -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 <filename>%1</filename> while trying to resize/move it.", partition.deviceNode());
report.line() << xi18nc("@info:progress", "Could not set geometry for partition <filename>%1</filename> while trying to resize/move it.", partition.deviceNode());
ped_constraint_destroy(pedConstraint);
} else
report.line() << xi18nc("@info/plain", "Could not get constraint for partition <filename>%1</filename> while trying to resize/move it.", partition.deviceNode());
report.line() << xi18nc("@info:progress", "Could not get constraint for partition <filename>%1</filename> while trying to resize/move it.", partition.deviceNode());
ped_geometry_destroy(pedGeometry);
} else
report.line() << xi18nc("@info/plain", "Could not get geometry for partition <filename>%1</filename> while trying to resize/move it.", partition.deviceNode());
report.line() << xi18nc("@info:progress", "Could not get geometry for partition <filename>%1</filename> while trying to resize/move it.", partition.deviceNode());
} else
report.line() << xi18nc("@info/plain", "Could not open partition <filename>%1</filename> while trying to resize/move it.", partition.deviceNode());
report.line() << xi18nc("@info:progress", "Could not open partition <filename>%1</filename> while trying to resize/move it.", partition.deviceNode());
return rval;
}
@ -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 <filename>%1</filename>.", partition.deviceNode());
report.line() << xi18nc("@info:progress", "Failed to erase filesystem signature on partition <filename>%1</filename>.", partition.deviceNode());
ped_device_close(pedDevice());
}
} else
rval = true;
} else
report.line() << xi18nc("@info/plain", "Could not delete file system on partition <filename>%1</filename>: Failed to get partition.", partition.deviceNode());
report.line() << xi18nc("@info:progress", "Could not delete file system on partition <filename>%1</filename>: Failed to get partition.", partition.deviceNode());
return rval;
}
@ -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 <filename>%1</filename>.", partition.deviceNode());
report.line() << xi18nc("@info:progress", "Could not resize file system on partition <filename>%1</filename>.", partition.deviceNode());
ped_geometry_destroy(resizedGeometry);
} else
report.line() << xi18nc("@info/plain", "Could not get geometry for resized partition <filename>%1</filename> while trying to resize the file system.", partition.deviceNode());
report.line() << xi18nc("@info:progress", "Could not get geometry for resized partition <filename>%1</filename> while trying to resize the file system.", partition.deviceNode());
ped_file_system_close(pedFileSystem);
} else
report.line() << xi18nc("@info/plain", "Could not open partition <filename>%1</filename> while trying to resize the file system.", partition.deviceNode());
report.line() << xi18nc("@info:progress", "Could not open partition <filename>%1</filename> while trying to resize the file system.", partition.deviceNode());
ped_geometry_destroy(originalGeometry);
} else
report.line() << xi18nc("@info/plain", "Could not read geometry for partition <filename>%1</filename> while trying to resize the file system.", partition.deviceNode());
report.line() << xi18nc("@info:progress", "Could not read geometry for partition <filename>%1</filename> while trying to resize the file system.", partition.deviceNode());
#else
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 <filename>%2</filename>.", sector, device.deviceNode());
report.line() << xi18nc("@info:progress", "Could not determine file system of partition at sector %1 on device <filename>%2</filename>.", sector, device.deviceNode());
free(pedPath);
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 <filename>%1</filename>.", partition.deviceNode());
report.line() << xi18nc("@info/plain", "No file system defined.");
report.line() << xi18nc("@info:progress", "Could not update the system type for partition <filename>%1</filename>.", 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 <filename>%1</filename>.", 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 <filename>%1</filename>.", partition.deviceNode());
report.line() << xi18nc("@info:progress", "No partition found at sector %1.", partition.firstSector());
return false;
}

View File

@ -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<quint32>(u) >= sizeof(unitNames) / sizeof(unitNames[0]))
return i18nc("@info/plain unit", "(unknown unit)");
return xi18nc("@item:intext unit", "(unknown unit)");
return unitNames[u];
}

View File

@ -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;
}

View File

@ -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();