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/createlinkoperation.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/createlinkoperation.cpp')
-rw-r--r-- | src/libs/installer/createlinkoperation.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/libs/installer/createlinkoperation.cpp b/src/libs/installer/createlinkoperation.cpp index fc0950870..aa98c54a5 100644 --- a/src/libs/installer/createlinkoperation.cpp +++ b/src/libs/installer/createlinkoperation.cpp @@ -35,6 +35,7 @@ #include "link.h" +#include <QDir> #include <QFileInfo> using namespace QInstaller; @@ -60,7 +61,8 @@ bool CreateLinkOperation::performOperation() if (!link.exists()) { setError(UserDefinedError); - setErrorString(tr("Could not create link from %1 to %2.").arg(linkPath, targetPath)); + setErrorString(tr("Cannot create link from \"%1\" to \"%2\".").arg( + QDir::toNativeSeparators(linkPath), QDir::toNativeSeparators(targetPath))); return false; } @@ -80,7 +82,8 @@ bool CreateLinkOperation::undoOperation() } if (!link.remove()) { setError(UserDefinedError); - setErrorString(tr("Could not remove link from %1 to %2.").arg(linkPath, targetPath)); + setErrorString(tr("Cannot remove link from \"%1\" to \"%2\".").arg( + QDir::toNativeSeparators(linkPath), QDir::toNativeSeparators(targetPath))); return false; } |