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/component.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/component.cpp')
-rw-r--r-- | src/libs/installer/component.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/libs/installer/component.cpp b/src/libs/installer/component.cpp index 02a8b2c5f..9b8c2a430 100644 --- a/src/libs/installer/component.cpp +++ b/src/libs/installer/component.cpp @@ -565,8 +565,8 @@ void Component::loadUserInterfaces(const QDir &directory, const QStringList &uis while (it.hasNext()) { QFile file(it.next()); if (!file.open(QIODevice::ReadOnly)) { - throw Error(tr("Could not open the requested UI file '%1'. Error: %2").arg(it.fileName(), - file.errorString())); + throw Error(tr("Cannot open the requested UI file \"%1\": %2").arg( + it.fileName(), file.errorString())); } static QUiLoader loader; @@ -574,8 +574,8 @@ void Component::loadUserInterfaces(const QDir &directory, const QStringList &uis loader.setLanguageChangeEnabled(true); QWidget *const widget = loader.load(&file, 0); if (!widget) { - throw Error(tr("Could not load the requested UI file '%1'. Error: %2").arg(it.fileName(), - loader.errorString())); + throw Error(tr("Cannot load the requested UI file \"%1\": %2").arg( + it.fileName(), loader.errorString())); } d->scriptEngine()->newQObject(widget); d->m_userInterfaces.insert(widget->objectName(), widget); @@ -609,8 +609,8 @@ void Component::loadLicenses(const QString &directory, const QHash<QString, QVar << ". Using untranslated fallback."; file.setFileName(directory + fileName); if (!file.open(QIODevice::ReadOnly)) { - throw Error(tr("Could not open the requested license file '%1'. Error: %2").arg(fileName, - file.errorString())); + throw Error(tr("Cannot open the requested license file \"%1\": %2").arg( + fileName, file.errorString())); } } QTextStream stream(&file); @@ -974,7 +974,7 @@ Operation *Component::createOperation(const QString &operationName, const QStrin if (operation == 0) { const QMessageBox::StandardButton button = MessageBoxHandler::critical(MessageBoxHandler::currentBestSuitParent(), - QLatin1String("OperationDoesNotExistError"), tr("Error"), tr("Error: Operation %1 does not exist") + QLatin1String("OperationDoesNotExistError"), tr("Error"), tr("Error: Operation %1 does not exist.") .arg(operationName), QMessageBox::Abort | QMessageBox::Ignore); if (button == QMessageBox::Abort) d->m_operationsCreatedSuccessfully = false; |