Localize parser error messages.

--HG--
branch : develop
This commit is contained in:
Roman Telezhynskyi 2015-10-12 15:25:44 +03:00
parent be398bae93
commit 86982d3d0a
14 changed files with 178 additions and 4 deletions

View File

@ -3986,6 +3986,19 @@ Do you want to save your changes?</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>QmuParser</name>
<message>
<source>too few arguments for function sum.</source>
<comment>parser error message</comment>
<translation type="unfinished"></translation>
</message>
<message>
<source>too few arguments for function min.</source>
<comment>parser error message</comment>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>RenamePP</name>
<message>

View File

@ -5849,6 +5849,19 @@ Chcete uložit své změny?</translation>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>QmuParser</name>
<message>
<source>too few arguments for function sum.</source>
<comment>parser error message</comment>
<translation type="unfinished"></translation>
</message>
<message>
<source>too few arguments for function min.</source>
<comment>parser error message</comment>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>QmuParserErrorMsg</name>
<message>

View File

@ -5300,6 +5300,19 @@ Sollen die Änderungen gespeichert werden?</translation>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>QmuParser</name>
<message>
<source>too few arguments for function sum.</source>
<comment>parser error message</comment>
<translation type="unfinished"></translation>
</message>
<message>
<source>too few arguments for function min.</source>
<comment>parser error message</comment>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>QmuParserErrorMsg</name>
<message>

View File

@ -7072,6 +7072,19 @@ Do you want to save your changes?</translation>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>QmuParser</name>
<message>
<source>too few arguments for function sum.</source>
<comment>parser error message</comment>
<translation type="unfinished"></translation>
</message>
<message>
<source>too few arguments for function min.</source>
<comment>parser error message</comment>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>QmuParserErrorMsg</name>
<message>

View File

@ -5498,6 +5498,19 @@ Quiere guardar los cambios?</translation>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>QmuParser</name>
<message>
<source>too few arguments for function sum.</source>
<comment>parser error message</comment>
<translation type="unfinished"></translation>
</message>
<message>
<source>too few arguments for function min.</source>
<comment>parser error message</comment>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>QmuParserErrorMsg</name>
<message>

View File

@ -5721,6 +5721,19 @@ Haluatko tallentaa muutokset?</translation>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>QmuParser</name>
<message>
<source>too few arguments for function sum.</source>
<comment>parser error message</comment>
<translation type="unfinished"></translation>
</message>
<message>
<source>too few arguments for function min.</source>
<comment>parser error message</comment>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>QmuParserErrorMsg</name>
<message>

View File

@ -5595,6 +5595,19 @@ Voulez-vous sauvegarder les changements ? </translation>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>QmuParser</name>
<message>
<source>too few arguments for function sum.</source>
<comment>parser error message</comment>
<translation type="unfinished"></translation>
</message>
<message>
<source>too few arguments for function min.</source>
<comment>parser error message</comment>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>RenamePP</name>
<message>

View File

@ -4102,6 +4102,19 @@ Do you want to save your changes?</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>QmuParser</name>
<message>
<source>too few arguments for function sum.</source>
<comment>parser error message</comment>
<translation type="unfinished"></translation>
</message>
<message>
<source>too few arguments for function min.</source>
<comment>parser error message</comment>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>RenamePP</name>
<message>

View File

@ -4520,6 +4520,19 @@ Apakah anda ingin menyimpan perubahan anda?</translation>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>QmuParser</name>
<message>
<source>too few arguments for function sum.</source>
<comment>parser error message</comment>
<translation type="unfinished"></translation>
</message>
<message>
<source>too few arguments for function min.</source>
<comment>parser error message</comment>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>RenamePP</name>
<message>

View File

@ -4073,6 +4073,19 @@ Do you want to save your changes?</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>QmuParser</name>
<message>
<source>too few arguments for function sum.</source>
<comment>parser error message</comment>
<translation type="unfinished"></translation>
</message>
<message>
<source>too few arguments for function min.</source>
<comment>parser error message</comment>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>RenamePP</name>
<message>

View File

@ -7046,6 +7046,19 @@ Do you want to save your changes?</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>QmuParser</name>
<message>
<source>too few arguments for function sum.</source>
<comment>parser error message</comment>
<translation type="unfinished"></translation>
</message>
<message>
<source>too few arguments for function min.</source>
<comment>parser error message</comment>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>QmuParserErrorMsg</name>
<message>

View File

@ -8919,6 +8919,19 @@ Do you want to save your changes?</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>QmuParser</name>
<message>
<source>too few arguments for function sum.</source>
<comment>parser error message</comment>
<translation type="unfinished"></translation>
</message>
<message>
<source>too few arguments for function min.</source>
<comment>parser error message</comment>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>QmuParserErrorMsg</name>
<message>

View File

@ -7883,6 +7883,19 @@ Do you want to save your changes?</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>QmuParser</name>
<message>
<source>too few arguments for function sum.</source>
<comment>parser error message</comment>
<translation type="unfinished"></translation>
</message>
<message>
<source>too few arguments for function min.</source>
<comment>parser error message</comment>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>QmuParserErrorMsg</name>
<message>

View File

@ -23,6 +23,7 @@
#include <QtGlobal>
#include <QtCore/qmath.h>
#include <QCoreApplication>
using namespace std;
@ -136,7 +137,8 @@ qreal QmuParser::Sum(const qreal *a_afArg, int a_iArgc)
{
if (a_iArgc == 0)
{
throw QmuParserError("too few arguments for function sum.");
throw QmuParserError(QCoreApplication::translate("QmuParser", "too few arguments for function sum.",
"parser error message"));
}
qreal fRes=0;
for (int i=0; i<a_iArgc; ++i)
@ -156,7 +158,8 @@ qreal QmuParser::Avg(const qreal *a_afArg, int a_iArgc)
{
if (a_iArgc == 0)
{
throw QmuParserError("too few arguments for function sum.");
throw QmuParserError(QCoreApplication::translate("QmuParser", "too few arguments for function sum.",
"parser error message"));
}
qreal fRes=0;
for (int i=0; i<a_iArgc; ++i)
@ -176,7 +179,8 @@ qreal QmuParser::Min(const qreal *a_afArg, int a_iArgc)
{
if (a_iArgc == 0)
{
throw QmuParserError("too few arguments for function min.");
throw QmuParserError(QCoreApplication::translate("QmuParser", "too few arguments for function min.",
"parser error message"));
}
qreal fRes=a_afArg[0];
for (int i=0; i<a_iArgc; ++i)
@ -196,7 +200,8 @@ qreal QmuParser::Max(const qreal *a_afArg, int a_iArgc)
{
if (a_iArgc == 0)
{
throw QmuParserError("too few arguments for function min.");
throw QmuParserError(QCoreApplication::translate("QmuParser", "too few arguments for function min.",
"parser error message"));
}
qreal fRes=a_afArg[0];
for (int i=0; i<a_iArgc; ++i)