Do not translate formulas, but localize decimal character.
This commit is contained in:
parent
cb5b85435f
commit
3f5371321b
|
@ -704,12 +704,6 @@ auto VTranslateVars::FormulaFromUser(const QString &formula, bool osSeparator) c
|
||||||
return formula;
|
return formula;
|
||||||
}
|
}
|
||||||
|
|
||||||
VCommonSettings *settings = VAbstractApplication::VApp()->Settings();
|
|
||||||
if (!settings->IsTranslateFormula())
|
|
||||||
{
|
|
||||||
return formula;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Eval formula
|
// Eval formula
|
||||||
QScopedPointer<qmu::QmuTokenParser> cal(
|
QScopedPointer<qmu::QmuTokenParser> cal(
|
||||||
new qmu::QmuTokenParser(formula, osSeparator, true, GetTranslatedFunctions()));
|
new qmu::QmuTokenParser(formula, osSeparator, true, GetTranslatedFunctions()));
|
||||||
|
@ -719,7 +713,12 @@ auto VTranslateVars::FormulaFromUser(const QString &formula, bool osSeparator) c
|
||||||
|
|
||||||
QString newFormula = formula; // Local copy for making changes
|
QString newFormula = formula; // Local copy for making changes
|
||||||
|
|
||||||
|
VCommonSettings *settings = VAbstractApplication::VApp()->Settings();
|
||||||
|
if (settings->IsTranslateFormula())
|
||||||
|
{
|
||||||
TranslateVarsFromUser(newFormula, tokens, numbers);
|
TranslateVarsFromUser(newFormula, tokens, numbers);
|
||||||
|
}
|
||||||
|
|
||||||
TranslateNumbersFromUser(newFormula, tokens, numbers, osSeparator);
|
TranslateNumbersFromUser(newFormula, tokens, numbers, osSeparator);
|
||||||
|
|
||||||
return newFormula;
|
return newFormula;
|
||||||
|
@ -754,12 +753,6 @@ auto VTranslateVars::FormulaToUser(const QString &formula, bool osSeparator) con
|
||||||
return formula;
|
return formula;
|
||||||
}
|
}
|
||||||
|
|
||||||
VCommonSettings *settings = VAbstractApplication::VApp()->Settings();
|
|
||||||
if (!settings->IsTranslateFormula())
|
|
||||||
{
|
|
||||||
return formula;
|
|
||||||
}
|
|
||||||
|
|
||||||
QString newFormula = formula; // Local copy for making changes
|
QString newFormula = formula; // Local copy for making changes
|
||||||
|
|
||||||
QMap<vsizetype, QString> tokens;
|
QMap<vsizetype, QString> tokens;
|
||||||
|
@ -780,7 +773,12 @@ auto VTranslateVars::FormulaToUser(const QString &formula, bool osSeparator) con
|
||||||
return newFormula;
|
return newFormula;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
VCommonSettings *settings = VAbstractApplication::VApp()->Settings();
|
||||||
|
if (settings->IsTranslateFormula())
|
||||||
|
{
|
||||||
TranslateVarsToUser(newFormula, tokens, numbers);
|
TranslateVarsToUser(newFormula, tokens, numbers);
|
||||||
|
}
|
||||||
|
|
||||||
TranslateNumbersToUser(newFormula, tokens, numbers, osSeparator);
|
TranslateNumbersToUser(newFormula, tokens, numbers, osSeparator);
|
||||||
|
|
||||||
return newFormula;
|
return newFormula;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user