From 1e589e37a991b29076e9a661f92dfa178421c208 Mon Sep 17 00:00:00 2001 From: Kai Koehne Date: Wed, 24 Jun 2015 10:15:16 +0200 Subject: 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 --- src/libs/installer/installercalculator.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/libs/installer/installercalculator.cpp') diff --git a/src/libs/installer/installercalculator.cpp b/src/libs/installer/installercalculator.cpp index 79c085c55..a03d11fc2 100644 --- a/src/libs/installer/installercalculator.cpp +++ b/src/libs/installer/installercalculator.cpp @@ -77,7 +77,7 @@ QString InstallerCalculator::installReason(Component *component) const "Components added as automatic dependencies:"); case Dependent: return QCoreApplication::translate("InstallerCalculator", "Components added as " - "dependency for '%1':").arg(installReasonReferencedComponent(component)); + "dependency for \"%1\":").arg(installReasonReferencedComponent(component)); case Resolved: return QCoreApplication::translate("InstallerCalculator", "Components that have resolved dependencies:"); @@ -108,8 +108,8 @@ void InstallerCalculator::realAppendToInstallComponents(Component *component) QString InstallerCalculator::recursionError(Component *component) { - return QCoreApplication::translate("InstallerCalculator", "Recursion detected, component '%1' " - "already added with reason: '%2'").arg(component->name(), installReason(component)); + return QCoreApplication::translate("InstallerCalculator", "Recursion detected, component \"%1\" " + "already added with reason: \"%2\"").arg(component->name(), installReason(component)); } bool InstallerCalculator::appendComponentsToInstall(const QList &components) @@ -171,7 +171,7 @@ bool InstallerCalculator::appendComponentToInstall(Component *component) PackageManagerCore::componentByName(dependencyComponentName, m_allComponents); if (!dependencyComponent) { const QString errorMessage = QCoreApplication::translate("InstallerCalculator", - "Cannot find missing dependency '%1' for '%2'.").arg(dependencyComponentName, + "Cannot find missing dependency \"%1\" for \"%2\".").arg(dependencyComponentName, component->name()); qWarning() << errorMessage; m_componentsToInstallError.append(errorMessage); -- cgit v1.2.3