summaryrefslogtreecommitdiffstats
path: root/tools/devtool/binarydump.cpp
diff options
context:
space:
mode:
authorKai Koehne <kai.koehne@theqtcompany.com>2015-06-24 10:15:16 +0200
committerKai Koehne <kai.koehne@theqtcompany.com>2015-06-24 09:22:42 +0000
commit1e589e37a991b29076e9a661f92dfa178421c208 (patch)
treeccdae70edb75b1bc17f0efc61086e16554e3f4eb /tools/devtool/binarydump.cpp
parent65a5d4d33c7dcb27ce99ce59535733a28991c544 (diff)
Unify translated error messages
* Enclose file paths in "" * Localize file paths with QDir::toNativeSeparators. * Make sure sentences end with a '.' * Append error details always by ':', e.g. tr("Failed to copy file '%1': %2").(...) * Use 'directory' instead of 'folder' everywhere Change-Id: Ie045f429f72ad5045c96537465c5fb9d2e99d250 Reviewed-by: Karsten Heimrich <karsten.heimrich@theqtcompany.com>
Diffstat (limited to 'tools/devtool/binarydump.cpp')
-rw-r--r--tools/devtool/binarydump.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/tools/devtool/binarydump.cpp b/tools/devtool/binarydump.cpp
index a0ff4f74e..f8bb23996 100644
--- a/tools/devtool/binarydump.cpp
+++ b/tools/devtool/binarydump.cpp
@@ -48,14 +48,14 @@ int BinaryDump::dump(const QInstaller::ResourceCollectionManager &manager, const
QDir targetDir(QFileInfo(target).absoluteFilePath());
if (targetDir.exists()) {
if (!targetDir.entryList(QDir::NoDotAndDotDot | QDir::AllEntries).isEmpty()) {
- std::cerr << qPrintable(QString::fromLatin1("Target directory '%1' already exists and "
- "is not empty.").arg(targetDir.path())) << std::endl;
+ std::cerr << qPrintable(QString::fromLatin1("Target directory \"%1\" already exists and "
+ "is not empty.").arg(QDir::toNativeSeparators(targetDir.path()))) << std::endl;
return EXIT_FAILURE;
}
} else {
if (!QDir().mkpath(targetDir.path())) {
- std::cerr << qPrintable(QString::fromLatin1("Could not create '%1'.").arg(targetDir
- .path())) << std::endl;
+ std::cerr << qPrintable(QString::fromLatin1("Cannot create \"%1\".").arg(
+ QDir::toNativeSeparators(targetDir.path()))) << std::endl;
return EXIT_FAILURE;
}
}
@@ -69,8 +69,8 @@ int BinaryDump::dump(const QInstaller::ResourceCollectionManager &manager, const
}
if (!targetDir.cd(QLatin1String("metadata"))) {
- std::cerr << qPrintable(QString::fromLatin1("Could not switch to '%1/metadata'.")
- .arg(targetDir.path())) << std::endl;
+ std::cerr << qPrintable(QString::fromLatin1("Cannot switch to \"%1/metadata\".")
+ .arg(QDir::toNativeSeparators(targetDir.path()))) << std::endl;
return EXIT_FAILURE;
}
@@ -82,8 +82,8 @@ int BinaryDump::dump(const QInstaller::ResourceCollectionManager &manager, const
QString error;
QDomDocument doc;
if (!doc.setContent(&updatesXml, &error)) {
- throw QInstaller::Error(QString::fromLatin1("Could not read: '%1'. %2").arg(updatesXml
- .fileName(), error));
+ throw QInstaller::Error(QString::fromLatin1("Cannot read: \"%1\": %2").arg(
+ QDir::toNativeSeparators(updatesXml.fileName()), error));
}
QHash<QString, QString> versionMap;
@@ -114,7 +114,7 @@ int BinaryDump::dump(const QInstaller::ResourceCollectionManager &manager, const
continue;
if (!targetDir.mkpath(name)) {
- throw QInstaller::Error(QString::fromLatin1("Could not create target dir: %1.")
+ throw QInstaller::Error(QString::fromLatin1("Cannot create target dir: %1.")
.arg(targetDir.filePath(name)));
}