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 ...@@ -199,7 +199,7 @@ QVariant EntityTreeModel::entityData(const Collection &collection, int column, i
if (const QString displayName = collection.displayName(); !displayName.isEmpty()) { if (const QString displayName = collection.displayName(); !displayName.isEmpty()) {
return displayName; return displayName;
} else { } else {
return i18n("Loading..."); return i18nc("@info:status", "Loading...");
} }
} }
break; break;
...@@ -494,7 +494,7 @@ bool EntityTreeModel::dropMimeData(const QMimeData *data, Qt::DropAction action, ...@@ -494,7 +494,7 @@ bool EntityTreeModel::dropMimeData(const QMimeData *data, Qt::DropAction action,
const QStringList collectionNames = d->childCollectionNames(destCollection); const QStringList collectionNames = d->childCollectionNames(destCollection);
if (collectionNames.contains(collectionName)) { 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'.", i18n("The target collection '%1' contains already\na collection with name '%2'.",
destCollection.name(), collection.name())); destCollection.name(), collection.name()));
return false; return false;
......
...@@ -1357,20 +1357,17 @@ void EntityTreeModelPrivate::pasteJobDone(KJob *job) ...@@ -1357,20 +1357,17 @@ void EntityTreeModelPrivate::pasteJobDone(KJob *job)
if (job->error()) { if (job->error()) {
QString errorMsg; QString errorMsg;
if (qobject_cast<ItemCopyJob *>(job)) { 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)) { } 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)) { } 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)) { } 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)) { } else if (qobject_cast<LinkJob *>(job)) {
errorMsg = i18n("Could not link entity:"); errorMsg = i18nc("@info", "Could not link entity: <message>%1</message>", job->errorString());
} }
QMessageBox::critical(nullptr, i18nc("@title:window", "Error"), errorMsg);
errorMsg += QLatin1Char(' ') + job->errorString();
QMessageBox::critical(nullptr, i18n("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