Commit 5b79e0bb authored by Barth Netterfield's avatar Barth Netterfield
Browse files

Fix some translation issues.

CCBUG: 330050
Fix all issues reported in comment 5 in the bug report.
parent e916b969
......@@ -74,7 +74,7 @@ QString AsciiConfigWidgetInternal::readLine(QTextStream& in, int maxLength)
void AsciiConfigWidgetInternal::showBeginning()
{
showBeginning(_showBeginning, 100);
_labelBeginning->setText(QString("First lines of file '%1'").arg(QFileInfo(_filename).fileName()));
_labelBeginning->setText(tr("First lines of file '%1'").arg(QFileInfo(_filename).fileName()));
}
......@@ -396,19 +396,19 @@ bool AsciiConfigWidget::isOkAcceptabe() const {
QString msg;
if (config._readFields) {
if (config._fieldsLine == config._dataLine) {
msg = QString("Line %1 can not list field names AND values!").arg(config._fieldsLine + 1);
msg = tr("Line %1 can not list field names AND values!").arg(config._fieldsLine + 1);
}
if (config._readUnits) {
if (config._unitsLine == config._dataLine) {
msg = QString("Line %1 can not list units AND values!").arg(config._unitsLine + 1);
msg = tr("Line %1 can not list units AND values!").arg(config._unitsLine + 1);
}
if (config._unitsLine == config._fieldsLine) {
msg = QString("Line %1 can not list field names AND units!").arg(config._unitsLine + 1);
msg = tr("Line %1 can not list field names AND units!").arg(config._unitsLine + 1);
}
}
}
if (!msg.isEmpty()) {
QMessageBox::critical(0, "Inconsistent parameters", msg);
QMessageBox::critical(0, tr("Inconsistent parameters"), msg);
return false;
}
return true;
......
......@@ -26,20 +26,28 @@ BugReportWizard::BugReportWizard(QWidget *parent)
setupUi(this);
QString mac_os9 = QT_TR_NOOP("Mac OS 9");
QString mac_osx = QT_TR_NOOP("Mac OS X");
QString win32 = QT_TR_NOOP("Windows 32-Bit");
QString win64 = QT_TR_NOOP("Windows 64-Bit");
QString lin = QT_TR_NOOP("Linux");
_kstVersion->setText(KSTVERSION);
#if defined(Q_OS_MAC9)
_OS->setText("Mac OS 9");
os_en = mac_os9;
#elif defined(Q_WS_MACX)
_OS->setText("Mac OS X");
os_en = mac_osx;
#elif defined(Q_OS_WIN32)
_OS->setText("Windows 32-Bit");
os_en = win32;
#elif defined(Q_OS_WIN64)
_OS->setText("Windows 64-Bit");
os_en = win64;
#else
_OS->setText("Linux");
os_en = lin;
#endif
_OS->setText(tr(os_en.toLatin1()));
connect(_reportBugButton, SIGNAL(clicked()), this, SLOT(reportBug()));
}
......
......@@ -32,6 +32,9 @@ class BugReportWizard : public QDialog, Ui::BugReportWizard
private slots:
void reportBug();
private:
QString os_en;
};
}
......
......@@ -208,11 +208,11 @@ bool ActivityLevelSource::algorithm() {
length = inputVector->length();
/* The metric is computed over a couple of seconds, let us compute the corresponding number of samples */
if (iSamplesForWindow > length) {
_errorString = "Error: Input vector too short.";
_errorString = tr("Error: Input vector too short.");
return false;
}
if (iSamplesForWindow < 2) {
_errorString = "Error: the window must be broader.";
_errorString = tr("Error: the window must be broader.");
return false;
}
......
......@@ -141,12 +141,12 @@ bool BinSource::algorithm() {
//Make sure there is at least 1 element in the input vector
if (inputVector->length() < 1) {
_errorString = "Error: Input Vector invalid size";
_errorString = tr("Error: Input Vector invalid size");
return false;
}
//Make sure the bin size is at least 1
if (inputScalar->value() < 1) {
_errorString = "Error: No Bins";
_errorString = tr("Error: No Bins");
return false;
}
......
......@@ -138,7 +138,7 @@ bool ChopSource::algorithm() {
//Make sure there is at least 1 element in the input vector
if (inputVector->length() < 1) {
_errorString = "Error: Input Vector invalid size";
_errorString = tr("Error: Input Vector invalid size");
return false;
}
......
......@@ -142,7 +142,7 @@ bool ConvolveSource::algorithm() {
Kst::VectorPtr outputVector = _outputVectors[VECTOR_OUT];
if (inputVectorOne->length() <= 0 && inputVectorTwo->length() <= 0) {
_errorString = "Error: Input Vectors - invalid size";
_errorString = tr("Error: Input Vectors - invalid size");
return false;
}
......@@ -184,7 +184,7 @@ bool ConvolveSource::algorithm() {
iLength = iLengthNew;
if (iLength <= 0) {
_errorString = "Error: Invalid Input length calculated";
_errorString = tr("Error: Invalid Input length calculated");
return false;
}
......
......@@ -142,7 +142,7 @@ bool DeconvolveSource::algorithm() {
Kst::VectorPtr outputVector = _outputVectors[VECTOR_OUT];
if (inputVectorOne->length() <= 0 && inputVectorTwo->length() <= 0) {
_errorString = "Error: Input Vectors - invalid size";
_errorString = tr("Error: Input Vectors - invalid size");
return false;
}
......@@ -185,7 +185,7 @@ bool DeconvolveSource::algorithm() {
iLength = iLengthNew;
if (iLength <= 0) {
_errorString = "Error: Invalid Input length calculated";
_errorString = tr("Error: Invalid Input length calculated");
return false;
}
......
......@@ -129,7 +129,7 @@ bool AutoCorrelationSource::algorithm() {
//Make sure there is at least 1 element in the input vector
if (inputVector->length() < 1) {
_errorString = "Error: Input Vector invalid size";
_errorString = tr("Error: Input Vector invalid size");
return false;
}
......@@ -163,7 +163,7 @@ bool AutoCorrelationSource::algorithm() {
iLength = iLengthNew;
if (iLength <= 0) {
_errorString = "Error: Invalid Input length calculated";
_errorString = tr("Error: Invalid Input length calculated");
return false;
}
......
......@@ -145,7 +145,7 @@ bool CrossCorrelationSource::algorithm() {
Kst::VectorPtr outputVectorCorrelated = _outputVectors[VECTOR_OUT_CORRELATED];
if (inputVectorOne->length() <= 0 || inputVectorTwo->length() <= 0 || inputVectorOne->length() != inputVectorTwo->length()) {
_errorString = "Error: Input Vectors - invalid size";
_errorString = tr("Error: Input Vectors - invalid size");
return false;
}
......@@ -179,7 +179,7 @@ bool CrossCorrelationSource::algorithm() {
iLength = iLengthNew;
if (iLength <= 0) {
_errorString = "Error: Invalid Input length calculated";
_errorString = tr("Error: Invalid Input length calculated");
return false;
}
......
......@@ -199,13 +199,13 @@ bool EffectiveBandwidthSource::algorithm() {
//Make sure there is at least 1 element in the input vector
if (inputVectorX->length() < 1) {
_errorString = "Error: Input Vector X invalid size";
_errorString = tr("Error: Input Vector X invalid size");
return false;
}
// Make sure the input vectors match.
if (inputVectorX->length() != inputVectorY->length()) {
_errorString = "Error: Input Vector X and Input Vector Y are not the same length";
_errorString = tr("Error: Input Vector X and Input Vector Y are not the same length");
return false;
}
......@@ -234,7 +234,7 @@ bool EffectiveBandwidthSource::algorithm() {
//verify calculated indices.
if ( !(minWhiteNoiseIndex>0) || !(minWhiteNoiseIndex<(inputVectorX->length()-1)) ) {
_errorString = "Error: Calculated Indices invalid";
_errorString = tr("Error: Calculated Indices invalid");
return false;
}
......
......@@ -180,13 +180,13 @@ bool GenericFilterSource::algorithm() {
//Validate the Numerator.
if (!inputStringNumerator || inputStringNumerator->value().isEmpty()) {
_errorString = "Error: Input String Numerator is Empty";
_errorString = tr("Error: Input String Numerator is Empty");
return false;
}
//Validate the Denominator.
if (!inputStringDenominator || inputStringDenominator->value().isEmpty()) {
_errorString = "Error: Input String Denominator is Empty";
_errorString = tr("Error: Input String Denominator is Empty");
return false;
}
......
......@@ -159,12 +159,12 @@ bool LineFitSource::algorithm() {
double xScale;
if (inputVectorY->length() < 1) {
_errorString = "Error: Input Vector Y Length invalid";
_errorString = tr("Error: Input Vector Y Length invalid");
return false;
}
if (inputVectorX->length() < 1) {
_errorString = "Error: Input Vector X Length invalid";
_errorString = tr("Error: Input Vector X Length invalid");
return false;
}
......
......@@ -243,7 +243,7 @@ bool LockInSource::algorithm() {
Kst::VectorPtr lockinResult = _outputVectors[OUT_LOCKIN_RESULT];
if (inputVector->length() <= 0 || refVector->length() <= 0 || inputVector->length() != refVector->length()) {
_errorString = "Error: Input Vectors - invalid size";
_errorString = tr("Error: Input Vectors - invalid size");
return false;
}
......
......@@ -143,7 +143,7 @@ bool NoiseAdditionSource::algorithm() {
//Make sure there is at least 1 element in the input vector
if (inputVector->length() < 1) {
_errorString = "Error: Input Vector invalid size";
_errorString = tr("Error: Input Vector invalid size");
return false;
}
......
......@@ -195,7 +195,7 @@ bool PeriodogramSource::algorithm() {
//Make sure the input sizes match
if (inputVectorTime->length() != inputVectorData->length()) {
_errorString = "Error: Input Vector lengths do not match";
_errorString = tr("Error: Input Vector lengths do not match");
return false;
}
......
......@@ -186,12 +186,12 @@ bool PhaseSource::algorithm() {
bool bReturn = false;
if (dPhasePeriod <= 0.0) {
_errorString = "Error: Input Scalar Phase must be greater than zero.";
_errorString = tr("Error: Input Scalar Phase must be greater than zero.");
return false;
}
if (inputVectorTime->length() != inputVectorData->length()) {
_errorString = "Error: Input Vector lengths do not match.";
_errorString = tr("Error: Input Vector lengths do not match.");
return false;
}
......
......@@ -147,7 +147,7 @@ bool StatisticsSource::algorithm() {
//Make sure there is at least 1 element in the input vector
if (inputVector->length() < 1) {
_errorString = "Error: Input Vector invalid size";
_errorString = tr("Error: Input Vector invalid size");
return false;
}
......
......@@ -215,16 +215,16 @@ bool SyncBinSource::algorithm() {
//Make sure there is at least 1 element in the input vector
if (inputVectorX->length() < 1) {
_errorString = "Error: Input Vector X invalid size";
_errorString = tr("Error: Input Vector X invalid size");
return false;
}
if (inputVectorX->length() != inputVectorY->length()) {
_errorString = "Error: Input Vector lengths do not match";
_errorString = tr("Error: Input Vector lengths do not match");
return false;
}
if (nbins < 2) {
_errorString = "Error: Bins must be at least 2";
_errorString = tr("Error: Bins must be at least 2");
return false;
}
......
......@@ -162,7 +162,7 @@ bool DifferentiationSource::algorithm() {
Kst::VectorPtr outputVector = _outputVectors[VECTOR_OUT];
if (inputScalar->value() == 0) {
_errorString = "Error: Input Scalar Step must be not be 0.";
_errorString = tr("Error: Input Scalar Step must be not be 0.");
return false;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment