13 changes: 6 additions & 7 deletions src/libkst/datasourcepluginmanager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
#include <QTimer>
#include <QFileSystemWatcher>

#include "kst_i18n.h"
#include "datacollection.h"
#include "debug.h"
#include "objectstore.h"
Expand Down Expand Up @@ -66,7 +65,7 @@ QStringList Kst::pluginSearchPaths()
pluginPaths << path + QLatin1String("/Debug");
pluginPaths << path + QLatin1String("/RelWithDebInfo");

Debug::self()->log(QString("\nPlugin Search Pathes:"));
Debug::self()->log(Debug::self()->tr("\nPlugin Search Pathes:"));
foreach(const QString& p, pluginPaths) {
Debug::self()->log(QString("-> %1").arg(p));
}
Expand Down Expand Up @@ -161,7 +160,7 @@ QString DataSourcePluginManager::obtainFile(const QString& source) {
static void scanPlugins() {
PluginList tmpList;

Debug::self()->log(i18n("Scanning for data-source plugins."));
Debug::self()->log(Debug::self()->tr("Scanning for data-source plugins."));

foreach (QObject *plugin, QPluginLoader::staticInstances()) {
//try a cast
Expand All @@ -184,10 +183,10 @@ static void scanPlugins() {
if (DataSourcePluginInterface *ds = qobject_cast<DataSourcePluginInterface*>(plugin)) {

tmpList.append(FoundPlugin(ds, d.absoluteFilePath(fileName)));
Debug::self()->log(QString("Plugin loaded: %1").arg(fileName));
Debug::self()->log(Debug::self()->tr("Plugin loaded: %1").arg(fileName));
}
} else {
Debug::self()->log(QString("instance failed for %1 (%2)").arg(fileName).arg(loader.errorString()));
Debug::self()->log(Debug::self()->tr("instance failed for %1 (%2)").arg(fileName).arg(loader.errorString()));
}
}
}
Expand Down Expand Up @@ -436,7 +435,7 @@ bool DataSourcePluginManager::sourceHasConfigWidget(const QString& filename, con
return (*i).plugin->hasConfigWidget();
}

Debug::self()->log(i18n("Could not find a datasource for '%1'(%2), but we found one just prior. Something is wrong with Kst.", filename, type), Debug::Error);
Debug::self()->log(Debug::self()->tr("Could not find a datasource for '%1'(%2), but we found one just prior. Something is wrong with Kst.").arg(filename).arg(type), Debug::Error);
return false;
}

Expand All @@ -458,7 +457,7 @@ DataSourceConfigWidget* DataSourcePluginManager::configWidgetForSource(const QSt
return w;
}

Debug::self()->log(i18n("Could not find a datasource for '%1'(%2), but we found one just prior. Something is wrong with Kst.", filename, type), Debug::Error);
Debug::self()->log(Debug::self()->tr("Could not find a datasource for '%1'(%2), but we found one just prior. Something is wrong with Kst.").arg(filename).arg(type), Debug::Error);
return 0L;
}

Expand Down
11 changes: 5 additions & 6 deletions src/libkst/datastring.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,13 @@
#include <QTextDocument>
#include <QXmlStreamWriter>

#include "kst_i18n.h"
#include "debug.h"
#include "objectstore.h"

