diff options
author | Kai Koehne <kai.koehne@theqtcompany.com> | 2015-06-24 10:15:16 +0200 |
---|---|---|
committer | Kai Koehne <kai.koehne@theqtcompany.com> | 2015-06-24 09:22:42 +0000 |
commit | 1e589e37a991b29076e9a661f92dfa178421c208 (patch) | |
tree | ccdae70edb75b1bc17f0efc61086e16554e3f4eb /src/libs/installer/link.cpp | |
parent | 65a5d4d33c7dcb27ce99ce59535733a28991c544 (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 'src/libs/installer/link.cpp')
-rw-r--r-- | src/libs/installer/link.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/libs/installer/link.cpp b/src/libs/installer/link.cpp index 9462f5358..f90a6d3c1 100644 --- a/src/libs/installer/link.cpp +++ b/src/libs/installer/link.cpp @@ -94,7 +94,7 @@ public: OPEN_EXISTING, FILE_FLAG_OPEN_REPARSE_POINT | FILE_FLAG_BACKUP_SEMANTICS, 0); if (m_dirHandle == INVALID_HANDLE_VALUE) { - qWarning() << QString::fromLatin1("Could not open: '%1'; error: %2\n").arg(path) + qWarning() << QString::fromLatin1("Cannot open: \"%1\": %2\n").arg(path) .arg(QInstaller::windowsErrorString(GetLastError())); } } @@ -144,13 +144,13 @@ QString readWindowsSymLink(const QString &path) Link createJunction(const QString &linkPath, const QString &targetPath) { if (!QDir().mkpath(linkPath)) { - qWarning() << QString::fromLatin1("Could not create the mount directory: %1").arg( + qWarning() << QString::fromLatin1("Cannot create the mount directory: %1").arg( linkPath); return Link(linkPath); } FileHandleWrapper dirHandle(linkPath); if (dirHandle.handle() == INVALID_HANDLE_VALUE) { - qWarning() << QString::fromLatin1("Could not open: '%1'; error: %2\n").arg(linkPath) + qWarning() << QString::fromLatin1("Cannot open: \"%1\": %2\n").arg(linkPath) .arg(QInstaller::windowsErrorString(GetLastError())); return Link(linkPath); } @@ -181,7 +181,7 @@ Link createJunction(const QString &linkPath, const QString &targetPath) if (!::DeviceIoControl(dirHandle.handle(), FSCTL_SET_REPARSE_POINT, reparseStructData, reparseStructData->ReparseDataLength + REPARSE_DATA_BUFFER_HEADER_SIZE, 0, 0, &bytesReturned, 0)) { - qWarning() << QString::fromLatin1("Could not set the reparse point: for '%1' to %2; error: %3" + qWarning() << QString::fromLatin1("Cannot set the reparse point for \"%1\" to %2: %3" ).arg(linkPath, targetPath).arg(QInstaller::windowsErrorString(GetLastError())); } return Link(linkPath); @@ -203,7 +203,7 @@ bool removeJunction(const QString &path) REPARSE_GUID_DATA_BUFFER_HEADER_SIZE, 0, 0, &bytesReturned, 0)) { - qWarning() << QString::fromLatin1("Could not remove the reparse point: '%1'; error: %3" + qWarning() << QString::fromLatin1("Cannot remove the reparse point \"'%1\": %3" ).arg(path).arg(QInstaller::windowsErrorString(GetLastError())); return false; } @@ -217,7 +217,7 @@ Link createLnSymlink(const QString &linkPath, const QString &targetPath) int linkedError = symlink(QFileInfo(targetPath).absoluteFilePath().toUtf8(), QFileInfo(linkPath).absoluteFilePath().toUtf8()); if (linkedError != 0) { - qWarning() << QString::fromLatin1("Could not create a symlink: from '%1' to %2; error: %3" + qWarning() << QString::fromLatin1("Cannot create a symlink from \"%1\" to \"%2\": %3" ).arg(linkPath, targetPath).arg(linkedError); } @@ -245,7 +245,7 @@ Link Link::create(const QString &link, const QString &targetPath) if (!linkPathExists) linkPathExists = QDir().mkpath(linkPath); if (!linkPathExists) { - qWarning() << QString::fromLatin1("Could not create the needed directories: %1").arg( + qWarning() << QString::fromLatin1("Cannot create the needed directories: %1").arg( link); return Link(link); } |