Translation for new internal variable.

--HG--
branch : develop
This commit is contained in:
Roman Telezhynskyi 2016-09-26 22:33:28 +03:00
parent fd8ab6123c
commit 014ce1e45e
4 changed files with 42 additions and 26 deletions
src

View File

@ -153,35 +153,36 @@ const QString ColorDarkBlue = QStringLiteral("darkBlue");
const QString ColorYellow = QStringLiteral("yellow");
//variables
const QString line_ = QStringLiteral("Line_");
const QString angleLine_ = QStringLiteral("AngleLine_");
const QString spl_ = QStringLiteral(SPL_);
const QString arc_ = QStringLiteral(ARC_);
const QString splPath = QStringLiteral("SplPath");
const QString radius_V = QStringLiteral("Radius");
const QString radiusArc_ = radius_V + arc_;
const QString angle1_V = QStringLiteral("Angle1");
const QString angle2_V = QStringLiteral("Angle2");
const QString c1Length_V = QStringLiteral("C1Length");
const QString c2Length_V = QStringLiteral("C2Length");
const QString angle1Arc_ = angle1_V + arc_;
const QString angle2Arc_ = angle2_V + arc_;
const QString angle1Spl_ = angle1_V + spl_;
const QString angle2Spl_ = angle2_V + spl_;
const QString angle1SplPath = angle1_V + splPath;
const QString angle2SplPath = angle2_V + splPath;
const QString seg_ = QStringLiteral("Seg_");
const QString currentLength = QStringLiteral("CurrentLength");
const QString line_ = QStringLiteral("Line_");
const QString angleLine_ = QStringLiteral("AngleLine_");
const QString spl_ = QStringLiteral(SPL_);
const QString arc_ = QStringLiteral(ARC_);
const QString splPath = QStringLiteral("SplPath");
const QString radius_V = QStringLiteral("Radius");
const QString radiusArc_ = radius_V + arc_;
const QString angle1_V = QStringLiteral("Angle1");
const QString angle2_V = QStringLiteral("Angle2");
const QString c1Length_V = QStringLiteral("C1Length");
const QString c2Length_V = QStringLiteral("C2Length");
const QString c1LengthSpl_ = c1Length_V + spl_;
const QString c2LengthSpl_ = c2Length_V + spl_;
const QString c1LengthSplPath = c1Length_V + splPath;
const QString c2LengthSplPath = c2Length_V + splPath;
const QString angle1Arc_ = angle1_V + arc_;
const QString angle2Arc_ = angle2_V + arc_;
const QString angle1Spl_ = angle1_V + spl_;
const QString angle2Spl_ = angle2_V + spl_;
const QString angle1SplPath = angle1_V + splPath;
const QString angle2SplPath = angle2_V + splPath;
const QString seg_ = QStringLiteral("Seg_");
const QString currentLength = QStringLiteral("CurrentLength");
const QStringList builInVariables = QStringList() << line_
<< angleLine_
<< arc_
<< spl_
<< splPath
<< radius_V
<< radiusArc_
<< angle1_V
<< angle2_V
<< angle1Arc_
<< angle2Arc_
<< angle1Spl_
@ -189,4 +190,8 @@ const QStringList builInVariables = QStringList() << line_
<< angle1SplPath
<< angle2SplPath
<< seg_
<< currentLength;
<< currentLength
<< c1LengthSpl_
<< c2LengthSpl_
<< c1LengthSplPath
<< c2LengthSplPath;

View File

@ -170,6 +170,10 @@ extern const QString angle1_V;
extern const QString angle2_V;
extern const QString c1Length_V;
extern const QString c2Length_V;
extern const QString c1LengthSpl_;
extern const QString c2LengthSpl_;
extern const QString c1LengthSplPath;
extern const QString c2LengthSplPath;
extern const QString angle1Arc_;
extern const QString angle2Arc_;
extern const QString angle1Spl_;

View File

@ -390,6 +390,12 @@ void VTranslateVars::InitVariables()
"Do not add symbol _ to the end of the name"));
variables.insert(seg_, translate("VTranslateVars", "Seg_", "Segment. Left symbol _ in the name"));
variables.insert(currentLength, translate("VTranslateVars", "CurrentLength", "Do not add space between words"));
variables.insert(c1LengthSpl_, translate("VTranslateVars", "C1LengthSpl_", "Left symbol _ in the name"));
variables.insert(c2LengthSpl_, translate("VTranslateVars", "C2LengthSpl_", "Left symbol _ in the name"));
variables.insert(c1LengthSplPath, translate("VTranslateVars", "C1LengthSplPath",
"Do not add symbol _ to the end of the name"));
variables.insert(c2LengthSplPath, translate("VTranslateVars", "C2LengthSplPath",
"Do not add symbol _ to the end of the name"));
}
//---------------------------------------------------------------------------------------------------------------------

View File

@ -201,10 +201,7 @@ void TST_MeasurementRegExp::TestCheckUnderlineExists_data()
data.insert(arc_, true);
data.insert(spl_, true);
data.insert(splPath, false);
data.insert(radius_V, false);
data.insert(radiusArc_, true);
data.insert(angle1_V, false);
data.insert(angle2_V, false);
data.insert(angle1Arc_, true);
data.insert(angle2Arc_, true);
data.insert(angle1Spl_, true);
@ -213,6 +210,10 @@ void TST_MeasurementRegExp::TestCheckUnderlineExists_data()
data.insert(angle2SplPath, false);
data.insert(seg_, true);
data.insert(currentLength, false);
data.insert(c1LengthSpl_, true);
data.insert(c2LengthSpl_, true);
data.insert(c1LengthSplPath, false);
data.insert(c2LengthSplPath, false);
//Catch case when new internal variable appears.
QCOMPARE(data.size(), builInVariables.size());