namespace Kst {

const QString DataString::staticTypeString = I18N_NOOP("Data String");
const QString DataString::staticTypeTag = I18N_NOOP("datastring");
const QString DataString::staticTypeString = QT_TR_NOOP("Data String");
const QString DataString::staticTypeTag = QT_TR_NOOP("datastring");

/** Create a DataVector: raw data from a file */
DataString::DataString(ObjectStore *store)
Expand Down Expand Up @@ -92,7 +91,7 @@ void DataString::changeFile(DataSourcePtr in_file) {
Q_ASSERT(myLockStatus() == KstRWLock::WRITELOCKED);

if (!in_file) {
Debug::self()->log(i18n("Data file for string %1 was not opened.", Name()), Debug::Warning);
Debug::self()->log(tr("Data file for string %1 was not opened.").arg(Name()), Debug::Warning);
}
setDataSource(in_file);
}
Expand Down Expand Up @@ -157,7 +156,7 @@ PrimitivePtr DataString::makeDuplicate() const {
QString DataString::descriptionTip() const {
QString IDstring;

IDstring = i18n(
IDstring = tr(
"Data String: %1 = %4\n"
" %2\n"
" Field: %3"
Expand All @@ -167,7 +166,7 @@ QString DataString::descriptionTip() const {


QString DataString::propertyString() const {
return i18n("%1 of %2").arg(_field).arg(dataSource()->fileName());
return tr("%1 of %2").arg(_field).arg(dataSource()->fileName());
}

void DataString::reload() {
Expand Down
22 changes: 10 additions & 12 deletions src/libkst/datavector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@
#include <QDebug>
#include <QXmlStreamWriter>

#include "kst_i18n.h"

#include "datacollection.h"
#include "debug.h"
#include "datasource.h"
Expand All @@ -46,8 +44,8 @@

namespace Kst {

const QString DataVector::staticTypeString = I18N_NOOP("Data Vector");
const QString DataVector::staticTypeTag = I18N_NOOP("datavector");
const QString DataVector::staticTypeString = QT_TR_NOOP("Data Vector");
const QString DataVector::staticTypeTag = QT_TR_NOOP("datavector");


DataVector::DataInfo::DataInfo() :
Expand Down Expand Up @@ -164,7 +162,7 @@ void DataVector::changeFile(DataSourcePtr in_file) {
Q_ASSERT(myLockStatus() == KstRWLock::WRITELOCKED);

if (!in_file) {
Debug::self()->log(i18n("Data file for vector %1 was not opened.", Name()), Debug::Warning);
Debug::self()->log(tr("Data file for vector %1 was not opened.").arg(Name()), Debug::Warning);
}
setDataSource(in_file);
if (dataSource()) {
Expand Down Expand Up @@ -788,31 +786,31 @@ QString DataVector::descriptionTip() const {
QString IDstring;
//QString range_string;

IDstring = i18n(
IDstring = tr(
"Data Vector: %1\n"
" %2\n"
" Field: %3"
).arg(Name()).arg(dataSource()->fileName()).arg(_field);

if (countFromEOF()) {
IDstring += i18n("\n Last %1 frames.").arg(numFrames());
IDstring += tr("\n Last %1 frames.").arg(numFrames());
} else if (readToEOF()) {
IDstring += i18n("\n Frame %1 to end.").arg(startFrame());
IDstring += tr("\n Frame %1 to end.").arg(startFrame());
} else {
IDstring += i18n("\n %1 Frames starting at %2.").arg(numFrames()).arg(startFrame());
IDstring += tr("\n %1 Frames starting at %2.").arg(numFrames()).arg(startFrame());
}
if (skip()) {
if (!doAve()) {
IDstring+=i18n("\n Read 1 sample per %1 frames.").arg(skip());
IDstring+=tr("\n Read 1 sample per %1 frames.").arg(skip());
} else {
IDstring+=i18n("\n Average each %1 frames.").arg(skip());
IDstring+=tr("\n Average each %1 frames.").arg(skip());
}
}
return IDstring;
}

QString DataVector::propertyString() const {
return i18n("%2 F0: %3 N: %4 of %1").arg(dataSource()->fileName()).arg(_field).arg(startFrame()).arg(numFrames());
return tr("%2 F0: %3 N: %4 of %1").arg(dataSource()->fileName()).arg(_field).arg(startFrame()).arg(numFrames());
}


Expand Down
18 changes: 9 additions & 9 deletions src/libkst/debug.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
#include <qlocale.h>
#include <qapplication.h>
#include <qdebug.h>
#include "kst_i18n.h"

#include "datasourcepluginmanager.h"

#include "ksttimers.h"
Expand Down Expand Up @@ -129,29 +129,29 @@ void Debug::clear() {
QString Debug::label(LogLevel level) const {
switch (level) {
case Notice:
return i18nc("log level notice", "Notice");
return tr("Notice");
case Warning:
return i18nc("log level warning", "Warning");
return tr("Warning");
case Error:
return i18nc("log level error", "Error");
return tr("Error");
case DebugLog:
return i18nc("log level debug", "Debug");
return tr("Debug");
default:
return i18nc("log level other", "Other");
return tr("Other");
}
}


QString Debug::text() {
QMutexLocker ml(&_lock);
QString body = i18n("Kst version %1\n\n\nKst log:\n").arg(KSTVERSION);
QString body = tr("Kst version %1\n\n\nKst log:\n").arg(KSTVERSION);

QLocale locale;
for (int i = 0; i < _messages.count(); i++ ) {
body += i18nc("date leveltext: message", "%1 %2: %3\n", _messages[i].date.toString(locale.dateFormat()), label(_messages[i].level), _messages[i].msg);
body += QString("%1 %2: %3\n").arg(_messages[i].date.toString(locale.dateFormat())).arg(label(_messages[i].level)).arg(_messages[i].msg);
}

body += i18n("\n\nData-source plugins:");
body += tr("\n\nData-source plugins:");
QStringList dsp = dataSourcePlugins();
for (QStringList::ConstIterator it = dsp.constBegin(); it != dsp.constEnd(); ++it) {
body += '\n';
Expand Down
5 changes: 2 additions & 3 deletions src/libkst/editablematrix.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,11 @@
#include "debug.h"
#include <qbytearray.h>
#include <QXmlStreamWriter>
#include "kst_i18n.h"

namespace Kst {

const QString EditableMatrix::staticTypeString = I18N_NOOP("Editable Matrix");
const QString EditableMatrix::staticTypeTag = I18N_NOOP("editablematrix");
const QString EditableMatrix::staticTypeString = QT_TR_NOOP("Editable Matrix");
const QString EditableMatrix::staticTypeTag = QT_TR_NOOP("editablematrix");

EditableMatrix::EditableMatrix(ObjectStore *store)
: Matrix(store) {
Expand Down
10 changes: 4 additions & 6 deletions src/libkst/editablevector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,10 @@
#include <QXmlStreamWriter>

#include "debug.h"
#include "kst_i18n.h"

namespace Kst {

const QString EditableVector::staticTypeString = I18N_NOOP("Editable Vector");
const QString EditableVector::staticTypeTag = I18N_NOOP("editablevector");
const QString EditableVector::staticTypeString = QT_TR_NOOP("Editable Vector");
const QString EditableVector::staticTypeTag = QT_TR_NOOP("editablevector");

EditableVector::EditableVector(ObjectStore *store)
: Vector(store), _sum(0.0) {
Expand All @@ -36,7 +34,7 @@ EditableVector::EditableVector(ObjectStore *store)


const QString& EditableVector::typeString() const {
return staticTypeString;
return tr(staticTypeString.toLatin1());
}


Expand Down Expand Up @@ -99,7 +97,7 @@ QString EditableVector::_automaticDescriptiveName() const {
}

QString EditableVector::descriptionTip() const {
return i18n("Editable Vector: %1\n"
return tr("Editable Vector: %1\n"
" %2 values").arg(Name()).arg(length());

}
Expand Down
6 changes: 2 additions & 4 deletions src/libkst/generatedmatrix.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,13 @@
#include <QTextStream>
#include <QTextDocument>

#include "kst_i18n.h"

#include <QXmlStreamWriter>
#include <QVariant>

namespace Kst {

const QString GeneratedMatrix::staticTypeString = I18N_NOOP("Generated Matrix");
const QString GeneratedMatrix::staticTypeTag = I18N_NOOP("generatedmatrix");
const QString GeneratedMatrix::staticTypeString = QT_TR_NOOP("Generated Matrix");
const QString GeneratedMatrix::staticTypeTag = QT_TR_NOOP("generatedmatrix");

GeneratedMatrix::GeneratedMatrix(ObjectStore *store) : Matrix(store) {
_saveable = true;
Expand Down
10 changes: 4 additions & 6 deletions src/libkst/generatedvector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,11 @@
#include <QDebug>
#include <QXmlStreamWriter>

#include "kst_i18n.h"


namespace Kst {

const QString GeneratedVector::staticTypeString = I18N_NOOP("Generated Vector");
const QString GeneratedVector::staticTypeTag = I18N_NOOP("generatedvector");
const QString GeneratedVector::staticTypeString = QT_TR_NOOP("Generated Vector");
const QString GeneratedVector::staticTypeTag = QT_TR_NOOP("generatedvector");

GeneratedVector::GeneratedVector(ObjectStore *store)
: Vector(store) {
Expand Down Expand Up @@ -88,12 +86,12 @@ QString GeneratedVector::_automaticDescriptiveName() const {
}

QString GeneratedVector::descriptionTip() const {
return i18n("Generated Vector: %1\n"
return tr("Generated Vector: %1\n"
" %2 values from %3 to %4").arg(Name()).arg(length()).arg(_v[0]).arg(_v[length()-1]);
}

QString GeneratedVector::propertyString() const {
return i18n("%3 points from %1 to %2").arg(_v[0]).arg(_v[length()-1]).arg(length());
return tr("%3 points from %1 to %2").arg(_v[0]).arg(_v[length()-1]).arg(length());
}

}
Expand Down
2 changes: 1 addition & 1 deletion src/libkst/generatedvector.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
#define GENERATEDVECTOR_H

#include "vector.h"
//#include "kst_i18n.h"
//
#include "kst_export.h"

namespace Kst {
Expand Down
68 changes: 0 additions & 68 deletions src/libkst/kst_i18n.h

This file was deleted.

7 changes: 3 additions & 4 deletions src/libkst/matrix.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
#include <QXmlStreamWriter>

#include "debug.h"
#include "kst_i18n.h"
#include "math_kst.h"
#include "datacollection.h"
#include "objectstore.h"
Expand All @@ -36,7 +35,7 @@

namespace Kst {

const QString Matrix::staticTypeString = I18N_NOOP("Matrix");
const QString Matrix::staticTypeString = QT_TR_NOOP("Matrix");

Matrix::Matrix(ObjectStore *store)
: Primitive(store, 0L), _NS(0), _NRealS(0), _nX(1), _nY(0), _minX(0), _minY(0), _stepX(1), _stepY(1),
Expand Down Expand Up @@ -636,14 +635,14 @@ void Matrix::change(QByteArray &data, uint nX, uint nY, double minX, double minY
qds >> _z[i]; // stored in the same order as it was saved
}
if (i < nX*nY) {
Debug::self()->log(i18n("Saved matrix contains less data than it claims."), Debug::Warning);
Debug::self()->log(tr("Saved matrix contains less data than it claims."), Debug::Warning);
resizeZ(i, false);
}
internalUpdate();
}

QString Matrix::descriptionTip() const {
return i18n("Matrix: %1\n %2 x %3").arg(Name()).arg(_nX).arg(_nY);
return tr("Matrix: %1\n %2 x %3").arg(Name()).arg(_nX).arg(_nY);
}

QString Matrix::sizeString() const {
Expand Down
4 changes: 2 additions & 2 deletions src/libkst/object.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@
***************************************************************************/

#include "object.h"
#include "kst_i18n.h"


#include "objectstore.h"

namespace Kst {

const QString Object::staticTypeString = I18N_NOOP("Object");
const QString Object::staticTypeString = QT_TR_NOOP("Object");

Object::Object() :
Shared(), KstRWLock(), NamedObject(),
Expand Down
1 change: 0 additions & 1 deletion src/libkst/objectstore.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
#include <QDebug>

#include "kst_export.h"
#include "kst_i18n.h"
#include "object.h"
#include "objectlist.h"
#include "rwlock.h"
Expand Down
3 changes: 1 addition & 2 deletions src/libkst/primitive.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,12 @@

#include <limits.h>

#include "kst_i18n.h"
#include "updatemanager.h"
#include "datasource.h"

namespace Kst {

const QString Primitive::staticTypeString = I18N_NOOP("Primitive");
const QString Primitive::staticTypeString = QT_TR_NOOP("Primitive");

Primitive::Primitive(ObjectStore *store, Object *provider)
: Object(), _provider(provider) {
Expand Down
12 changes: 5 additions & 7 deletions src/libkst/scalar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,11 @@
#include <QTextDocument>
#include <QXmlStreamWriter>

#include "kst_i18n.h"

namespace Kst {


const QString Scalar::staticTypeString = I18N_NOOP("Scalar");
const QString Scalar::staticTypeTag = I18N_NOOP("scalar");
const QString Scalar::staticTypeString = QT_TR_NOOP("Scalar");
const QString Scalar::staticTypeTag = QT_TR_NOOP("scalar");


/** Create the base scalar */
Expand Down Expand Up @@ -137,9 +135,9 @@ void Scalar::setEditable(bool editable) {

QString Scalar::descriptionTip() const {
if (_provider) {
return i18n("Scalar: %1 = %2\n%3").arg(Name()).arg(value()).arg(_provider->descriptionTip());
return tr("Scalar: %1 = %2\n%3").arg(Name()).arg(value()).arg(_provider->descriptionTip());
} else {
return i18n("Scalar: %1 = %2").arg(Name()).arg(value());
return tr("Scalar: %1 = %2").arg(Name()).arg(value());
}
}

Expand All @@ -156,7 +154,7 @@ QString Scalar::sizeString() const {
}

QString Scalar::propertyString() const {
return i18n("Value: %1").arg(value());
return tr("Value: %1").arg(value());
}
}
// vim: et ts=2 sw=2
9 changes: 3 additions & 6 deletions src/libkst/string_kst.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,10 @@
#include <QTextDocument>
#include <QXmlStreamWriter>

#include "kst_i18n.h"


namespace Kst {

const QString String::staticTypeString = I18N_NOOP("String");
const QString String::staticTypeTag = I18N_NOOP("string");
const QString String::staticTypeString = QT_TR_NOOP("String");
const QString String::staticTypeTag = QT_TR_NOOP("string");

String::String(ObjectStore *store)
: Primitive(store, 0L), _orphan(false), _editable(false) {
Expand Down Expand Up @@ -103,7 +100,7 @@ QString String::_automaticDescriptiveName() const {


QString String::descriptionTip() const {
return i18n("String: %1").arg(Name());
return tr("String: %1").arg(Name());
}


Expand Down
10 changes: 5 additions & 5 deletions src/libkst/vector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
#include <QApplication>
#include <QXmlStreamWriter>

#include "kst_i18n.h"


#include "datacollection.h"
#include "math_kst.h"
Expand All @@ -38,8 +38,8 @@ namespace Kst {

#define INITSIZE 1

const QString Vector::staticTypeString = I18N_NOOP("Vector");
const QString Vector::staticTypeTag = I18N_NOOP("vector");
const QString Vector::staticTypeString = QT_TR_NOOP("Vector");
const QString Vector::staticTypeTag = QT_TR_NOOP("vector");

/** Create a vector */
Vector::Vector(ObjectStore *store)
Expand Down Expand Up @@ -636,14 +636,14 @@ void Vector::change(QByteArray &data) {

QString Vector::propertyString() const {
if(_provider) {
return i18n("Provider: %1").arg(_provider->Name());
return tr("Provider: %1").arg(_provider->Name());
} else {
return Name();
}
}

QString Vector::descriptionTip() const {
return i18n("Vector: %1\n %2 samples\n%3").arg(Name()).arg(length()).arg(_provider->descriptionTip());
return tr("Vector: %1\n %2 samples\n%3").arg(Name()).arg(length()).arg(_provider->descriptionTip());
}

QString Vector::sizeString() const {
Expand Down
12 changes: 6 additions & 6 deletions src/libkst/vscalar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,15 @@
#include <QTextDocument>
#include <QXmlStreamWriter>

#include "kst_i18n.h"

#include "debug.h"
#include "objectstore.h"
#include "updatemanager.h"

namespace Kst {

const QString VScalar::staticTypeString = I18N_NOOP("Vector Field Scalar");
const QString VScalar::staticTypeTag = I18N_NOOP("vscalar");
const QString VScalar::staticTypeString = QT_TR_NOOP("Vector Field Scalar");
const QString VScalar::staticTypeTag = QT_TR_NOOP("vscalar");

/** Create a VScalar: a scalar from a single sample of a vector field */
VScalar::VScalar(ObjectStore *store)
Expand Down Expand Up @@ -69,7 +69,7 @@ void VScalar::changeFile(DataSourcePtr in_file) {
Q_ASSERT(myLockStatus() == KstRWLock::WRITELOCKED);

if (!in_file) {
Debug::self()->log(i18n("Data file for scalar %1 was not opened.", Name()), Debug::Warning);
Debug::self()->log(tr("Data file for scalar %1 was not opened.").arg(Name()), Debug::Warning);
}
}

Expand Down Expand Up @@ -170,7 +170,7 @@ DataSourcePtr VScalar::dataSource() const {
QString VScalar::descriptionTip() const {
QString IDstring;

IDstring = i18n(
IDstring = tr(
"Data Scalar: %1 = %4\n"
" %2\n"
" Field: %3\n"
Expand Down Expand Up @@ -204,7 +204,7 @@ bool VScalar::_checkValidity(const DataSourcePtr ds) const {


QString VScalar::propertyString() const {
return i18n("%2 frame %3 of %1 = %4").arg(dataSource()->fileName()).arg(field()).arg(F0()).arg(value());
return tr("%2 frame %3 of %1 = %4").arg(dataSource()->fileName()).arg(field()).arg(F0()).arg(value());
}

}
Expand Down
8 changes: 4 additions & 4 deletions src/libkstapp/axistab.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,11 @@ AxisTab::AxisTab(QWidget *parent)
setAxisMinorGridLineColor(Qt::gray);

for (uint i = 0; i < numAxisDisplays; i++) {
_scaleDisplayType->addItem(AxisDisplays[i].label, QVariant(AxisDisplays[i].type));
_scaleDisplayType->addItem(tr(AxisDisplays[i].label), QVariant(AxisDisplays[i].type));
}

for (uint i = 0; i < numAxisInterpretations; i++) {
_scaleInterpretType->addItem(AxisInterpretations[i].label, QVariant(AxisInterpretations[i].type));
_scaleInterpretType->addItem(tr(AxisInterpretations[i].label), QVariant(AxisInterpretations[i].type));
}

connect(_drawAxisMajorTicks, SIGNAL(stateChanged(int)), this, SIGNAL(modified()));
Expand Down Expand Up @@ -657,8 +657,8 @@ void AxisTab::clearTabValues() {
}

void AxisTab::setAsYAxis() {
_hideBottomLeft->setText(i18n("Hide left"));
_hideTopRight->setText(i18n("Hide right"));
_hideBottomLeft->setText(tr("Hide left"));
_hideTopRight->setText(tr("Hide right"));
}

}
Expand Down
2 changes: 1 addition & 1 deletion src/libkstapp/bugreportwizard.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

#include "bugreportwizard.h"

#include "kst_i18n.h"


#include <QUrl>
#include <QDesktopServices>
Expand Down
6 changes: 3 additions & 3 deletions src/libkstapp/changedatasampledialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -257,8 +257,8 @@ void ChangeDataSampleDialog::initializeEntries() {
_dataRange->setSkip(dialogDefaults().value("vector/skip", 0).toInt());
_dataRange->setDoSkip(dialogDefaults().value("vector/doSkip", false).toBool());
_dataRange->setDoFilter(dialogDefaults().value("vector/doAve",false).toBool());
_dataRange->setStartUnits(dialogDefaults().value("vector/startUnits",i18n("frames")).toString());
_dataRange->setRangeUnits(dialogDefaults().value("vector/rangeUnits",i18n("frames")).toString());
_dataRange->setStartUnits(dialogDefaults().value("vector/startUnits",tr("frames")).toString());
_dataRange->setRangeUnits(dialogDefaults().value("vector/rangeUnits",tr("frames")).toString());
}


Expand Down Expand Up @@ -330,7 +330,7 @@ void ChangeDataSampleDialog::apply() {
double memory_available = Data::AvailableMemory();
if (memory_needed-current_memory_used > memory_available) {
//QApplication::restoreOverrideCursor();
QMessageBox::warning(this, i18n("Insufficient Memory"), i18n("You requested to read in %1 MB of data but it seems that you only have approximately %2 MB of usable memory available. You cannot load this much data."
QMessageBox::warning(this, tr("Insufficient Memory"), tr("You requested to read in %1 MB of data but it seems that you only have approximately %2 MB of usable memory available. You cannot load this much data."
).arg((memory_needed-current_memory_used)/(1024*1024)).arg(memory_available/(1024*1024)));
return;
}
Expand Down
52 changes: 26 additions & 26 deletions src/libkstapp/commandlineparser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
#include "datamatrix.h"
#include "image.h"
#include "palette.h"
#include "kst_i18n.h"

#include "updatemanager.h"
#include "dialogdefaults.h"
#include "datasourcepluginmanager.h"
Expand Down Expand Up @@ -137,13 +137,13 @@ static void printText(const QString& text, const QString& detailText = QString()
#endif
}

static void printUsage(const QString &t)

void CommandLineParser::printUsage(const QString &t)
{
printText(QString(usageMessage), QString(usageDetailsMessage), '\n' + t);
printText(tr(usageMessage), tr(usageDetailsMessage), '\n' + t);
}



CommandLineParser::CommandLineParser(Document *doc, MainWindow* mw) :
_mainWindow(mw),
_doAve(false), _doSkip(false), _doConsecutivePlots(true), _useBargraph(false),
Expand Down Expand Up @@ -176,7 +176,7 @@ bool CommandLineParser::_setIntArg(int *arg, QString Message, bool accept_end) {

if (_arguments.count()> 0) {
param = _arguments.takeFirst();
if ((param==i18n("end") || (param=="end")) && (accept_end)) {
if ((param==tr("end") || (param=="end")) && (accept_end)) {
*arg = -1;
} else {
*arg = param.toInt(&ok);
Expand Down Expand Up @@ -229,7 +229,7 @@ DataVectorPtr CommandLineParser::createOrFindDataVector(QString field, DataSourc
if (ds->fileType() == "ASCII file") {
QRegExp num("^[0-9]{1,2}$");
if (num.exactMatch(field)) {
field = i18n("Column %1", field);
field = tr("Column %1").arg(field);
}
}
// check to see if an identical vector already exists. If so, use it.
Expand Down Expand Up @@ -438,28 +438,28 @@ bool CommandLineParser::processCommandLine(bool *ok) {

*ok = false;
} else if (arg == "-f") {
*ok = _setIntArg(&_startFrame, i18n("Usage: -f <startframe>\n"), true);
*ok = _setIntArg(&_startFrame, tr("Usage: -f <startframe>\n"), true);
_document->objectStore()->override.f0 = _startFrame;
} else if (arg == "-n") {
*ok = _setIntArg(&_numFrames, i18n("Usage: -n <numframes>\n"), true);
*ok = _setIntArg(&_numFrames, tr("Usage: -n <numframes>\n"), true);
_document->objectStore()->override.N = _numFrames;
} else if (arg == "-s") {
*ok = _setIntArg(&_skip, i18n("Usage: -s <frames per sample>\n"));
*ok = _setIntArg(&_skip, tr("Usage: -s <frames per sample>\n"));
_document->objectStore()->override.skip = _skip;
} else if (arg == "-a") {
_doAve = true;
_document->objectStore()->override.doAve = _doAve;
} else if (arg == "-P") {
QString plot_name;
*ok = _setStringArg(plot_name,i18n("Usage: -P <plotname>\n"));
*ok = _setStringArg(plot_name,tr("Usage: -P <plotname>\n"));
_doConsecutivePlots=false;
createOrFindPlot(plot_name);
} else if (arg == "-A") {
_doConsecutivePlots = true;
} else if (arg == "-T") {
QString tab_name;
_doConsecutivePlots = true;
*ok = _setStringArg(tab_name,i18n("Usage: -T <tab name>\n"));
*ok = _setStringArg(tab_name,tr("Usage: -T <tab name>\n"));
if (dataPlotted) {
createOrFindTab(tab_name);
} else {
Expand All @@ -481,25 +481,25 @@ bool CommandLineParser::processCommandLine(bool *ok) {
_usePoints = false;
_overrideStyle = true;
} else if (arg == "-x") {
*ok = _setStringArg(_xField,i18n("Usage: -x <xfieldname>\n"));
*ok = _setStringArg(_xField,tr("Usage: -x <xfieldname>\n"));
} else if (arg == "-e") {
*ok = _setStringArg(_errorField,i18n("Usage: -e <errorfieldname>\n"));
*ok = _setStringArg(_errorField,tr("Usage: -e <errorfieldname>\n"));
} else if (arg == "-r") {
*ok = _setDoubleArg(&_sampleRate,i18n("Usage: -r <samplerate>\n"));
*ok = _setDoubleArg(&_sampleRate,tr("Usage: -r <samplerate>\n"));
} else if (arg == "-y") {
QString field;
*ok = _setStringArg(field,i18n("Usage: -y <fieldname>\n"));
*ok = _setStringArg(field,tr("Usage: -y <fieldname>\n"));

if (_fileNames.size()<1) {
printUsage(i18n("No data files specified\n"));
printUsage(tr("No data files specified\n"));
*ok = false;
break;
}
for (int i_file=0; i_file<_fileNames.size(); i_file++) {
QString file = _fileNames.at(i_file);
QFileInfo info(file);
if (!info.exists()) {
printUsage(i18n("file %1 does not exist\n").arg(file));
printUsage(tr("file %1 does not exist\n").arg(file));
*ok = false;
break;
}
Expand Down Expand Up @@ -535,14 +535,14 @@ bool CommandLineParser::processCommandLine(bool *ok) {
_overrideStyle = false;
} else if (arg == "-p") {
QString field;
*ok = _setStringArg(field,i18n("Usage: -p <fieldname>\n"));
*ok = _setStringArg(field,tr("Usage: -p <fieldname>\n"));

if (*ok) {
for (int i_file=0; i_file<_fileNames.size(); i_file++) {
QString file = _fileNames.at(i_file);
QFileInfo info(file);
if (!info.exists()) {
printUsage(i18n("file %1 does not exist\n").arg(file));
printUsage(tr("file %1 does not exist\n").arg(file));
*ok = false;
break;
}
Expand Down Expand Up @@ -584,14 +584,14 @@ bool CommandLineParser::processCommandLine(bool *ok) {
_ylabel.clear();
} else if (arg == "-h") {
QString field;
*ok = _setStringArg(field,i18n("Usage: -h <fieldname>\n"));
*ok = _setStringArg(field,tr("Usage: -h <fieldname>\n"));

if (*ok) {
for ( int i_file=0; i_file<_fileNames.size(); i_file++ ) {
QString file = _fileNames.at ( i_file );
QFileInfo info ( file );
if ( !info.exists() || !info.isFile() ) {
printUsage ( i18n ( "file %1 does not exist\n" ).arg ( file ) );
printUsage ( tr ( "file %1 does not exist\n" ).arg ( file ) );
*ok = false;
break;
}
Expand Down Expand Up @@ -625,13 +625,13 @@ bool CommandLineParser::processCommandLine(bool *ok) {
}
} else if (arg == "-z") {
QString field;
*ok = _setStringArg(field,i18n("Usage: -z <fieldname>\n"));
*ok = _setStringArg(field,tr("Usage: -z <fieldname>\n"));
if (*ok) {
for (int i_file=0; i_file<_fileNames.size(); i_file++) {
QString file = _fileNames.at(i_file);
QFileInfo info(file);
if (!info.exists() || !info.isFile()) {
printUsage(i18n("file %1 does not exist\n").arg(file));
printUsage(tr("file %1 does not exist\n").arg(file));
*ok = false;
break;
}
Expand All @@ -652,12 +652,12 @@ bool CommandLineParser::processCommandLine(bool *ok) {
dataPlotted = true;
}
} else if (arg == "-F") {
*ok = _setStringArg(_document->objectStore()->override.fileName, i18n("Usage: -F <datafile>\n"));
*ok = _setStringArg(_document->objectStore()->override.fileName, tr("Usage: -F <datafile>\n"));
} else if (arg == "--png") {
*ok = _setStringArg(_pngFile, i18n("Usage: --png <filename>\n"));
*ok = _setStringArg(_pngFile, tr("Usage: --png <filename>\n"));
#ifndef KST_NO_PRINTER
} else if (arg == "--print") {
*ok = _setStringArg(_printFile, i18n("Usage: --print <filename>\n"));
*ok = _setStringArg(_printFile, tr("Usage: --print <filename>\n"));
} else if (arg == "--landscape") {
_landscape = true;
} else if (arg == "--portrait") {
Expand Down
4 changes: 3 additions & 1 deletion src/libkstapp/commandlineparser.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,9 @@ namespace Kst {
/**
@author Barth Netterfield <netterfield@physics.utoronto.ca>
*/
class CommandLineParser
class CommandLineParser:QObject
{
Q_OBJECT
public:
CommandLineParser(Document *doc, MainWindow* mw);
~CommandLineParser();
Expand Down Expand Up @@ -87,6 +88,7 @@ class CommandLineParser
void addCurve(CurvePtr curve);
ObjectList<Object> autoCurves(DataSourcePtr ds);
void applyLabels();
void printUsage(const QString &t);
};

}
Expand Down
8 changes: 4 additions & 4 deletions src/libkstapp/contenttab.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ ContentTab::ContentTab(QWidget *parent, ObjectStore *store)
_down->setIcon(QPixmap(":kst_downarrow.png"));
_add->setIcon(QPixmap(":kst_rightarrow.png"));
_remove->setIcon(QPixmap(":kst_leftarrow.png"));
_up->setToolTip(i18n("Raise in plot order: Alt+Up"));
_down->setToolTip(i18n("Lower in plot order: Alt+Down"));
_add->setToolTip(i18n("Select: Alt+s"));
_remove->setToolTip(i18n("Remove: Alt+r"));
_up->setToolTip(tr("Raise in plot order: Alt+Up"));
_down->setToolTip(tr("Lower in plot order: Alt+Down"));
_add->setToolTip(tr("Select: Alt+s"));
_remove->setToolTip(tr("Remove: Alt+r"));

_scriptLineEdit1->hide();
_scriptLineEdit2->hide();
Expand Down
2 changes: 1 addition & 1 deletion src/libkstapp/datamanager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ DataManager::DataManager(QWidget *parent, Document *doc)
_session->setModel(_proxyModel);

#if QT_VERSION >= 0x040700
_filterText->setPlaceholderText(i18n("Enter your filter here (wildcards allowed)"));
_filterText->setPlaceholderText(tr("Enter your filter here (wildcards allowed)"));
#endif

connect(_filterText, SIGNAL(textChanged(QString)), _proxyModel, SLOT(setFilterWildcard(QString)));
Expand Down
18 changes: 9 additions & 9 deletions src/libkstapp/datawizard.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -182,10 +182,10 @@ DataWizardPageVectors::DataWizardPageVectors(QWidget *parent)
_down->setIcon(QPixmap(":kst_downarrow.png"));
_add->setIcon(QPixmap(":kst_rightarrow.png"));
_remove->setIcon(QPixmap(":kst_leftarrow.png"));
_up->setToolTip(i18n("Raise in plot order: Alt+Up"));
_down->setToolTip(i18n("Lower in plot order: Alt+Down"));
_add->setToolTip(i18n("Select: Alt+s"));
_remove->setToolTip(i18n("Remove: Alt+r"));
_up->setToolTip(tr("Raise in plot order: Alt+Up"));
_down->setToolTip(tr("Lower in plot order: Alt+Down"));
_add->setToolTip(tr("Select: Alt+s"));
_remove->setToolTip(tr("Remove: Alt+r"));

connect(_add, SIGNAL(clicked()), this, SLOT(add()));
connect(_remove, SIGNAL(clicked()), this, SLOT(remove()));
Expand Down Expand Up @@ -215,7 +215,7 @@ void DataWizardPageVectors::updateVectors() {
_vectorsToPlot->clear();

_vectors->addItems(((DataWizard*)wizard())->dataSourceFieldList());
_availableLabel->setText(QString::number(_vectors->count()) + i18n(" vector(s) available"));
_availableLabel->setText(QString::number(_vectors->count()) + tr(" vector(s) available"));
}


Expand All @@ -240,7 +240,7 @@ void DataWizardPageVectors::remove() {
}
_vectors->clearSelection();

_selectedLabel->setText(QString::number(_vectorsToPlot->count()) + i18n(" vector(s) selected"));
_selectedLabel->setText(QString::number(_vectorsToPlot->count()) + tr(" vector(s) selected"));

emit completeChanged();
}
Expand All @@ -256,7 +256,7 @@ void DataWizardPageVectors::add() {
}

_vectorsToPlot->setCurrentRow(_vectorsToPlot->count() - 1);
_selectedLabel->setText(QString::number(_vectorsToPlot->count()) + i18n(" vector(s) selected"));
_selectedLabel->setText(QString::number(_vectorsToPlot->count()) + tr(" vector(s) selected"));
emit completeChanged();
}

Expand Down Expand Up @@ -584,7 +584,7 @@ DataWizardPageDataPresentation::DataWizardPageDataPresentation(ObjectStore *stor
connect(_xVectorExisting, SIGNAL(selectionChanged(QString)), this, SLOT(optionsUpdated()));

_FFTOptions->GroupBoxFFTOptions->setCheckable(true);
_FFTOptions->GroupBoxFFTOptions->setTitle(i18n("Create S&pectra Plots. Set FFT options below:"));
_FFTOptions->GroupBoxFFTOptions->setTitle(tr("Create S&pectra Plots. Set FFT options below:"));

_FFTOptions->GroupBoxFFTOptions->setChecked(dialogDefaults().value("wizard/doPSD",false).toBool());
_xAxisGroup->setChecked(dialogDefaults().value("wizard/doXY",true).toBool());
Expand Down Expand Up @@ -875,7 +875,7 @@ void DataWizard::finished() {
ds->unlock();
if (memoryRequested > memoryAvailable) {
QApplication::restoreOverrideCursor();
QMessageBox::warning(this, i18n("Insufficient Memory"), i18n("You requested to read in %1 MB of data but it seems that you only have approximately %2 MB of usable memory available. You cannot load this much data.").arg(memoryRequested/(1024*1024)).arg(memoryAvailable/(1024*1024)));
QMessageBox::warning(this, tr("Insufficient Memory"), tr("You requested to read in %1 MB of data but it seems that you only have approximately %2 MB of usable memory available. You cannot load this much data.").arg(memoryRequested/(1024*1024)).arg(memoryAvailable/(1024*1024)));
return;
}

Expand Down
6 changes: 3 additions & 3 deletions src/libkstapp/debugdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#include "logevents.h"
#include "datasource.h"
#include "datasourcepluginmanager.h"
#include "kst_i18n.h"


#include <QDebug>

Expand All @@ -38,9 +38,9 @@ DebugDialog::DebugDialog(QWidget *parent)
connect(_showError, SIGNAL(toggled(bool)), _log, SLOT(setShowError(bool)));

if (!Debug::self()->kstRevision().isEmpty())
_buildInfo->setText(i18n("<h1>Kst</h1> Version %1 (%2)").arg(KSTVERSION).arg(Debug::self()->kstRevision()));
_buildInfo->setText(tr("<h1>Kst</h1> Version %1 (%2)").arg(KSTVERSION).arg(Debug::self()->kstRevision()));
else
_buildInfo->setText(i18n("<h1>Kst</h1> Version %1").arg(KSTVERSION));
_buildInfo->setText(tr("<h1>Kst</h1> Version %1").arg(KSTVERSION));
}


Expand Down
10 changes: 5 additions & 5 deletions src/libkstapp/defaultlabelpropertiestab.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
***************************************************************************/
#include "defaultlabelpropertiestab.h"

#include "kst_i18n.h"


#include <math.h>

Expand All @@ -30,10 +30,10 @@ DefaultLabelPropertiesTab::DefaultLabelPropertiesTab(QWidget *parent)
setupUi(this);
setTabTitle(tr("Fonts"));

_referenceViewSizeCombo->addItem(i18n("Letter"/*, "US Letter sized paper"*/));
_referenceViewSizeCombo->addItem(i18n("A4"/*, "A4 sized paper"*/));
_referenceViewSizeCombo->addItem(i18n("Journal Plot"));
_referenceViewSizeCombo->addItem(i18n("Custom"/*, "Custom page size"*/));
_referenceViewSizeCombo->addItem(tr("Letter"/*, "US Letter sized paper"*/));
_referenceViewSizeCombo->addItem(tr("A4"/*, "A4 sized paper"*/));
_referenceViewSizeCombo->addItem(tr("Journal Plot"));
_referenceViewSizeCombo->addItem(tr("Custom"/*, "Custom page size"*/));

_referenceViewSizeCombo->setCurrentIndex(0);
referenceViewSizeComboChanged(0);
Expand Down
8 changes: 4 additions & 4 deletions src/libkstapp/differentiatecurvesdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,10 @@ DifferentiateCurvesDialog::DifferentiateCurvesDialog(QWidget *parent)
_down->setIcon(QPixmap(":kst_downarrow.png"));
_add->setIcon(QPixmap(":kst_rightarrow.png"));
_remove->setIcon(QPixmap(":kst_leftarrow.png"));
_up->setToolTip(i18n("Move the selected property up the priority list"));
_down->setToolTip(i18n("Move the selected property down the priority list"));
_add->setToolTip(i18n("Add the selected property to the list of properties to cycle through"));
_remove->setToolTip(i18n("Remove the selected property from the list of properties to cycle through"));
_up->setToolTip(tr("Move the selected property up the priority list"));
_down->setToolTip(tr("Move the selected property down the priority list"));
_add->setToolTip(tr("Add the selected property to the list of properties to cycle through"));
_remove->setToolTip(tr("Remove the selected property from the list of properties to cycle through"));

_maxLineWidth->setMaximum(LINEWIDTH_MAX);
}
Expand Down
2 changes: 1 addition & 1 deletion src/libkstapp/generaltab.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
***************************************************************************/
#include "generaltab.h"

#include "kst_i18n.h"


namespace Kst {

Expand Down
2 changes: 1 addition & 1 deletion src/libkstapp/labelpropertiestab.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ LabelPropertiesTab::LabelPropertiesTab(QWidget *parent)

_labelText->setObjectStore(kstApp->mainWindow()->document()->objectStore());

_labelText->setWhatsThis(i18n("<qt>The syntax for labels is a derivative of a subset of LaTeX. "
_labelText->setWhatsThis(tr("<qt>The syntax for labels is a derivative of a subset of LaTeX. "
"Supported syntax is: <b>\\[greeklettername]</b> and <b>\\[Greeklettername]</b>, "
"<b>\\approx</b>, <b>\\cdot</b>, <b>\\ge</b>, <b>\\geq</b>, <b>\\inf</b> ,"
"<b>\\int</b>, <b>\\le</b>, <b>\\leq</b>, <b>\\ne</b>, <b>\\n</b>, "
Expand Down
10 changes: 5 additions & 5 deletions src/libkstapp/legenditem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -127,17 +127,17 @@ void LegendItem::paint(QPainter *painter) {
QString y_label = label_info.name;
if (!sameYUnits) {
if (!label_info.units.isEmpty()) {
y_label = i18n("%1 \\[%2\\]").arg(y_label).arg(label_info.units);
y_label = tr("%1 \\[%2\\]").arg(y_label).arg(label_info.units);
}
}
if (!y_label.isEmpty()) {
LabelInfo xlabel_info = relation->xLabelInfo();
if (!sameX) {
label = i18n("%1 vs %2").arg(y_label).arg(xlabel_info.name);
label = tr("%1 vs %2").arg(y_label).arg(xlabel_info.name);
} else if (xlabel_info.quantity.isEmpty()) {
label = y_label;
} else if (xlabel_info.quantity != xlabel_info.name) {
label = i18n("%1 vs %2").arg(y_label).arg(xlabel_info.name);
label = tr("%1 vs %2").arg(y_label).arg(xlabel_info.name);
} else {
label = y_label;
}
Expand Down Expand Up @@ -516,7 +516,7 @@ void LegendItem::setFontScale(const qreal scale) {

QString LegendItem::_automaticDescriptiveName() const {

QString name = i18n("Empty Legend");
QString name = tr("Empty Legend");
if (_auto) {
name = _plotItem->descriptiveName();
} else if (_relations.size()>0) {
Expand All @@ -535,7 +535,7 @@ QString LegendItem::descriptionTip() const {
contents += QString(" %1\n").arg(relation->Name());
}

return i18n("Plot: %1 \nContents:\n %2").arg(Name()).arg(contents);
return tr("Plot: %1 \nContents:\n %2").arg(Name()).arg(contents);
}

}
Expand Down
8 changes: 4 additions & 4 deletions src/libkstapp/legendtab.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ LegendTab::LegendTab(QWidget *parent)
_down->setIcon(QPixmap(":kst_downarrow.png"));
_add->setIcon(QPixmap(":kst_rightarrow.png"));
_remove->setIcon(QPixmap(":kst_leftarrow.png"));
_up->setToolTip(i18n("Raise in list order: Alt+Up"));
_down->setToolTip(i18n("Lower in list order: Alt+Down"));
_add->setToolTip(i18n("Select: Alt+s"));
_remove->setToolTip(i18n("Remove: Alt+r"));
_up->setToolTip(tr("Raise in list order: Alt+Up"));
_down->setToolTip(tr("Lower in list order: Alt+Down"));
_add->setToolTip(tr("Select: Alt+s"));
_remove->setToolTip(tr("Remove: Alt+r"));

_bold->setFixedWidth(32);
_bold->setFixedHeight(32);
Expand Down
12 changes: 6 additions & 6 deletions src/libkstapp/logdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -151,26 +151,26 @@ void LogDialog::scriptStdOut() {


void LogDialog::scriptStarted() {
_scriptRunning->setText(i18n("Script: Running"));
_scriptRunning->setText(tr("Script: Running"));
}


void LogDialog::scriptFinished(int code) {
if (code == 0) {
_scriptRunning->setText(i18n("Script: Finished"));
_scriptRunning->setText(tr("Script: Finished"));
} else {
_scriptRunning->setText(i18n("Script: return code %1").arg(code));
_scriptRunning->setText(tr("Script: return code %1").arg(code));
}
}


void LogDialog::scriptError(QProcess::ProcessError p) {
if (p==QProcess::FailedToStart) {
_scriptRunning->setText(i18n("Script error: Failed to start"));
_scriptRunning->setText(tr("Script error: Failed to start"));
} else if (p==QProcess::Crashed) {
_scriptRunning->setText(i18n("Script error: Crashed"));
_scriptRunning->setText(tr("Script error: Crashed"));
} else {
_scriptRunning->setText(i18n("Script error:"));
_scriptRunning->setText(tr("Script error:"));
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/libkstapp/logdialog.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
#include <QProcess>

#include "kst_export.h"
#include "kst_i18n.h"


namespace Kst {

Expand Down
4 changes: 2 additions & 2 deletions src/libkstapp/logwidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#include <events.h>
#include <logevents.h>

#include "kst_i18n.h"


#include <QDebug>

Expand Down Expand Up @@ -54,7 +54,7 @@ void LogWidget::logAdded(const Debug::LogMessage& msg) {
return;
}

append(i18n("%1<b>%2</b> %3").arg(sym).arg(msg.date.toString()).arg(msg.msg));
append(tr("%1<b>%2</b> %3").arg(sym).arg(msg.date.toString()).arg(msg.msg));
}


Expand Down
2 changes: 1 addition & 1 deletion src/libkstapp/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1514,7 +1514,7 @@ void MainWindow::createToolBars() {

void MainWindow::createStatusBar() {
_messageLabel = new QLabel(statusBar());
setStatusMessage(i18n("Ready"), 3000);
setStatusMessage(tr("Ready"), 3000);

_progressBar = new QProgressBar(statusBar());
_progressBar->setFixedWidth(200);
Expand Down
10 changes: 5 additions & 5 deletions src/libkstapp/plotaxis.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -826,36 +826,36 @@ void PlotAxis::updateInterpretTicks(MajorTickMode tickMode) {
if (range_jd > minimum_units*365.0) {
// use years
range_u = range_jd/365.25;
units = i18n(" [Years]");
units = tr(" [Years]");
computeMajorTickSpacing(&tickspacing_u, &_automaticMinorTickCount, tickMode, range_u);
// round base to year;
base_jd = floor((min_jd - (JD1900 + 0.5))/365.25) * 365.25 + (JD1900 + 0.5) + 1.0;
} else if (range_jd > minimum_units) {
// use days
range_u = range_jd;
units = i18n(" [Days]");
units = tr(" [Days]");
computeMajorTickSpacing(&tickspacing_u, &_automaticMinorTickCount, tickMode, range_u);
// round base to day
base_jd = floor(min_jd)+1.0;
} else if (range_jd > minimum_units/24.0) {
// use hours
range_u = range_jd*24.0;
units = i18n(" [Hours]");
units = tr(" [Hours]");
computeMajorTickSpacing(&tickspacing_u, &_automaticMinorTickCount, tickMode, range_u, Hour);
// round base to hour
double d_jd = min_jd - floor(min_jd);
base_jd = floor(min_jd) + (floor(d_jd*24.0/tickspacing_u)+1.0)/(24.0/tickspacing_u);
} else if (range_jd > minimum_units/(24.0*60.0)) {
// use minutes
range_u = range_jd*24.0*60.0;
units = i18n(" [Minutes]");
units = tr(" [Minutes]");
computeMajorTickSpacing(&tickspacing_u, &_automaticMinorTickCount, tickMode, range_u, Minute);
double d_jd = min_jd - floor(min_jd);
base_jd = floor(min_jd) + (floor(d_jd*24.0*60.0/tickspacing_u)+1.0)/(24.0*60.0/tickspacing_u);
} else {
// use seconds
range_u = range_jd*24.0*3600.0;
units = i18n(" [Seconds]");
units = tr(" [Seconds]");
double d_jd = min_jd - floor(min_jd);
computeMajorTickSpacing(&tickspacing_u, &_automaticMinorTickCount, tickMode, range_u, Second);
base_jd = floor(min_jd) + (floor(d_jd*24.0*3600.0/tickspacing_u)+1.0)/(24.0*3600.0/tickspacing_u);
Expand Down
10 changes: 5 additions & 5 deletions src/libkstapp/plotitem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3336,19 +3336,19 @@ void PlotItem::zoomLogY(bool force, bool autoLog, bool enableLog) {

void PlotItem::copyStatus() {
kstApp->clipboard()->setText(kstApp->mainWindow()->statusMessage());
kstApp->mainWindow()->setStatusMessage(i18n("Info copied to clipboard: ") + kstApp->mainWindow()->statusMessage());
kstApp->mainWindow()->setStatusMessage(tr("Info copied to clipboard: ") + kstApp->mainWindow()->statusMessage());
}

void PlotItem::copyXCoord() {
QString valueString = QString::number(renderItem()->statusMessagePoint.x(), 'g', 12);
kstApp->clipboard()->setText(valueString);
kstApp->mainWindow()->setStatusMessage(i18n("X coordinate copied to clipboard: ") + valueString);
kstApp->mainWindow()->setStatusMessage(tr("X coordinate copied to clipboard: ") + valueString);
}

void PlotItem::copyYCoord() {
QString valueString = QString::number(renderItem()->statusMessagePoint.y(), 'g', 12);
kstApp->clipboard()->setText(valueString);
kstApp->mainWindow()->setStatusMessage(i18n("Y coordinate copied to clipboard: ") + valueString);
kstApp->mainWindow()->setStatusMessage(tr("Y coordinate copied to clipboard: ") + valueString);
}

QString PlotItem::descriptionTip() const {
Expand All @@ -3359,12 +3359,12 @@ QString PlotItem::descriptionTip() const {
}
}

return i18n("Plot: %1 \nContents:\n %2").arg(Name()).arg(contents);
return tr("Plot: %1 \nContents:\n %2").arg(Name()).arg(contents);
}


QString PlotItem::_automaticDescriptiveName() const {
QString name = i18n("Empty Plot");
QString name = tr("Empty Plot");
int n=0;
foreach (PlotRenderItem *renderer, renderItems()) {
foreach (RelationPtr relation, renderer->relationList()) {
Expand Down
2 changes: 1 addition & 1 deletion src/libkstapp/plotrenderitem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -441,7 +441,7 @@ QString PlotRenderItem::topLabel() const {
} else if ((!label_info.name.isEmpty()) && (!label_info.quantity.isEmpty())) {
LabelInfo xlabel_info = relationList().at(0)->xLabelInfo();
if ((!xlabel_info.name.isEmpty()) && (!xlabel_info.quantity.isEmpty())) {
label = i18n("%1 vs %2").arg(label_info.name).arg(xlabel_info.name);
label = tr("%1 vs %2").arg(label_info.name).arg(xlabel_info.name);
} else {
label = label_info.name;
}
Expand Down
18 changes: 9 additions & 9 deletions src/libkstapp/viewvectordialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ ViewVectorDialog::ViewVectorDialog(QWidget *parent, Document *doc)
_showMultipleWidget = new EditMultipleWidget();
if (_showMultipleWidget) {
// Set header
_showMultipleWidget->setHeader(i18n("Select Vectors to View"));
_showMultipleWidget->setHeader(tr("Select Vectors to View"));
// Populate the list
update();
// Finish setting up the layout
Expand All @@ -63,13 +63,13 @@ ViewVectorDialog::ViewVectorDialog(QWidget *parent, Document *doc)
// Add/remove buttons
_addButton = new QPushButton();
_addButton->setIcon(QPixmap(":kst_rightarrow.png"));
_addButton->setShortcut(i18n("Alt+S"));
_addButton->setToolTip(i18n("View selected vector(s)"));
_addButton->setShortcut(tr("Alt+S"));
_addButton->setToolTip(tr("View selected vector(s)"));
_addButton->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
_removeButton = new QPushButton();
_removeButton->setIcon(QPixmap(":kst_leftarrow.png"));
_removeButton->setShortcut(i18n("Alt+R"));
_removeButton->setToolTip(i18n("Remove selected vector(s) from view"));
_removeButton->setShortcut(tr("Alt+R"));
_removeButton->setToolTip(tr("Remove selected vector(s) from view"));
_removeButton->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
_addRemoveLayout->addStretch();
_addRemoveLayout->addWidget(_addButton);
Expand Down Expand Up @@ -106,12 +106,12 @@ void ViewVectorDialog::show() {
void ViewVectorDialog::contextMenu(const QPoint& position) {
QMenu menu;
QPoint cursor = QCursor::pos();
QAction* removeAction = menu.addAction(i18n("Remove"));
QAction* removeAction = menu.addAction(tr("Remove"));
// Add submenu to select nb of digits
QMenu* submenu = new QMenu(i18n("Significant digits"));
QAction* digitNb0Action = submenu->addAction(i18n("Show as int"));
QMenu* submenu = new QMenu(tr("Significant digits"));
QAction* digitNb0Action = submenu->addAction(tr("Show as int"));
QAction* digitNb3Action = submenu->addAction("3");
QAction* digitNb6Action = submenu->addAction(i18n("6 (default)"));
QAction* digitNb6Action = submenu->addAction(tr("6 (default)"));
QAction* digitNb12Action = submenu->addAction("12");
QAction* digitNb17Action = submenu->addAction("17");
menu.addMenu(submenu);
Expand Down
12 changes: 6 additions & 6 deletions src/libkstmath/basicplugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#include <unistd.h>
#endif

#include "kst_i18n.h"


#include "debug.h"
#include "dialoglauncher.h"
Expand All @@ -30,12 +30,12 @@

namespace Kst {

const QString BasicPlugin::staticTypeString = I18N_NOOP("Plugin");
const QString BasicPlugin::staticTypeTag = I18N_NOOP("plugin");
const QString BasicPlugin::staticTypeString = QT_TR_NOOP("Plugin");
const QString BasicPlugin::staticTypeTag = QT_TR_NOOP("plugin");

BasicPlugin::BasicPlugin(ObjectStore *store)
: DataObject(store) {
_typeString = i18n("Plugin");
_typeString = "Plugin";
_type = "Plugin";

_initializeShortName();
Expand Down Expand Up @@ -231,7 +231,7 @@ void BasicPlugin::internalUpdate() {
//Call the plugins algorithm to operate on the inputs
//and produce the outputs
if ( !algorithm() ) {
Debug::self()->log(i18n("There is an error in the %1 algorithm.").arg(propertyString()), Debug::Error);
Debug::self()->log(tr("There is an error in the %1 algorithm.").arg(propertyString()), Debug::Error);
unlockInputsAndOutputs();
return;
}
Expand Down Expand Up @@ -388,7 +388,7 @@ void BasicPlugin::updateOutput() const {
}

QString BasicPlugin::descriptionTip() const {
return i18n("Plugin: %1").arg(Name());
return tr("Plugin: %1").arg(Name());
}

}
Expand Down
32 changes: 16 additions & 16 deletions src/libkstmath/csd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
#include <QXmlStreamWriter>
#include <QLatin1String>

#include "kst_i18n.h"


#include "dialoglauncher.h"
#include "datacollection.h"
Expand All @@ -35,8 +35,8 @@ extern "C" void rdft(int n, int isgn, double *a);

namespace Kst {

const QString CSD::staticTypeString = I18N_NOOP("Cumulative Spectral Decay");
const QString CSD::staticTypeTag = I18N_NOOP("csd");
const QString CSD::staticTypeString = QT_TR_NOOP("Cumulative Spectral Decay");
const QString CSD::staticTypeTag = QT_TR_NOOP("csd");

static const QLatin1String CSD_INVECTOR = QLatin1String("I");
static const QLatin1String& OUTMATRIX = QLatin1String("M");
Expand Down Expand Up @@ -127,7 +127,7 @@ void CSD::internalUpdate() {
_outMatrix->setValueRaw(xSize, j, tempOutput[j]);
}
} else {
Debug::self()->log(i18n("Could not allocate sufficient memory for CSD."), Debug::Error);
Debug::self()->log(tr("Could not allocate sufficient memory for CSD."), Debug::Error);
break;
}

Expand Down Expand Up @@ -192,7 +192,7 @@ bool CSD::slaveVectorsUsed() const {


QString CSD::propertyString() const {
return i18n("CSD: %1").arg(_inputVectors[CSD_INVECTOR]->Name());
return tr("CSD: %1").arg(_inputVectors[CSD_INVECTOR]->Name());
}


Expand Down Expand Up @@ -353,19 +353,19 @@ void CSD::updateMatrixLabels(void) {
switch (_outputType) {
default:
case 0: // amplitude spectral density (default) [V/Hz^1/2]
label_info.quantity = i18n("Amplitude Spectral Density");
label_info.quantity = tr("Amplitude Spectral Density");
label_info.units = QString("%1/%2^{1/2}").arg(_vectorUnits).arg(_rateUnits);
break;
case 1: // power spectral density [V^2/Hz]
label_info.quantity = i18n("Power Spectral Density");
label_info.quantity = tr("Power Spectral Density");
label_info.units = QString("%1^2/%2").arg(_vectorUnits).arg(_rateUnits);
break;
case 2: // amplitude spectrum [V]
label_info.quantity = i18n("Amplitude Spectrum");
label_info.quantity = tr("Amplitude Spectrum");
label_info.units = QString("%1").arg(_vectorUnits);
break;
case 3: // power spectrum [V^2]
label_info.quantity = i18n("Power Spectrum");
label_info.quantity = tr("Power Spectrum");
label_info.units = QString("%1^2").arg(_vectorUnits);
break;
}
Expand All @@ -374,10 +374,10 @@ void CSD::updateMatrixLabels(void) {

label_info.name.clear();
label_info.units = _rateUnits;
label_info.quantity = i18n("Frequency");
label_info.quantity = tr("Frequency");
_outMatrix->setYLabelInfo(label_info);

label_info.quantity = i18n("Time");
label_info.quantity = tr("Time");
label_info.units = QString('s');
_outMatrix->setXLabelInfo(label_info);

Expand All @@ -390,15 +390,15 @@ QString CSD::_automaticDescriptiveName() const {
QString CSD::descriptionTip() const {
QString tip;

tip = i18n("Spectrogram: %1\n FFT Length: 2^%2").arg(Name()).arg(length());
tip = tr("Spectrogram: %1\n FFT Length: 2^%2").arg(Name()).arg(length());

if (average() || apodize() || removeMean()) {
tip += "\n ";
if (average()) tip += i18n("Average; ");
if (apodize()) tip += i18n("Apodize; ");
if (removeMean()) tip += i18n("Remove Mean;");
if (average()) tip += tr("Average; ");
if (apodize()) tip += tr("Apodize; ");
if (removeMean()) tip += tr("Remove Mean;");
}
tip += i18n("\nInput: %1").arg(_inputVectors[CSD_INVECTOR]->descriptionTip());
tip += tr("\nInput: %1").arg(_inputVectors[CSD_INVECTOR]->descriptionTip());
return tip;

}
Expand Down
28 changes: 14 additions & 14 deletions src/libkstmath/curve.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#include "curve.h"

// includes for KDE
#include "kst_i18n.h"

#include <qdebug.h>
#include <QPolygonF>
#include <QXmlStreamWriter>
Expand Down Expand Up @@ -57,8 +57,8 @@

namespace Kst {

const QString Curve::staticTypeString = I18N_NOOP("Curve");
const QString Curve::staticTypeTag = I18N_NOOP("curve");
const QString Curve::staticTypeString = QT_TR_NOOP("Curve");
const QString Curve::staticTypeTag = QT_TR_NOOP("curve");

static const QLatin1String& XVECTOR = QLatin1String("X");
static const QLatin1String& YVECTOR = QLatin1String("Y");
Expand All @@ -80,7 +80,7 @@ Curve::Curve(ObjectStore *store)

MaxX = MinX = MeanX = MaxY = MinY = MeanY = MinPosX = MinPosY = 0;
NS = 0;
_typeString = i18n("Curve");
_typeString = tr("Curve");
_type = "Curve";
_initializeShortName();
Color = QColor();
Expand Down Expand Up @@ -390,7 +390,7 @@ LabelInfo Curve::titleInfo() const {


QString Curve::propertyString() const {
return i18n("%1 vs %2").arg(yVector()->Name()).arg(xVector()->Name());
return tr("%1 vs %2").arg(yVector()->Name()).arg(xVector()->Name());
}


Expand Down Expand Up @@ -1616,40 +1616,40 @@ void Curve::paintLegendSymbol(QPainter *p, const QSize &size) {
}

QString Curve::_automaticDescriptiveName() const {
return i18n("%1 vs %2").arg(yVector()->descriptiveName()).arg(xVector()->descriptiveName());
return tr("%1 vs %2").arg(yVector()->descriptiveName()).arg(xVector()->descriptiveName());
}

QString Curve::descriptionTip() const {
QString tip;

tip = i18n("Curve: %1\nX: %2\nY: %3").arg(Name()).arg(xVector()->descriptionTip()).arg(yVector()->descriptionTip());
tip = tr("Curve: %1\nX: %2\nY: %3").arg(Name()).arg(xVector()->descriptionTip()).arg(yVector()->descriptionTip());

if (hasXError()) {
tip += i18n("\nX+ Error: %1").arg(xErrorVector()->Name());
tip += tr("\nX+ Error: %1").arg(xErrorVector()->Name());
}

if (hasXMinusError()) {
tip += i18n("\nX- Error: %1").arg(xMinusErrorVector()->Name());
tip += tr("\nX- Error: %1").arg(xMinusErrorVector()->Name());
}

if (hasYError()) {
tip += i18n("\nY+ Error: %1").arg(yErrorVector()->Name());
tip += tr("\nY+ Error: %1").arg(yErrorVector()->Name());
}

if (hasYMinusError()) {
tip += i18n("\nY- Error: %1").arg(yMinusErrorVector()->Name());
tip += tr("\nY- Error: %1").arg(yMinusErrorVector()->Name());
}

if (hasLines()) {
tip += i18n("\nLines: Width %1 and Style %2").arg(lineWidth()).arg(lineStyle());
tip += tr("\nLines: Width %1 and Style %2").arg(lineWidth()).arg(lineStyle());
}

if (hasPoints()) {
tip += i18n("\nPoints: Style %1").arg(pointType());
tip += tr("\nPoints: Style %1").arg(pointType());
}

if (hasBars()) {
tip += i18n("\nBars");
tip += tr("\nBars");
}

return tip;
Expand Down
12 changes: 6 additions & 6 deletions src/libkstmath/dataobject.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#include "datacollection.h"
#include "dataobjectplugin.h"
#include "debug.h"
#include "kst_i18n.h"

#include "objectstore.h"
#include "relation.h"
#include "sharedptr.h"
Expand Down Expand Up @@ -205,13 +205,13 @@ bool DataObject::inputFlagsSet() const {

// Scans for plugins and stores the information for them
void DataObject::scanPlugins() {
Debug::self()->log(i18n("Scanning for data-object plugins."));
Debug::self()->log(tr("Scanning for data-object plugins."));

_pluginList.clear(); //FIXME?

DataObjectPluginList tmpList;

Debug::self()->log(i18n("Scanning for data-object plugins."));
Debug::self()->log(tr("Scanning for data-object plugins."));

foreach (QObject *plugin, QPluginLoader::staticInstances()) {
//try a cast
Expand Down Expand Up @@ -397,13 +397,13 @@ double *DataObject::vectorRealloced(VectorPtr v, double *memptr, int newSize) co
}

void DataObject::load(const QXmlStreamReader &e) {
qDebug() << QString("FIXME! Loading of %1 is not implemented yet.").arg(typeString()) << endl;
qDebug() << QString("FIXME! Loading of %1 is not implemented yet.").arg(tr(typeString().toLatin1())) << endl;
Q_UNUSED(e)
}


void DataObject::save(QXmlStreamWriter& ts) {
qDebug() << QString("FIXME! Saving of %1 is not implemented yet.").arg(typeString()) << endl;
qDebug() << QString("FIXME! Saving of %1 is not implemented yet.").arg(tr(typeString().toLatin1())) << endl;
Q_UNUSED(ts)
}

Expand Down Expand Up @@ -546,7 +546,7 @@ void DataObject::writeLockInputsAndOutputs() const {
qDebug() << (void*)this << " (" << this->type() << ": " << this->Name() << ") DataObject::writeLockInputsAndOutputs() by tid=" << (int)QThread::currentThread() << ": write locking output \"" << (*outputIt)->Name() << "\" (" << (void*)((KstRWLock*)*outputIt) << ")" << endl;
#endif
if ((*outputIt)->provider() != this) {
Debug::self()->log(i18n("(%1) DataObject::writeLockInputsAndOutputs() by tid=%2: write locking output %3 (not provider) -- this is probably an error. Please email kst@kde.org with details.").arg(this->type()).arg(reinterpret_cast<qint64>(QThread::currentThread())).arg((*outputIt)->Name()), Debug::Error);
Debug::self()->log(tr("(%1) DataObject::writeLockInputsAndOutputs() by tid=%2: write locking output %3 (not provider) -- this is probably an error. Please email kst@kde.org with details.").arg(this->type()).arg(reinterpret_cast<qint64>(QThread::currentThread())).arg((*outputIt)->Name()), Debug::Error);
}

(*outputIt)->writeLock();
Expand Down
79 changes: 0 additions & 79 deletions src/libkstmath/emailthread.cpp

This file was deleted.

63 changes: 0 additions & 63 deletions src/libkstmath/emailthread.h

This file was deleted.

4 changes: 2 additions & 2 deletions src/libkstmath/enodes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
#define strcasecmp _stricmp
#endif

#include "kst_i18n.h"


#include <QMutex>
#include <QRegExp>
Expand Down Expand Up @@ -831,7 +831,7 @@ bool DataNode::collectObjects(Kst::VectorMap& v, Kst::ScalarMap& s, Kst::StringM
} else if (_scalar && !s.contains(_tagName)) {
s.insert(_tagName, _scalar);
} else if (!_scalar && !_vector) {
Kst::Debug::self()->log(i18n("Equations has unknown object [%1].").arg(_tagName), Kst::Debug::Error);
Kst::Debug::self()->log(Kst::Debug::self()->tr("Equations has unknown object [%1].").arg(_tagName), Kst::Debug::Error);
return false;
}
return true;
Expand Down
22 changes: 11 additions & 11 deletions src/libkstmath/eparse-eh.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,22 +18,22 @@
#include <QString>
#include <QStringList>

#include "kst_i18n.h"

#include "kstmath_export.h"
#include "objectstore.h"

namespace Equations {
KSTMATH_EXPORT QStringList errorStack;
}

/*extern "C"*/ const char *EParseErrorEmpty = I18N_NOOP("Equations is empty.");
/*extern "C"*/ const char *EParseErrorEmptyArg = I18N_NOOP("Function argument is empty.");
/*extern "C"*/ const char *EParseErrorTwoOperands = I18N_NOOP("Two operands are required.");
/*extern "C"*/ const char *EParseErrorEmptyParentheses = I18N_NOOP("Empty parentheses are forbidden except in function calls.");
/*extern "C"*/ const char *EParseErrorMissingClosingParenthesis = I18N_NOOP("Closing parenthesis is missing.");
/*extern "C"*/ const char *EParseErrorNoImplicitMultiply = I18N_NOOP("Term must be followed by an operator. Implicit multiplication is not supported.");
/*extern "C"*/ const char *EParseErrorRequiresOperand = I18N_NOOP("This operator requires an operand.");
/*extern "C"*/ const char *EParseErrorToken = I18N_NOOP("Unknown character '%1'.");
/*extern "C"*/ const char *EParseErrorEmpty = "Equations is empty.";
/*extern "C"*/ const char *EParseErrorEmptyArg = "Function argument is empty.";
/*extern "C"*/ const char *EParseErrorTwoOperands = "Two operands are required.";
/*extern "C"*/ const char *EParseErrorEmptyParentheses = "Empty parentheses are forbidden except in function calls.";
/*extern "C"*/ const char *EParseErrorMissingClosingParenthesis = "Closing parenthesis is missing.";
/*extern "C"*/ const char *EParseErrorNoImplicitMultiply = "Term must be followed by an operator. Implicit multiplication is not supported.";
/*extern "C"*/ const char *EParseErrorRequiresOperand = "This operator requires an operand.";
/*extern "C"*/ const char *EParseErrorToken = "Unknown character '%1'.";


/*extern "C"*/ void yyClearErrors() {
Expand All @@ -48,11 +48,11 @@ namespace Equations {

/*extern "C"*/ void yyerror(Kst::ObjectStore *store, const char *s) {
Q_UNUSED(store)
Equations::errorStack << i18n(s);
Equations::errorStack << s;
}

/*extern "C"*/ void yyerrortoken(char c) {
Equations::errorStack << i18n(EParseErrorToken).arg(c);
Equations::errorStack << QString(EParseErrorToken).arg(c);
}

// vim: ts=2 sw=2 et
22 changes: 11 additions & 11 deletions src/libkstmath/equation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
#include "eparse-eh.h"
#include "datacollection.h"
#include "debug.h"
#include "kst_i18n.h"

#include "generatedvector.h"
#include "objectstore.h"

Expand All @@ -44,8 +44,8 @@ int yylex_destroy (void );

namespace Kst {

const QString Equation::staticTypeString = I18N_NOOP("Equation");
const QString Equation::staticTypeTag = I18N_NOOP("equation");
const QString Equation::staticTypeString = QT_TR_NOOP("Equation");
const QString Equation::staticTypeTag = QT_TR_NOOP("equation");

static const QLatin1String& XINVECTOR = QLatin1String("X");
static const QLatin1String& XOUTVECTOR = QLatin1String("XO"); // Output (slave) vector
Expand All @@ -56,7 +56,7 @@ Equation::Equation(ObjectStore *store)

_ns = 2;
_pe = 0L;
_typeString = i18n("Equation");
_typeString = "Equation";
_type = "Equation";
_initializeShortName();

Expand Down Expand Up @@ -99,7 +99,7 @@ void Equation::attach() {

const CurveHintList *Equation::curveHints() const {
_curveHints->clear();
_curveHints->append(new CurveHint(i18n("Equation Curve"),
_curveHints->append(new CurveHint(tr("Equation Curve"),
_xOutVector->shortName(), _yOutVector->shortName()));
return _curveHints;
}
Expand Down Expand Up @@ -149,7 +149,7 @@ const QString Equation::reparsedEquation() const {
Equations::Node *en = static_cast<Equations::Node*>(ParsedEquation);
if (rc == 0 && en) {
if (!en->takeVectors(VectorsUsed)) {
Debug::self()->log(i18n("Equation [%1] failed to find its vectors when reparsing.").arg(_equation), Debug::Warning);
Debug::self()->log(tr("Equation [%1] failed to find its vectors when reparsing.").arg(_equation), Debug::Warning);
}
etext = en->text();
}
Expand Down Expand Up @@ -196,7 +196,7 @@ void Equation::save(QXmlStreamWriter &s) {
Equations::Node *en = static_cast<Equations::Node*>(ParsedEquation);
if (rc == 0 && en) {
if (!en->takeVectors(VectorsUsed)) {
Debug::self()->log(i18n("Equation [%1] failed to find its vectors when saving. Resulting Kst file may have issues.").arg(_equation), Debug::Warning);
Debug::self()->log(tr("Equation [%1] failed to find its vectors when saving. Resulting Kst file may have issues.").arg(_equation), Debug::Warning);
}
QString etext = en->text();
s.writeAttribute("expression", etext);
Expand Down Expand Up @@ -247,16 +247,16 @@ void Equation::setEquation(const QString& in_fn) {
_pe->update(&ctx);
} else {
//we have bad objects...
Debug::self()->log(i18n("Equation [%1] references non-existent objects.").arg(_equation), Debug::Error);
Debug::self()->log(tr("Equation [%1] references non-existent objects.").arg(_equation), Debug::Error);
delete (Equations::Node*)ParsedEquation;
ParsedEquation = 0L;
//Equations::mutex().unlock();
}
} else {
// Parse error
Debug::self()->log(i18n("Equation [%1] failed to parse. Errors follow.").arg(_equation), Debug::Warning);
Debug::self()->log(tr("Equation [%1] failed to parse. Errors follow.").arg(_equation), Debug::Warning);
for (QStringList::ConstIterator i = Equations::errorStack.constBegin(); i != Equations::errorStack.constEnd(); ++i) {
Debug::self()->log(i18n("Parse Error: %1").arg(*i), Debug::Warning);
Debug::self()->log(tr("Parse Error: %1").arg(*i), Debug::Warning);
}
delete (Equations::Node*)ParsedEquation;
ParsedEquation = 0L;
Expand Down Expand Up @@ -576,7 +576,7 @@ QString Equation::descriptionTip() const {
if(!_xInVector) {
return QString();
}
return i18n("Equation: %1\n %2\nX: %3").arg(Name()).arg(equation()).arg(_xInVector->descriptionTip());
return tr("Equation: %1\n %2\nX: %3").arg(Name()).arg(equation()).arg(_xInVector->descriptionTip());
}


Expand Down
9 changes: 4 additions & 5 deletions src/libkstmath/eventmonitorentry.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@

// application specific includes
#include "enodes.h"
#include "emailthread.h"
#include "dialoglauncher.h"
#include "datacollection.h"

Expand All @@ -42,8 +41,8 @@ extern struct yy_buffer_state *yy_scan_string(const char*);

namespace Kst {

const QString EventMonitorEntry::staticTypeString = I18N_NOOP("Event Monitor");
const QString EventMonitorEntry::staticTypeTag = I18N_NOOP("eventmonitor");
const QString EventMonitorEntry::staticTypeString = QT_TR_NOOP("Event Monitor");
const QString EventMonitorEntry::staticTypeTag = QT_TR_NOOP("eventmonitor");

namespace {
const int EventMonitorEventType = int(QEvent::User) + 2931;
Expand Down Expand Up @@ -435,11 +434,11 @@ bool EventMonitorEntry::uses(ObjectPtr p) const {
}

QString EventMonitorEntry::_automaticDescriptiveName() const {
return i18n("event");
return tr("event");
}

QString EventMonitorEntry::descriptionTip() const {
return i18n("Event: %1").arg(Name());
return tr("Event: %1").arg(Name());
}

}
Expand Down
28 changes: 14 additions & 14 deletions src/libkstmath/histogram.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,16 @@

#include <QTextDocument>
#include <QXmlStreamWriter>
#include "kst_i18n.h"


#include "dialoglauncher.h"
#include "datacollection.h"
#include "objectstore.h"

namespace Kst {

const QString Histogram::staticTypeString = I18N_NOOP("Histogram");
const QString Histogram::staticTypeTag = I18N_NOOP("histogram");
const QString Histogram::staticTypeString = QT_TR_NOOP("Histogram");
const QString Histogram::staticTypeTag = QT_TR_NOOP("histogram");

static const QLatin1String& RAWVECTOR = QLatin1String("I");
static const QLatin1String& BINS = QLatin1String("B");
Expand Down Expand Up @@ -168,43 +168,43 @@ void Histogram::internalUpdate() {
switch (_NormalizationMode) {
case Number:
_Normalization = 1.0;
label_info.quantity = i18n("Number");
label_info.quantity = tr("Number");
break;
case Percent:
if (ns > 0) {
_Normalization = 100.0/(double)ns;
} else {
_Normalization = 1.0;
}
label_info.quantity = i18n("Percent");
label_info.quantity = tr("Percent");
break;
case Fraction:
if (ns > 0) {
_Normalization = 1.0/(double)ns;
} else {
_Normalization = 1.0;
}
label_info.quantity = i18n("Fraction");
label_info.quantity = tr("Fraction");
break;
case MaximumOne:
if (MaxY > 0) {
_Normalization = 1.0/MaxY;
} else {
_Normalization = 1.0;
}
label_info.quantity = i18n("Normalized Frequency");
label_info.quantity = tr("Normalized Frequency");
break;
default:
_Normalization = 1.0;
label_info.quantity = i18n("Number");
label_info.quantity = tr("Number");
break;
}

_bVector->setLabelInfo(_inputVectors[RAWVECTOR]->labelInfo());

label_info.quantity.clear();
label_info.units.clear();
label_info.name = i18n( "Histogram of %1").arg(_bVector->labelInfo().name);
label_info.name = tr( "Histogram of %1").arg(_bVector->labelInfo().name);
label_info.file = _bVector->labelInfo().file;

_hVector->setTitleInfo(label_info);
Expand Down Expand Up @@ -298,7 +298,7 @@ void Histogram::save(QXmlStreamWriter &xml) {


QString Histogram::propertyString() const {
return i18n("Histogram: %1").arg(_inputVectors[RAWVECTOR]->Name());
return tr("Histogram: %1").arg(_inputVectors[RAWVECTOR]->Name());
}


Expand Down Expand Up @@ -404,13 +404,13 @@ QString Histogram::_automaticDescriptiveName() const {
QString Histogram::descriptionTip() const {
QString tip;

tip = i18n("Histogram: %1").arg(Name());
tip = tr("Histogram: %1").arg(Name());
if (realTimeAutoBin()) {
tip+= i18n("\n Auto-bin");
tip+= tr("\n Auto-bin");
} else {
tip += i18n("\n %1 bins from %2 to %3").arg(numberOfBins()).arg(xMin()).arg(xMax());
tip += tr("\n %1 bins from %2 to %3").arg(numberOfBins()).arg(xMin()).arg(xMax());
}
tip += i18n("\nInput: %1").arg(_inputVectors[RAWVECTOR]->descriptionTip());
tip += tr("\nInput: %1").arg(_inputVectors[RAWVECTOR]->descriptionTip());

return tip;
}
Expand Down
10 changes: 5 additions & 5 deletions src/libkstmath/image.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#include "objectstore.h"
#include "plottickcalculator.h"

#include "kst_i18n.h"


#include <QImage>
#include <QPainter>
Expand All @@ -32,8 +32,8 @@

namespace Kst {

const QString Image::staticTypeString = I18N_NOOP("Image");
const QString Image::staticTypeTag = I18N_NOOP("image");
const QString Image::staticTypeString = QT_TR_NOOP("Image");
const QString Image::staticTypeTag = QT_TR_NOOP("image");

static const QLatin1String& THEMATRIX = QLatin1String("THEMATRIX");

Expand Down Expand Up @@ -140,7 +140,7 @@ void Image::internalUpdate() {

QString Image::propertyString() const {
if (_inputMatrices.contains(THEMATRIX)) {
return i18n("Image of %1" ).arg(_inputMatrices[THEMATRIX]->Name());
return tr("Image of %1" ).arg(_inputMatrices[THEMATRIX]->Name());
} else {
return QString();
}
Expand Down Expand Up @@ -804,7 +804,7 @@ QString Image::_automaticDescriptiveName() const {

QString Image::descriptionTip() const {
QString tip;
tip = i18n("Image: %1\n" ).arg(Name());
tip = tr("Image: %1\n" ).arg(Name());
if (_hasContourMap) {
tip += " Contour Map";
}
Expand Down
33 changes: 16 additions & 17 deletions src/libkstmath/plotdefines.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@

#define MARKER_LABEL_PRECISION 15

#include "kst_i18n.h"

enum AxisInterpretationType {
AXIS_INTERP_YEAR,
Expand Down Expand Up @@ -50,25 +49,25 @@ struct AxisDisplay {
};

const AxisInterpretation AxisInterpretations[] = {
{ I18N_NOOP("Julian Year"), AXIS_INTERP_YEAR },
{ I18N_NOOP("Standard C time"), AXIS_INTERP_CTIME },
{ I18N_NOOP2("Julian Date", "JD"), AXIS_INTERP_JD },
{ I18N_NOOP2("Modified Julian Date", "MJD"), AXIS_INTERP_MJD },
{ I18N_NOOP2("Reduced Julian Date", "RJD"), AXIS_INTERP_RJD },
{ I18N_NOOP2("Temps Atomique International", "TAI"), AXIS_INTERP_AIT },
{ I18N_NOOP("Excel time (Windows)"), AXIS_INTERP_EXCEL }
{ QT_TR_NOOP("Julian Year"), AXIS_INTERP_YEAR },
{ QT_TR_NOOP("Standard C time"), AXIS_INTERP_CTIME },
{ QT_TRANSLATE_NOOP("Julian Date", "JD"), AXIS_INTERP_JD },
{ QT_TRANSLATE_NOOP("Modified Julian Date", "MJD"), AXIS_INTERP_MJD },
{ QT_TRANSLATE_NOOP("Reduced Julian Date", "RJD"), AXIS_INTERP_RJD },
{ QT_TRANSLATE_NOOP("Temps Atomique International", "TAI"), AXIS_INTERP_AIT },
{ QT_TR_NOOP("Excel time (Windows)"), AXIS_INTERP_EXCEL }
};

const AxisDisplay AxisDisplays[] = {
{ I18N_NOOP("Julian Year"), AXIS_DISPLAY_YEAR },
{ I18N_NOOP("YYYY/MM/DD HH:MM:SS.SS"), AXIS_DISPLAY_YYMMDDHHMMSS_SS },
{ I18N_NOOP("DD/MM/YYYY HH:MM:SS.SS"), AXIS_DISPLAY_DDMMYYHHMMSS_SS },
{ I18N_NOOP("<Qt Text Date> HH:MM:SS.SS"), AXIS_DISPLAY_QTTEXTDATEHHMMSS_SS },
{ I18N_NOOP("<Qt Local Date> HH:MM:SS.SS"), AXIS_DISPLAY_QTLOCALDATEHHMMSS_SS },
{ I18N_NOOP2("Julian Date", "JD"), AXIS_DISPLAY_JD },
{ I18N_NOOP2("Modified Julian Date", "MJD"), AXIS_DISPLAY_MJD },
{ I18N_NOOP2("Reduced Julian Date", "RJD"), AXIS_DISPLAY_RJD },
{ I18N_NOOP("Formatted String"), AXIS_DISPLAY_QTDATETIME_FORMAT }
{ QT_TR_NOOP("Julian Year"), AXIS_DISPLAY_YEAR },
{ QT_TR_NOOP("YYYY/MM/DD HH:MM:SS.SS"), AXIS_DISPLAY_YYMMDDHHMMSS_SS },
{ QT_TR_NOOP("DD/MM/YYYY HH:MM:SS.SS"), AXIS_DISPLAY_DDMMYYHHMMSS_SS },
{ QT_TR_NOOP("<Qt Text Date> HH:MM:SS.SS"), AXIS_DISPLAY_QTTEXTDATEHHMMSS_SS },
{ QT_TR_NOOP("<Qt Local Date> HH:MM:SS.SS"), AXIS_DISPLAY_QTLOCALDATEHHMMSS_SS },
{ QT_TRANSLATE_NOOP("Julian Date", "JD"), AXIS_DISPLAY_JD },
{ QT_TRANSLATE_NOOP("Modified Julian Date", "MJD"), AXIS_DISPLAY_MJD },
{ QT_TRANSLATE_NOOP("Reduced Julian Date", "RJD"), AXIS_DISPLAY_RJD },
{ QT_TR_NOOP("Formatted String"), AXIS_DISPLAY_QTDATETIME_FORMAT }
};

const unsigned int numAxisInterpretations = sizeof( AxisInterpretations ) / sizeof( AxisInterpretation );
Expand Down
32 changes: 16 additions & 16 deletions src/libkstmath/psd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

#include <QXmlStreamWriter>

#include "kst_i18n.h"

#include <qdebug.h>

#include "dialoglauncher.h"
Expand All @@ -39,8 +39,8 @@ extern "C" void rdft(int n, int isgn, double *a);

namespace Kst {

const QString PSD::staticTypeString = I18N_NOOP("Power Spectrum");
const QString PSD::staticTypeTag = I18N_NOOP("powerspectrum");
const QString PSD::staticTypeString = QT_TR_NOOP("Power Spectrum");
const QString PSD::staticTypeTag = QT_TR_NOOP("powerspectrum");

static const QLatin1String& INVECTOR = QLatin1String("I");
static const QLatin1String& SVECTOR = QLatin1String("S");
Expand Down Expand Up @@ -120,7 +120,7 @@ PSD::~PSD() {

const CurveHintList *PSD::curveHints() const {
_curveHints->clear();
_curveHints->append(new CurveHint(i18n("PSD Curve"), _fVector->shortName(),
_curveHints->append(new CurveHint(tr("PSD Curve"), _fVector->shortName(),
_sVector->shortName()));
return _curveHints;
}
Expand Down Expand Up @@ -192,7 +192,7 @@ void PSD::_adjustLengths() {
if ( (_sVector->length() == nPSDLen) && (_fVector->length() == nPSDLen) ) {
_PSDLength = nPSDLen;
} else {
Debug::self()->log(i18n("Attempted to create a PSD that used all memory."), Debug::Error);
Debug::self()->log(tr("Attempted to create a PSD that used all memory."), Debug::Error);
}

_last_n_subsets = 0;
Expand Down Expand Up @@ -324,7 +324,7 @@ bool PSD::slaveVectorsUsed() const {


QString PSD::propertyString() const {
return i18n("PSD: %1", _inputVectors[INVECTOR]->Name());
return tr("PSD: %1").arg(_inputVectors[INVECTOR]->Name());
}


Expand Down Expand Up @@ -430,31 +430,31 @@ void PSD::updateVectorLabels() {
switch (_Output) {
default:
case 0: // amplitude spectral density (default) [V/Hz^1/2]
label_info.quantity = i18n("Spectral Density");
label_info.quantity = tr("Spectral Density");
if (_vectorUnits.isEmpty() || _rateUnits.isEmpty()) {
label_info.units.clear();
} else {
label_info.units = QString("%1/%2^{1/2}").arg(_vectorUnits).arg(_rateUnits);
}
break;
case 1: // power spectral density [V^2/Hz]
label_info.quantity = i18n("PSD");
label_info.quantity = tr("PSD");
if (_vectorUnits.isEmpty() || _rateUnits.isEmpty()) {
label_info.units.clear();
} else {
label_info.units = QString("%1^2/%2").arg(_vectorUnits).arg(_rateUnits);
}
break;
case 2: // amplitude spectrum [V]
label_info.quantity = i18n("Amplitude Spectrum");
label_info.quantity = tr("Amplitude Spectrum");
if (_vectorUnits.isEmpty() || _rateUnits.isEmpty()) {
label_info.units.clear();
} else {
label_info.units = QString("%1").arg(_vectorUnits);
}
break;
case 3: // power spectrum [V^2]
label_info.quantity = i18n("Power Spectrum");
label_info.quantity = tr("Power Spectrum");
if (_vectorUnits.isEmpty() || _rateUnits.isEmpty()) {
label_info.units.clear();
} else {
Expand All @@ -465,7 +465,7 @@ void PSD::updateVectorLabels() {
label_info.name.clear();
_sVector->setLabelInfo(label_info);

label_info.quantity = i18n("Frequency");
label_info.quantity = tr("Frequency");
label_info.units = _rateUnits;
_fVector->setLabelInfo(label_info);

Expand All @@ -484,15 +484,15 @@ QString PSD::_automaticDescriptiveName() const {
QString PSD::descriptionTip() const {
QString tip;

tip = i18n("Spectrum: %1\n FFT Length: 2^%2").arg(Name()).arg(length());
tip = tr("Spectrum: %1\n FFT Length: 2^%2").arg(Name()).arg(length());

if (average() || apodize() || removeMean()) {
tip += "\n ";
if (average()) tip += i18n("Average; ");
if (apodize()) tip += i18n("Apodize; ");
if (removeMean()) tip += i18n("Remove Mean;");
if (average()) tip += tr("Average; ");
if (apodize()) tip += tr("Apodize; ");
if (removeMean()) tip += tr("Remove Mean;");
}
tip += i18n("\nInput: %1").arg(_inputVectors[INVECTOR]->descriptionTip());
tip += tr("\nInput: %1").arg(_inputVectors[INVECTOR]->descriptionTip());
return tip;
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/libkstmath/psdcalculator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

#include <assert.h>

#include "kst_i18n.h"


#include "debug.h"
#include "vector.h"
Expand Down Expand Up @@ -165,7 +165,7 @@ int PSDCalculator::calculatePowerSpectrum(
PSDType outputType, double inputSamplingFreq) {

if (outputLen != calculateOutputVectorLength(inputLen, average, averageLen)) {
Kst::Debug::self()->log(i18n("in PSDCalculator::calculatePowerSpectrum: received output array with wrong length."), Kst::Debug::Error);
Kst::Debug::self()->log(Kst::Debug::self()->tr("in PSDCalculator::calculatePowerSpectrum: received output array with wrong length."), Kst::Debug::Error);
return -1;
}

Expand Down
4 changes: 2 additions & 2 deletions src/libkstmath/relation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@
#include "relation.h"
#include "datacollection.h"
#include "debug.h"
#include "kst_i18n.h"


#include "objectstore.h"

#include <QXmlStreamWriter>

namespace Kst {

const QString Relation::staticTypeString = I18N_NOOP("Relation");
const QString Relation::staticTypeString = QT_TR_NOOP("Relation");

Relation::Relation(ObjectStore *store) : Object() {
Q_UNUSED(store);
Expand Down
4 changes: 2 additions & 2 deletions src/plugins/dataobject/activitylevel/activitylevel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -160,9 +160,9 @@ QString ActivityLevelSource::_automaticDescriptiveName() const {

QString ActivityLevelSource::descriptionTip() const {
QString tip;
tip = i18n("Activity Level: %1\n Sampling Time: %2 (ms)\n Window width: %3 (s)\n Noise Threshold: %4 \n").
tip = tr("Activity Level: %1\n Sampling Time: %2 (ms)\n Window width: %3 (s)\n Noise Threshold: %4 \n").
arg(Name()).arg(samplingTime()->value()).arg(windowWidth()->value()).arg(noiseThreshold()->value());
tip += i18n("\nInput: %1").arg(vector()->descriptionTip());
tip += tr("\nInput: %1").arg(vector()->descriptionTip());
return tip;
}

Expand Down
4 changes: 2 additions & 2 deletions src/plugins/dataobject/shift/shift.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -137,9 +137,9 @@ QString ShiftSource::_automaticDescriptiveName() const {
QString ShiftSource::descriptionTip() const {
QString tip;

tip = i18n("Shift: %1\n dX: %2\n").arg(Name()).arg(scalar()->value());
tip = tr("Shift: %1\n dX: %2\n").arg(Name()).arg(scalar()->value());

tip += i18n("\nInput: %1").arg(vector()->descriptionTip());
tip += tr("\nInput: %1").arg(vector()->descriptionTip());
return tip;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ bool FilterButterworthBandPassSource::algorithm() {
scalars.insert(2, bandwidthScalar);

Kst::LabelInfo label_info = inputVector->labelInfo();
label_info.name = i18n("Filtered %1").arg(label_info.name);
label_info.name = tr("Filtered %1").arg(label_info.name);
outputVector->setLabelInfo(label_info);

return kst_pass_filter( inputVector, scalars, outputVector);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ bool FilterButterworthBandStopSource::algorithm() {
scalars.insert(2, bandwidthScalar);

Kst::LabelInfo label_info = inputVector->labelInfo();
label_info.name = i18n("Filtered %1").arg(label_info.name);
label_info.name = tr("Filtered %1").arg(label_info.name);
outputVector->setLabelInfo(label_info);

return kst_pass_filter( inputVector, scalars, outputVector);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ bool FilterButterworthHighPassSource::algorithm() {
scalars.insert(1, cutoffScalar);

Kst::LabelInfo label_info = inputVector->labelInfo();
label_info.name = i18n("Filtered %1").arg(label_info.name);
label_info.name = tr("Filtered %1").arg(label_info.name);
outputVector->setLabelInfo(label_info);

return kst_pass_filter( inputVector, scalars, outputVector);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ bool FilterButterworthLowPassSource::algorithm() {
scalars.insert(1, cutoffScalar);

Kst::LabelInfo label_info = inputVector->labelInfo();
label_info.name = i18n("Filtered %1").arg(label_info.name);
label_info.name = tr("Filtered %1").arg(label_info.name);
outputVector->setLabelInfo(label_info);
return kst_pass_filter( inputVector, scalars, outputVector);
}
Expand Down
4 changes: 2 additions & 2 deletions src/plugins/filters/cumulativeaverage/cumulativeaverage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -124,9 +124,9 @@ QString CumulativeAverageSource::_automaticDescriptiveName() const {
QString CumulativeAverageSource::descriptionTip() const {
QString tip;

tip = i18n("Cumulative Average: %1\n").arg(Name());
tip = tr("Cumulative Average: %1\n").arg(Name());

tip += i18n("\nInput: %1").arg(vector()->descriptionTip());
tip += tr("\nInput: %1").arg(vector()->descriptionTip());
return tip;
}

Expand Down
4 changes: 2 additions & 2 deletions src/plugins/filters/cumulativesum/cumulativesum.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -135,9 +135,9 @@ QString CumulativeSumSource::_automaticDescriptiveName() const {
QString CumulativeSumSource::descriptionTip() const {
QString tip;

tip = i18n("Integral: %1\n dX: %2\n").arg(Name()).arg(scalarStep()->value());
tip = tr("Integral: %1\n dX: %2\n").arg(Name()).arg(scalarStep()->value());

tip += i18n("\nInput: %1").arg(vector()->descriptionTip());
tip += tr("\nInput: %1").arg(vector()->descriptionTip());
return tip;
}

Expand Down
6 changes: 3 additions & 3 deletions src/plugins/filters/despike/filterdespike.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -149,9 +149,9 @@ QString FilterDespikeSource::_automaticDescriptiveName() const {
QString FilterDespikeSource::descriptionTip() const {
QString tip;

tip = i18n("Despike Filter: %1\n Spacing: %2\n NSigma: %3").arg(Name()).arg(spacingScalar()->value()).arg(nSigmaScalar()->value());
tip = tr("Despike Filter: %1\n Spacing: %2\n NSigma: %3").arg(Name()).arg(spacingScalar()->value()).arg(nSigmaScalar()->value());

tip += i18n("\nInput: %1").arg(vector()->descriptionTip());
tip += tr("\nInput: %1").arg(vector()->descriptionTip());
return tip;
}

Expand Down Expand Up @@ -284,7 +284,7 @@ bool FilterDespikeSource::algorithm() {
}

Kst::LabelInfo label_info = inputVector->labelInfo();
label_info.name = i18n("Despiked %1").arg(label_info.name);
label_info.name = tr("Despiked %1").arg(label_info.name);
outputVector->setLabelInfo(label_info);

return true;
Expand Down
4 changes: 2 additions & 2 deletions src/plugins/filters/differentiation/differentiation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -136,9 +136,9 @@ QString DifferentiationSource::_automaticDescriptiveName() const {
QString DifferentiationSource::descriptionTip() const {
QString tip;

tip = i18n("Derivative: %1\n dX: %2\n").arg(Name()).arg(scalarStep()->value());
tip = tr("Derivative: %1\n dX: %2\n").arg(Name()).arg(scalarStep()->value());

tip += i18n("\nInput: %1").arg(vector()->descriptionTip());
tip += tr("\nInput: %1").arg(vector()->descriptionTip());
return tip;
}

Expand Down
6 changes: 3 additions & 3 deletions src/plugins/filters/unwind/filterunwind.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -161,9 +161,9 @@ QString FilterUnwindSource::_automaticDescriptiveName() const {
QString FilterUnwindSource::descriptionTip() const {
QString tip;

tip = i18n("Unwind Filter: %1\n %2 - %3\n Step: %4 %").arg(Name()).arg(minimumScalar()->value()).arg(maximumScalar()->value()).arg(stepScalar()->value());
tip = tr("Unwind Filter: %1\n %2 - %3\n Step: %4 %").arg(Name()).arg(minimumScalar()->value()).arg(maximumScalar()->value()).arg(stepScalar()->value());

tip += i18n("\nInput: %1").arg(vector()->descriptionTip());
tip += tr("\nInput: %1").arg(vector()->descriptionTip());
return tip;
}

Expand Down Expand Up @@ -236,7 +236,7 @@ bool FilterUnwindSource::algorithm() {
}

Kst::LabelInfo label_info = inputVector->labelInfo();
label_info.name = i18n("Unwind %1").arg(label_info.name);
label_info.name = tr("Unwind %1").arg(label_info.name);
outputVector->setLabelInfo(label_info);

return true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ FitExponentialUnweightedSource::~FitExponentialUnweightedSource() {


QString FitExponentialUnweightedSource::_automaticDescriptiveName() const {
return vectorY()->descriptiveName() + i18n(" Unweighted Exponential");
return vectorY()->descriptiveName() + tr(" Unweighted Exponential");
}


Expand Down Expand Up @@ -213,10 +213,10 @@ bool FitExponentialUnweightedSource::algorithm() {
Kst::ScalarPtr outputScalar = _outputScalars[SCALAR_OUT];

Kst::LabelInfo label_info = inputVectorY->labelInfo();
label_info.name = i18n("Exponential Fit to %1").arg(label_info.name);
label_info.name = tr("Exponential Fit to %1").arg(label_info.name);
outputVectorYFitted->setLabelInfo(label_info);

label_info.name = i18n("Exponential Fit Residuals");
label_info.name = tr("Exponential Fit Residuals");
outputVectorYResiduals->setLabelInfo(label_info);

bool bReturn = false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ FitExponentialWeightedSource::~FitExponentialWeightedSource() {


QString FitExponentialWeightedSource::_automaticDescriptiveName() const {
return vectorY()->descriptiveName() + i18n(" Weighted Exponential");
return vectorY()->descriptiveName() + tr(" Weighted Exponential");
}


Expand Down Expand Up @@ -228,10 +228,10 @@ bool FitExponentialWeightedSource::algorithm() {
Kst::ScalarPtr outputScalar = _outputScalars[SCALAR_OUT];

Kst::LabelInfo label_info = inputVectorY->labelInfo();
label_info.name = i18n("Exponential Fit to %1").arg(label_info.name);
label_info.name = tr("Exponential Fit to %1").arg(label_info.name);
outputVectorYFitted->setLabelInfo(label_info);

label_info.name = i18n("Exponential Fit Residuals");
label_info.name = tr("Exponential Fit Residuals");
outputVectorYResiduals->setLabelInfo(label_info);


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ FitGaussianUnweightedSource::~FitGaussianUnweightedSource() {


QString FitGaussianUnweightedSource::_automaticDescriptiveName() const {
return vectorY()->descriptiveName() + i18n(" Unweighted Gaussian");
return vectorY()->descriptiveName() + tr(" Unweighted Gaussian");
}


Expand Down Expand Up @@ -258,10 +258,10 @@ bool FitGaussianUnweightedSource::algorithm() {


Kst::LabelInfo label_info = inputVectorY->labelInfo();
label_info.name = i18n("Gaussian Fit to %1").arg(label_info.name);
label_info.name = tr("Gaussian Fit to %1").arg(label_info.name);
outputVectorYFitted->setLabelInfo(label_info);

label_info.name = i18n("Gaussian Fit Residuals");
label_info.name = tr("Gaussian Fit Residuals");
outputVectorYResiduals->setLabelInfo(label_info);

bool bReturn = false;
Expand Down
6 changes: 3 additions & 3 deletions src/plugins/fits/gaussian_weighted/fitgaussian_weighted.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ FitGaussianWeightedSource::~FitGaussianWeightedSource() {


QString FitGaussianWeightedSource::_automaticDescriptiveName() const {
return vectorY()->descriptiveName() + i18n(" Weighted Gaussian");
return vectorY()->descriptiveName() + tr(" Weighted Gaussian");
}


Expand Down Expand Up @@ -233,10 +233,10 @@ bool FitGaussianWeightedSource::algorithm() {


Kst::LabelInfo label_info = inputVectorY->labelInfo();
label_info.name = i18n("Gaussian Fit to %1").arg(label_info.name);
label_info.name = tr("Gaussian Fit to %1").arg(label_info.name);
outputVectorYFitted->setLabelInfo(label_info);

label_info.name = i18n("Gaussian Fit Residuals");
label_info.name = tr("Gaussian Fit Residuals");
outputVectorYResiduals->setLabelInfo(label_info);


Expand Down
10 changes: 5 additions & 5 deletions src/plugins/fits/gradient_unweighted/fitgradient_unweighted.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ FitGradientUnweightedSource::~FitGradientUnweightedSource() {


QString FitGradientUnweightedSource::_automaticDescriptiveName() const {
return vectorY()->descriptiveName() + i18n(" Unweighted Gradient");
return vectorY()->descriptiveName() + tr(" Unweighted Gradient");
}


Expand Down Expand Up @@ -174,16 +174,16 @@ bool FitGradientUnweightedSource::algorithm() {


Kst::LabelInfo label_info = inputVectorY->labelInfo();
label_info.name = i18n("Gradient Fit to %1").arg(label_info.name);
label_info.name = tr("Gradient Fit to %1").arg(label_info.name);
outputVectorYFitted->setLabelInfo(label_info);

label_info.name = i18n("Gradient Fit Residuals");
label_info.name = tr("Gradient Fit Residuals");
outputVectorYResiduals->setLabelInfo(label_info);

label_info.name = i18n("Gradient Fit Lower Limit");
label_info.name = tr("Gradient Fit Lower Limit");
outputVectorYLo->setLabelInfo(label_info);

label_info.name = i18n("Gradient Fit Upper Limit");
label_info.name = tr("Gradient Fit Upper Limit");
outputVectorYHi->setLabelInfo(label_info);

int i = 0;
Expand Down
10 changes: 5 additions & 5 deletions src/plugins/fits/gradient_weighted/fitgradient_weighted.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ FitGradientWeightedSource::~FitGradientWeightedSource() {


QString FitGradientWeightedSource::_automaticDescriptiveName() const {
return vectorY()->descriptiveName() + i18n(" Weighted Gradient");
return vectorY()->descriptiveName() + tr(" Weighted Gradient");
}


Expand Down Expand Up @@ -190,16 +190,16 @@ bool FitGradientWeightedSource::algorithm() {
Kst::ScalarPtr outputScalar = _outputScalars[SCALAR_OUT];

Kst::LabelInfo label_info = inputVectorY->labelInfo();
label_info.name = i18n("Gradient Fit to %1").arg(label_info.name);
label_info.name = tr("Gradient Fit to %1").arg(label_info.name);
outputVectorYFitted->setLabelInfo(label_info);

label_info.name = i18n("Gradient Fit Residuals");
label_info.name = tr("Gradient Fit Residuals");
outputVectorYResiduals->setLabelInfo(label_info);

label_info.name = i18n("Gradient Fit Lower Limit");
label_info.name = tr("Gradient Fit Lower Limit");
outputVectorYLo->setLabelInfo(label_info);

label_info.name = i18n("Gradient Fit Upper Limit");
label_info.name = tr("Gradient Fit Upper Limit");
outputVectorYHi->setLabelInfo(label_info);


Expand Down
10 changes: 5 additions & 5 deletions src/plugins/fits/linear_unweighted/fitlinear_unweighted.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ FitLinearUnweightedSource::~FitLinearUnweightedSource() {


QString FitLinearUnweightedSource::_automaticDescriptiveName() const {
return vectorY()->descriptiveName() + i18n(" Unweighted Linear");
return vectorY()->descriptiveName() + tr(" Unweighted Linear");
}


Expand Down Expand Up @@ -186,16 +186,16 @@ bool FitLinearUnweightedSource::algorithm() {
double yErr;

Kst::LabelInfo label_info = inputVectorY->labelInfo();
label_info.name = i18n("Linear Fit to %1").arg(label_info.name);
label_info.name = tr("Linear Fit to %1").arg(label_info.name);
outputVectorYFitted->setLabelInfo(label_info);

label_info.name = i18n("Linear Fit Residuals");
label_info.name = tr("Linear Fit Residuals");
outputVectorYResiduals->setLabelInfo(label_info);

label_info.name = i18n("Linear Fit Lower Limit");
label_info.name = tr("Linear Fit Lower Limit");
outputVectorYLo->setLabelInfo(label_info);

label_info.name = i18n("Linear Fit Upper Limit");
label_info.name = tr("Linear Fit Upper Limit");
outputVectorYHi->setLabelInfo(label_info);

if( precursor( inputVectorX, inputVectorY, 0, &iLength, false, true, 2, pInputs, outputVectorYFitted, outputVectorYResiduals, outputVectorYParameters, outputVectorYCovariance, outputVectorYLo, outputVectorYHi ) ) {
Expand Down
10 changes: 5 additions & 5 deletions src/plugins/fits/linear_weighted/fitlinear_weighted.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ FitLinearWeightedSource::~FitLinearWeightedSource() {


QString FitLinearWeightedSource::_automaticDescriptiveName() const {
return vectorY()->descriptiveName() + i18n(" Weighted Linear");
return vectorY()->descriptiveName() + tr(" Weighted Linear");
}


Expand Down Expand Up @@ -190,16 +190,16 @@ bool FitLinearWeightedSource::algorithm() {
Kst::ScalarPtr outputScalar = _outputScalars[SCALAR_OUT];

Kst::LabelInfo label_info = inputVectorY->labelInfo();
label_info.name = i18n("Linear Fit to %1").arg(label_info.name);
label_info.name = tr("Linear Fit to %1").arg(label_info.name);
outputVectorYFitted->setLabelInfo(label_info);

label_info.name = i18n("Linear Fit Residuals");
label_info.name = tr("Linear Fit Residuals");
outputVectorYResiduals->setLabelInfo(label_info);

label_info.name = i18n("Linear Fit Lower Limit");
label_info.name = tr("Linear Fit Lower Limit");
outputVectorYLo->setLabelInfo(label_info);

label_info.name = i18n("Linear Fit Upper Limit");
label_info.name = tr("Linear Fit Upper Limit");
outputVectorYHi->setLabelInfo(label_info);

int i = 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ FitLorentzianUnweightedSource::~FitLorentzianUnweightedSource() {


QString FitLorentzianUnweightedSource::_automaticDescriptiveName() const {
return vectorY()->descriptiveName() + i18n(" Lorentzian");
return vectorY()->descriptiveName() + tr(" Lorentzian");
}


Expand Down Expand Up @@ -259,10 +259,10 @@ bool FitLorentzianUnweightedSource::algorithm() {


Kst::LabelInfo label_info = inputVectorY->labelInfo();
label_info.name = i18n("Lorentzian Fit to %1").arg(label_info.name);
label_info.name = tr("Lorentzian Fit to %1").arg(label_info.name);
outputVectorYFitted->setLabelInfo(label_info);

label_info.name = i18n("Lorentzian Fit Residuals");
label_info.name = tr("Lorentzian Fit Residuals");
outputVectorYResiduals->setLabelInfo(label_info);

bool bReturn = false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ FitLorentzianWeightedSource::~FitLorentzianWeightedSource() {


QString FitLorentzianWeightedSource::_automaticDescriptiveName() const {
return vectorY()->descriptiveName() + i18n(" Weighted Lorentzian");
return vectorY()->descriptiveName() + tr(" Weighted Lorentzian");
}


Expand Down Expand Up @@ -232,10 +232,10 @@ bool FitLorentzianWeightedSource::algorithm() {
Kst::ScalarPtr outputScalar = _outputScalars[SCALAR_OUT];

Kst::LabelInfo label_info = inputVectorY->labelInfo();
label_info.name = i18n("Lorentzian Fit to %1").arg(label_info.name);
label_info.name = tr("Lorentzian Fit to %1").arg(label_info.name);
outputVectorYFitted->setLabelInfo(label_info);

label_info.name = i18n("Lorentzian Fit Residuals");
label_info.name = tr("Lorentzian Fit Residuals");
outputVectorYResiduals->setLabelInfo(label_info);


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ FitPolynomialUnweightedSource::~FitPolynomialUnweightedSource() {


QString FitPolynomialUnweightedSource::_automaticDescriptiveName() const {
return vectorY()->descriptiveName() + i18n(" Polynomial");
return vectorY()->descriptiveName() + tr(" Polynomial");
}


Expand Down Expand Up @@ -194,10 +194,10 @@ bool FitPolynomialUnweightedSource::algorithm() {
Kst::ScalarPtr outputScalar = _outputScalars[SCALAR_OUT];

Kst::LabelInfo label_info = inputVectorY->labelInfo();
label_info.name = i18n("Polynomial Fit to %1").arg(label_info.name);
label_info.name = tr("Polynomial Fit to %1").arg(label_info.name);
outputVectorYFitted->setLabelInfo(label_info);

label_info.name = i18n("Polynomial Fit Residuals");
label_info.name = tr("Polynomial Fit Residuals");
outputVectorYResiduals->setLabelInfo(label_info);

bool bReturn = false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ FitPolynomialWeightedSource::~FitPolynomialWeightedSource() {


QString FitPolynomialWeightedSource::_automaticDescriptiveName() const {
return vectorY()->descriptiveName() + i18n(" Weighted Polynomial");
return vectorY()->descriptiveName() + tr(" Weighted Polynomial");
}


Expand Down Expand Up @@ -210,10 +210,10 @@ bool FitPolynomialWeightedSource::algorithm() {
Kst::ScalarPtr outputScalar = _outputScalars[SCALAR_OUT];

Kst::LabelInfo label_info = inputVectorY->labelInfo();
label_info.name = i18n("Polynomial Fit to %1").arg(label_info.name);
label_info.name = tr("Polynomial Fit to %1").arg(label_info.name);
outputVectorYFitted->setLabelInfo(label_info);

label_info.name = i18n("Polynomial Fit Residuals");
label_info.name = tr("Polynomial Fit Residuals");
outputVectorYResiduals->setLabelInfo(label_info);

bool bReturn = false;
Expand Down
Loading