From 71d78cf08eb37e197b3ff2416316fc6d951ed1d2 Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Mon, 11 Jun 2018 09:53:39 +0300 Subject: [PATCH] QShortcut context must not be translated in our localization. It is part of Qt's localization files. --HG-- branch : develop --- .../vtools/visualization/line/operation/vistoolmove.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/libs/vtools/visualization/line/operation/vistoolmove.cpp b/src/libs/vtools/visualization/line/operation/vistoolmove.cpp index 4d2d1b55d..28bfb17d8 100644 --- a/src/libs/vtools/visualization/line/operation/vistoolmove.cpp +++ b/src/libs/vtools/visualization/line/operation/vistoolmove.cpp @@ -180,13 +180,18 @@ void VisToolMove::RefreshGeometry() } else { + // String below need for getting translation for key Ctrl + // Translation comes from Qt library. Use variables to prevent adding to our translation files. + const QString strQShortcut = QStringLiteral("QShortcut"); // Context + const QString strCtrl = QStringLiteral("Ctrl"); // String + Visualization::toolTip = tr("Length = %1%2, angle = %3°, rotation angle = %4°, Shift - sticking angle, " "%5 - change rotation origin point, Mouse click - finish creating") .arg(qApp->TrVars()->FormulaToUser(QString::number(qApp->fromPixel(tempLength)), qApp->Settings()->GetOsSeparator()), prefix) .arg(tempAngle) .arg(tempRoationAngle) - .arg(QCoreApplication::translate("QShortcut", "Ctrl")); + .arg(QCoreApplication::translate(strQShortcut.toUtf8().constData(), strCtrl.toUtf8().constData())); } CreateMovedRotatedObjects(iPoint, iCurve, tempLength, tempAngle, tempRoationAngle, origin);