mirror of
https://github.com/GoldenCheetah/GoldenCheetah.git
synced 2026-02-14 00:28:42 +00:00
Merge pull request #1648 from amtriathlon/Spanish
Update Spanish Translation
This commit is contained in:
@@ -875,7 +875,7 @@ void Leaf::validateFilter(DataFilter *df, Leaf *leaf)
|
||||
symbol.compare("Current", Qt::CaseInsensitive) &&
|
||||
!df->dataSeriesSymbols.contains(symbol) &&
|
||||
symbol != "isSwim" && symbol != "isRun" && !isCoggan(symbol)) {
|
||||
DataFiltererrors << QString(QObject::tr("%1 is unknown")).arg(symbol);
|
||||
DataFiltererrors << QString(tr("%1 is unknown")).arg(symbol);
|
||||
leaf->inerror = true;
|
||||
}
|
||||
|
||||
@@ -907,19 +907,19 @@ void Leaf::validateFilter(DataFilter *df, Leaf *leaf)
|
||||
QString symbol = leaf->series->lvalue.n->toLower();
|
||||
|
||||
if (leaf->function == "best" && !bestValidSymbols.exactMatch(symbol)) {
|
||||
DataFiltererrors << QString(QObject::tr("invalid data series for best(): %1")).arg(symbol);
|
||||
DataFiltererrors << QString(tr("invalid data series for best(): %1")).arg(symbol);
|
||||
leaf->inerror = true;
|
||||
}
|
||||
|
||||
if (leaf->function == "tiz" && !tizValidSymbols.exactMatch(symbol)) {
|
||||
DataFiltererrors << QString(QObject::tr("invalid data series for tiz(): %1")).arg(symbol);
|
||||
DataFiltererrors << QString(tr("invalid data series for tiz(): %1")).arg(symbol);
|
||||
leaf->inerror = true;
|
||||
}
|
||||
|
||||
if (leaf->function == "daterange") {
|
||||
|
||||
if (!dateRangeValidSymbols.exactMatch(symbol)) {
|
||||
DataFiltererrors << QString(QObject::tr("invalid literal for daterange(): %1")).arg(symbol);
|
||||
DataFiltererrors << QString(tr("invalid literal for daterange(): %1")).arg(symbol);
|
||||
leaf->inerror = true;
|
||||
|
||||
} else {
|
||||
@@ -933,13 +933,13 @@ void Leaf::validateFilter(DataFilter *df, Leaf *leaf)
|
||||
}
|
||||
|
||||
if (leaf->function == "config" && !configValidSymbols.exactMatch(symbol)) {
|
||||
DataFiltererrors << QString(QObject::tr("invalid literal for config(): %1")).arg(symbol);
|
||||
DataFiltererrors << QString(tr("invalid literal for config(): %1")).arg(symbol);
|
||||
leaf->inerror = true;
|
||||
}
|
||||
|
||||
if (leaf->function == "const") {
|
||||
if (!constValidSymbols.exactMatch(symbol)) {
|
||||
DataFiltererrors << QString(QObject::tr("invalid literal for const(): %1")).arg(symbol);
|
||||
DataFiltererrors << QString(tr("invalid literal for const(): %1")).arg(symbol);
|
||||
leaf->inerror = true;
|
||||
} else {
|
||||
|
||||
@@ -966,7 +966,7 @@ void Leaf::validateFilter(DataFilter *df, Leaf *leaf)
|
||||
// 2 or more
|
||||
if (leaf->fparms.count() < 2) {
|
||||
leaf->inerror = true;
|
||||
DataFiltererrors << QString(QObject::tr("which function has at least 2 parameters."));
|
||||
DataFiltererrors << QString(tr("which function has at least 2 parameters."));
|
||||
}
|
||||
|
||||
// still normal parm check !
|
||||
@@ -981,7 +981,7 @@ void Leaf::validateFilter(DataFilter *df, Leaf *leaf)
|
||||
if (leaf->fparms.count() > 0) {
|
||||
if (leaf->fparms[0]->type != Leaf::Symbol) {
|
||||
leaf->inerror = true;
|
||||
DataFiltererrors << QString(QObject::tr("isset/set/unset function first parameter is field/metric to set."));
|
||||
DataFiltererrors << QString(tr("isset/set/unset function first parameter is field/metric to set."));
|
||||
} else {
|
||||
QString symbol = *(leaf->fparms[0]->lvalue.n);
|
||||
|
||||
@@ -992,7 +992,7 @@ void Leaf::validateFilter(DataFilter *df, Leaf *leaf)
|
||||
!symbol.compare("Current", Qt::CaseInsensitive) ||
|
||||
df->dataSeriesSymbols.contains(symbol) ||
|
||||
symbol == "isSwim" || symbol == "isRun" || isCoggan(symbol)) {
|
||||
DataFiltererrors << QString(QObject::tr("%1 is not supported in isset/set/unset operations")).arg(symbol);
|
||||
DataFiltererrors << QString(tr("%1 is not supported in isset/set/unset operations")).arg(symbol);
|
||||
leaf->inerror = true;
|
||||
}
|
||||
}
|
||||
@@ -1002,15 +1002,15 @@ void Leaf::validateFilter(DataFilter *df, Leaf *leaf)
|
||||
if (leaf->function == "issset" && leaf->fparms.count() != 1) {
|
||||
|
||||
leaf->inerror = true;
|
||||
DataFiltererrors << QString(QObject::tr("isset has one parameter, a symbol to check."));
|
||||
DataFiltererrors << QString(tr("isset has one parameter, a symbol to check."));
|
||||
|
||||
} else if ((leaf->function == "set" && leaf->fparms.count() != 3) ||
|
||||
(leaf->function == "unset" && leaf->fparms.count() != 2)) {
|
||||
|
||||
leaf->inerror = true;
|
||||
DataFiltererrors << (leaf->function == "set" ?
|
||||
QString(QObject::tr("set function needs 3 paramaters; symbol, value and expression.")) :
|
||||
QString(QObject::tr("unset function needs 2 paramaters; symbol and expression.")));
|
||||
QString(tr("set function needs 3 paramaters; symbol, value and expression.")) :
|
||||
QString(tr("unset function needs 2 paramaters; symbol and expression.")));
|
||||
|
||||
} else {
|
||||
|
||||
@@ -1028,13 +1028,13 @@ void Leaf::validateFilter(DataFilter *df, Leaf *leaf)
|
||||
if (leaf->fparms[0]->type != Leaf::Symbol) {
|
||||
|
||||
leaf->fparms[0]->inerror = true;
|
||||
DataFiltererrors << QString(QObject::tr("estimate function expects model name as first parameter."));
|
||||
DataFiltererrors << QString(tr("estimate function expects model name as first parameter."));
|
||||
|
||||
} else {
|
||||
|
||||
if (!pdmodels().contains(*(leaf->fparms[0]->lvalue.n))) {
|
||||
leaf->inerror = leaf->fparms[0]->inerror = true;
|
||||
DataFiltererrors << QString(QObject::tr("estimate function expects model name as first parameter"));
|
||||
DataFiltererrors << QString(tr("estimate function expects model name as first parameter"));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1045,7 +1045,7 @@ void Leaf::validateFilter(DataFilter *df, Leaf *leaf)
|
||||
QRegExp estimateValidSymbols("^(cp|ftp|pmax|w')$", Qt::CaseInsensitive);
|
||||
if (!estimateValidSymbols.exactMatch(*(leaf->fparms[1]->lvalue.n))) {
|
||||
leaf->inerror = leaf->fparms[1]->inerror = true;
|
||||
DataFiltererrors << QString(QObject::tr("estimate function expects parameter or duration as second parameter"));
|
||||
DataFiltererrors << QString(tr("estimate function expects parameter or duration as second parameter"));
|
||||
}
|
||||
} else {
|
||||
validateFilter(df, leaf->fparms[1]);
|
||||
@@ -1065,7 +1065,7 @@ void Leaf::validateFilter(DataFilter *df, Leaf *leaf)
|
||||
|
||||
// with the right number of parameters?
|
||||
if (DataFilterFunctions[i].parameters && leaf->fparms.count() != DataFilterFunctions[i].parameters) {
|
||||
DataFiltererrors << QString(QObject::tr("function '%1' expects %2 parameter(s) not %3")).arg(leaf->function)
|
||||
DataFiltererrors << QString(tr("function '%1' expects %2 parameter(s) not %3")).arg(leaf->function)
|
||||
.arg(DataFilterFunctions[i].parameters).arg(fparms.count());
|
||||
leaf->inerror = true;
|
||||
}
|
||||
@@ -1076,7 +1076,7 @@ void Leaf::validateFilter(DataFilter *df, Leaf *leaf)
|
||||
|
||||
// not known!
|
||||
if (!found) {
|
||||
DataFiltererrors << QString(QObject::tr("unknown function %1")).arg(leaf->function);
|
||||
DataFiltererrors << QString(tr("unknown function %1")).arg(leaf->function);
|
||||
leaf->inerror=true;
|
||||
}
|
||||
}
|
||||
@@ -1086,7 +1086,7 @@ void Leaf::validateFilter(DataFilter *df, Leaf *leaf)
|
||||
case Leaf::UnaryOperation :
|
||||
{ // only 1 at present, unary minus return the value * -1
|
||||
if (!Leaf::isNumber(df, leaf->lvalue.l)) {
|
||||
DataFiltererrors << QString(QObject::tr("unary negation on a string!"));
|
||||
DataFiltererrors << QString(tr("unary negation on a string!"));
|
||||
leaf->inerror = true;
|
||||
}
|
||||
}
|
||||
@@ -1098,14 +1098,14 @@ void Leaf::validateFilter(DataFilter *df, Leaf *leaf)
|
||||
bool lhsType = Leaf::isNumber(df, leaf->lvalue.l);
|
||||
bool rhsType = Leaf::isNumber(df, leaf->rvalue.l);
|
||||
if (lhsType != rhsType) {
|
||||
DataFiltererrors << QString(QObject::tr("comparing strings with numbers"));
|
||||
DataFiltererrors << QString(tr("comparing strings with numbers"));
|
||||
leaf->inerror = true;
|
||||
}
|
||||
|
||||
// what about using string operations on a lhs/rhs that
|
||||
// are numeric?
|
||||
if ((lhsType || rhsType) && leaf->op >= MATCHES && leaf->op <= CONTAINS) {
|
||||
DataFiltererrors << QObject::tr("using a string operations with a number");
|
||||
DataFiltererrors << tr("using a string operations with a number");
|
||||
leaf->inerror = true;
|
||||
}
|
||||
|
||||
@@ -1133,7 +1133,7 @@ void Leaf::validateFilter(DataFilter *df, Leaf *leaf)
|
||||
case Leaf::Parameters :
|
||||
{
|
||||
// should never get here !
|
||||
DataFiltererrors << QObject::tr("internal parser error: parms");
|
||||
DataFiltererrors << tr("internal parser error: parms");
|
||||
leaf->inerror = true;
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -52,6 +52,7 @@ class Result {
|
||||
};
|
||||
|
||||
class Leaf {
|
||||
Q_DECLARE_TR_FUNCTIONS(Leaf)
|
||||
|
||||
public:
|
||||
|
||||
|
||||
@@ -194,6 +194,7 @@ class FileStoreDialog : public QDialog
|
||||
|
||||
class FolderNameDialog : public QDialog
|
||||
{
|
||||
Q_DECLARE_TR_FUNCTIONS(FolderNameDialog)
|
||||
public:
|
||||
FolderNameDialog(QWidget *parent);
|
||||
QString name() { return nameEdit->text(); }
|
||||
|
||||
@@ -107,8 +107,8 @@ LTMChartParser::serialize(QString filename, QList<LTMSettings> charts)
|
||||
if (!file.open(QFile::WriteOnly)) {
|
||||
QMessageBox msgBox;
|
||||
msgBox.setIcon(QMessageBox::Critical);
|
||||
msgBox.setText(QObject::tr("Problem Saving Charts Configuration"));
|
||||
msgBox.setInformativeText(QObject::tr("File: %1 cannot be opened for 'Writing'. Please check file properties.").arg(filename));
|
||||
msgBox.setText(tr("Problem Saving Charts Configuration"));
|
||||
msgBox.setInformativeText(tr("File: %1 cannot be opened for 'Writing'. Please check file properties.").arg(filename));
|
||||
msgBox.exec();
|
||||
return;
|
||||
};
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
|
||||
class LTMChartParser : public QXmlDefaultHandler
|
||||
{
|
||||
Q_DECLARE_TR_FUNCTIONS(LTMChartParser)
|
||||
|
||||
public:
|
||||
static void serialize(QString, QList<LTMSettings>);
|
||||
|
||||
@@ -133,7 +133,7 @@ VDOTCalculator::VDOTCalculator(QWidget *parent) : QDialog(parent)
|
||||
|
||||
QHBoxLayout *vdotHBox = new QHBoxLayout;
|
||||
vdotHBox->addStretch();
|
||||
labelVDOT = new QLabel(tr("Your VDOT:"));
|
||||
labelVDOT = new QLabel(tr("Your Daniels VDOT:"));
|
||||
vdotHBox->addWidget(labelVDOT);
|
||||
txtVDOT = new QLineEdit(this);
|
||||
txtVDOT->setAlignment(Qt::AlignRight);
|
||||
@@ -146,7 +146,7 @@ VDOTCalculator::VDOTCalculator(QWidget *parent) : QDialog(parent)
|
||||
|
||||
// Training Pace Table
|
||||
QVBoxLayout *tableLayout = new QVBoxLayout;
|
||||
labelTPACE = new QLabel(tr("Your Daniels' Training Paces:"));
|
||||
labelTPACE = new QLabel(tr("Your Training Paces:"));
|
||||
tableLayout->addWidget(labelTPACE);
|
||||
tableWidgetTPACE = new QTableWidget(5, 3, this);
|
||||
for (int j = 0; j< 3; j++) tableWidgetTPACE->setColumnWidth(j, 60);
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user