summaryrefslogtreecommitdiffstats
path: root/tools/archivegen
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/archivegen
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/archivegen')
-rw-r--r--tools/archivegen/archive.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/tools/archivegen/archive.cpp b/tools/archivegen/archive.cpp
index b6ae31bfa..5a8f25f1f 100644
--- a/tools/archivegen/archive.cpp
+++ b/tools/archivegen/archive.cpp
@@ -39,6 +39,7 @@
#include <QCoreApplication>
#include <QCommandLineParser>
+#include <QDir>
#include <iostream>
@@ -82,19 +83,19 @@ private:
HRESULT OpenResult(const wchar_t *file, HRESULT result, const wchar_t*) {
if (result != S_OK) {
- printBlock(QCoreApplication::translate("archivegen", "Cannot update file: '%1'. "
- "Unsuporrted archive.").arg(QString::fromWCharArray(file)), Q_NULLPTR);
+ printBlock(QCoreApplication::translate("archivegen", "Cannot update file \"%1\". "
+ "Unsupported archive.").arg(QDir::toNativeSeparators(QString::fromWCharArray(file))), Q_NULLPTR);
}
return result;
}
HRESULT OpenFileError(const wchar_t *file, DWORD) {
- printBlock(QCoreApplication::translate("archivegen", "Cannot open file: "), file);
+ printBlock(QCoreApplication::translate("archivegen", "Cannot open file "), file);
return S_FALSE;
}
HRESULT CanNotFindError(const wchar_t *file, DWORD) {
- printBlock(QCoreApplication::translate("archivegen", "Cannot find file: "), file);
+ printBlock(QCoreApplication::translate("archivegen", "Cannot find file "), file);
return S_FALSE;
}
@@ -185,7 +186,7 @@ int main(int argc, char *argv[])
const int value = parser.value(compression).toInt(&ok);
if (!ok || (std::find(std::begin(values), std::end(values), value) == std::end(values))) {
throw QInstaller::Error(QCoreApplication::translate("archivegen",
- "Unknown compression level '%1'. See 'archivgen --help'.").arg(value));
+ "Unknown compression level \"%1\". See 'archivgen --help'.").arg(value));
}
Lib7z::initSevenZ();