Verified Commit 26d34d48 authored by Daniel Vrátil's avatar Daniel Vrátil 🤖
Browse files

ETM: add context to localized strings

parent dab3cbb2
......@@ -199,7 +199,7 @@ QVariant EntityTreeModel::entityData(const Collection &collection, int column, i
if (const QString displayName = collection.displayName(); !displayName.isEmpty()) {
return displayName;
} else {
return i18n("Loading...");
return i18nc("@info:status", "Loading...");
}
}
break;
......@@ -494,7 +494,7 @@ bool EntityTreeModel::dropMimeData(const QMimeData *data, Qt::DropAction action,
const QStringList collectionNames = d->childCollectionNames(destCollection);
if (collectionNames.contains(collectionName)) {
QMessageBox::critical(nullptr, i18n("Error"),
QMessageBox::critical(nullptr, i18nc("@window:title", "Error"),
i18n("The target collection '%1' contains already\na collection with name '%2'.",
destCollection.name(), collection.name()));
return false;
......
......@@ -1357,20 +1357,17 @@ void EntityTreeModelPrivate::pasteJobDone(KJob *job)
if (job->error()) {
QString errorMsg;
if (qobject_cast<ItemCopyJob *>(job)) {
errorMsg = i18n("Could not copy item:");
errorMsg = i18nc("@info", "Could not copy item: <message>%1</message>", job->errorString());
} else if (qobject_cast<CollectionCopyJob *>(job)) {
errorMsg = i18n("Could not copy collection:");
errorMsg = i18nc("@info", "Could not copy collection: <message>%1</message>", job->errorString());
} else if (qobject_cast<ItemMoveJob *>(job)) {
errorMsg = i18n("Could not move item:");
errorMsg = i18nc("@info", "Could not move item: <message>%1</message>", job->errorString());
} else if (qobject_cast<CollectionMoveJob *>(job)) {
errorMsg = i18n("Could not move collection:");
errorMsg = i18nc("@info", "Could not move collection: <message>%1</message>", job->errorString());
} else if (qobject_cast<LinkJob *>(job)) {
errorMsg = i18n("Could not link entity:");
errorMsg = i18nc("@info", "Could not link entity: <message>%1</message>", job->errorString());
}
errorMsg += QLatin1Char(' ') + job->errorString();
QMessageBox::critical(nullptr, i18n("Error"), errorMsg);
QMessageBox::critical(nullptr, i18nc("@title:window", "Error"), errorMsg);
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment