QShortcut context must not be translated in our localization. It is part of

Qt's localization files.

--HG--
branch : develop
This commit is contained in:
Roman Telezhynskyi 2018-06-11 09:53:39 +03:00
parent e244d002cc
commit 71d78cf08e

View File

@ -180,13 +180,18 @@ void VisToolMove::RefreshGeometry()
} }
else 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°, <b>Shift</b> - sticking angle, " Visualization::toolTip = tr("Length = %1%2, angle = %3°, rotation angle = %4°, <b>Shift</b> - sticking angle, "
"<b>%5</b> - change rotation origin point, <b>Mouse click</b> - finish creating") "<b>%5</b> - change rotation origin point, <b>Mouse click</b> - finish creating")
.arg(qApp->TrVars()->FormulaToUser(QString::number(qApp->fromPixel(tempLength)), .arg(qApp->TrVars()->FormulaToUser(QString::number(qApp->fromPixel(tempLength)),
qApp->Settings()->GetOsSeparator()), prefix) qApp->Settings()->GetOsSeparator()), prefix)
.arg(tempAngle) .arg(tempAngle)
.arg(tempRoationAngle) .arg(tempRoationAngle)
.arg(QCoreApplication::translate("QShortcut", "Ctrl")); .arg(QCoreApplication::translate(strQShortcut.toUtf8().constData(), strCtrl.toUtf8().constData()));
} }
CreateMovedRotatedObjects(iPoint, iCurve, tempLength, tempAngle, tempRoationAngle, origin); CreateMovedRotatedObjects(iPoint, iCurve, tempLength, tempAngle, tempRoationAngle, origin);