summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2016-11-05 13:04:42 +0100
committerStanislaw Halik <sthalik@misaki.pl>2016-11-05 13:07:34 +0100
commit395d606ab74c25e3c107e59a6b0933de9bf79d20 (patch)
tree7ccc69a7956564373a0a5c41c3dc1dce2b548980
parentdfa40a083dc3efaf665bc1f5e54633deda79a956 (diff)
modules: make more strings translatable
-rw-r--r--filter-accela/ftnoir_filter_accela.h2
-rw-r--r--filter-ewma2/ftnoir_filter_ewma2.h2
-rw-r--r--filter-kalman/kalman.h2
-rw-r--r--gui/main-window.cpp30
-rw-r--r--logic/work.cpp15
-rw-r--r--logic/work.hpp1
-rw-r--r--proto-fg/ftnoir_protocol_fg.h4
-rw-r--r--proto-fsuipc/ftnoir_protocol_fsuipc.h4
-rw-r--r--proto-ft/ftnoir_protocol_ft.h2
-rw-r--r--proto-ftn/ftnoir_protocol_ftn.h4
-rw-r--r--proto-mouse/ftnoir_protocol_mouse.h2
-rw-r--r--proto-sc/ftnoir_protocol_sc.h2
-rw-r--r--proto-vjoystick/vjoystick.cpp8
-rw-r--r--proto-vjoystick/vjoystick.h2
-rw-r--r--tracker-aruco/ftnoir_tracker_aruco.h2
-rw-r--r--tracker-freepie-udp/ftnoir_tracker_freepie-udp.h2
-rw-r--r--tracker-hatire/ftnoir_tracker_hat.h4
-rw-r--r--tracker-joystick/ftnoir_tracker_joystick.h2
-rw-r--r--tracker-pt/ftnoir_tracker_pt.h2
-rw-r--r--tracker-rift-025/ftnoir_tracker_rift_025.h2
-rw-r--r--tracker-rift-042/ftnoir_tracker_rift_042.h2
-rw-r--r--tracker-rift-080/ftnoir_tracker_rift_080.h2
-rw-r--r--tracker-rift-140/rift-140.hpp2
-rw-r--r--tracker-rs/ftnoir_tracker_rs.cpp40
-rw-r--r--tracker-test/test.h2
-rw-r--r--tracker-udp/ftnoir_tracker_udp.h2
26 files changed, 74 insertions, 70 deletions
diff --git a/filter-accela/ftnoir_filter_accela.h b/filter-accela/ftnoir_filter_accela.h
index 67cba49e..2557dafc 100644
--- a/filter-accela/ftnoir_filter_accela.h
+++ b/filter-accela/ftnoir_filter_accela.h
@@ -60,6 +60,6 @@ private slots:
class accelaDll : public Metadata
{
public:
- QString name() { return QString("Accela"); }
+ QString name() { return QString(QCoreApplication::translate("accelaDll", "Accela")); }
QIcon icon() { return QIcon(":/images/filter-16.png"); }
};
diff --git a/filter-ewma2/ftnoir_filter_ewma2.h b/filter-ewma2/ftnoir_filter_ewma2.h
index b857e8d9..e6a46739 100644
--- a/filter-ewma2/ftnoir_filter_ewma2.h
+++ b/filter-ewma2/ftnoir_filter_ewma2.h
@@ -59,6 +59,6 @@ private slots:
class ewmaDll : public Metadata
{
public:
- QString name() { return QString("EWMA"); }
+ QString name() { return QString(QCoreApplication::translate("ewmaDll", "EWMA")); }
QIcon icon() { return QIcon(":/images/filter-16.png"); }
};
diff --git a/filter-kalman/kalman.h b/filter-kalman/kalman.h
index fd71d99f..6bd1005f 100644
--- a/filter-kalman/kalman.h
+++ b/filter-kalman/kalman.h
@@ -156,7 +156,7 @@ public:
class kalmanDll : public Metadata
{
public:
- QString name() { return QString("Kalman"); }
+ QString name() { return QString(QCoreApplication::translate("kalmanDll", "Kalman")); }
QIcon icon() { return QIcon(":/images/filter-16.png"); }
};
diff --git a/gui/main-window.cpp b/gui/main-window.cpp
index 43d80be7..8e04d1e5 100644
--- a/gui/main-window.cpp
+++ b/gui/main-window.cpp
@@ -87,9 +87,9 @@ MainWindow::MainWindow() :
// profile menu
{
- profile_menu.addAction("Create new empty config", this, SLOT(make_empty_config()));
- profile_menu.addAction("Create new copied config", this, SLOT(make_copied_config()));
- profile_menu.addAction("Open configuration directory", this, SLOT(open_config_directory()));
+ profile_menu.addAction(tr("Create new empty config"), this, SLOT(make_empty_config()));
+ profile_menu.addAction(tr("Create new copied config"), this, SLOT(make_copied_config()));
+ profile_menu.addAction(tr("Open configuration directory"), this, SLOT(open_config_directory()));
ui.profile_button->setMenu(&profile_menu);
}
@@ -176,24 +176,24 @@ void MainWindow::init_tray_menu()
tray_menu.addAction(&menu_action_header);
menu_action_show.setIconVisibleInMenu(true);
- menu_action_show.setText(isHidden() ? "Show the Octopus" : "Hide the Octopus");
+ menu_action_show.setText(isHidden() ? tr("Show the Octopus") : tr("Hide the Octopus"));
menu_action_show.setIcon(QIcon(":/images/facetracknoir.png"));
QObject::connect(&menu_action_show, &QAction::triggered, this, [&]() { toggle_restore_from_tray(QSystemTrayIcon::Trigger); });
tray_menu.addAction(&menu_action_show);
tray_menu.addSeparator();
- menu_action_tracker.setText("Tracker settings");
+ menu_action_tracker.setText(tr("Tracker settings"));
menu_action_tracker.setIcon(QIcon(":/images/tools.png"));
QObject::connect(&menu_action_tracker, &QAction::triggered, this, &MainWindow::showTrackerSettings);
tray_menu.addAction(&menu_action_tracker);
- menu_action_filter.setText("Filter settings");
+ menu_action_filter.setText(tr("Filter settings"));
menu_action_filter.setIcon(QIcon(":/images/filter-16.png"));
QObject::connect(&menu_action_filter, &QAction::triggered, this, &MainWindow::showFilterSettings);
tray_menu.addAction(&menu_action_filter);
- menu_action_proto.setText("Protocol settings");
+ menu_action_proto.setText(tr("Protocol settings"));
menu_action_proto.setIcon(QIcon(":/images/settings16.png"));
QObject::connect(&menu_action_proto, &QAction::triggered, this, &MainWindow::showProtocolSettings);
tray_menu.addAction(&menu_action_proto);
@@ -201,18 +201,18 @@ void MainWindow::init_tray_menu()
tray_menu.addSeparator();
menu_action_mappings.setIcon(QIcon(":/images/curves.png"));
- menu_action_mappings.setText("Mappings");
+ menu_action_mappings.setText(tr("Mappings"));
QObject::connect(&menu_action_mappings, &QAction::triggered, this, &MainWindow::showCurveConfiguration);
tray_menu.addAction(&menu_action_mappings);
menu_action_options.setIcon(QIcon(":/images/tools.png"));
- menu_action_options.setText("Options");
+ menu_action_options.setText(tr("Options"));
QObject::connect(&menu_action_options, &QAction::triggered, this, &MainWindow::show_options_dialog);
tray_menu.addAction(&menu_action_options);
tray_menu.addSeparator();
- menu_action_exit.setText("Exit");
+ menu_action_exit.setText(tr("Exit"));
QObject::connect(&menu_action_exit, &QAction::triggered, this, &MainWindow::exit);
tray_menu.addAction(&menu_action_exit);
}
@@ -243,8 +243,8 @@ void MainWindow::die_on_config_not_writable()
static const QString pad(16, QChar(' '));
QMessageBox::critical(this,
- "The Octopus is sad",
- QStringLiteral("Check permissions for your .ini directory:\n\n\"%1\"%2\n\nExiting now.").arg(group::ini_directory()).arg(pad),
+ tr("The Octopus is sad"),
+ tr("Check permissions for your .ini directory:\n\n\"%1\"%2\n\nExiting now.").arg(group::ini_directory()).arg(pad),
QMessageBox::Close, QMessageBox::NoButton);
// signals main() to short-circuit
@@ -437,8 +437,8 @@ void MainWindow::startTracker()
if (!libs.correct)
{
- QMessageBox::warning(this, "Library load error",
- "One of libraries failed to load. Check installation.",
+ QMessageBox::warning(this, tr("Library load error"),
+ tr("One of libraries failed to load. Check installation."),
QMessageBox::Ok,
QMessageBox::NoButton);
libs = SelectedLibraries();
@@ -729,7 +729,7 @@ void MainWindow::toggle_restore_from_tray(QSystemTrayIcon::ActivationReason e)
const bool is_minimized = isHidden() || !is_tray_enabled();
- menu_action_show.setText(!isHidden() ? "Show the Octopus" : "Hide the Octopus");
+ menu_action_show.setText(!isHidden() ? tr("Show the Octopus") : tr("Hide the Octopus"));
setVisible(is_minimized);
setHidden(!is_minimized);
diff --git a/logic/work.cpp b/logic/work.cpp
index c5fcad9a..d2a16139 100644
--- a/logic/work.cpp
+++ b/logic/work.cpp
@@ -1,11 +1,12 @@
#include "work.hpp"
#include "opentrack-library-path.h"
+#include <QObject>
#include <QMessageBox>
#include <QFileDialog>
-static QString browse_datalogging_file(main_settings &s)
+QString Work::browse_datalogging_file(main_settings &s)
{
QString filename = s.tracklogging_filename;
if (filename.isEmpty())
@@ -15,7 +16,11 @@ static QString browse_datalogging_file(main_settings &s)
and be a known problem. Possible solution is to use the QFileDialog::DontUseNativeDialog flag.
Since the freeze is apparently random, I'm not sure it helped.
*/
- QString newfilename = QFileDialog::getSaveFileName(nullptr, QFileDialog::tr("Select Filename"), filename, QFileDialog::tr("CSV File (*.csv)"), nullptr); //, QFileDialog::DontUseNativeDialog);
+ QString newfilename = QFileDialog::getSaveFileName(nullptr,
+ QCoreApplication::translate("Work", "Select filename"),
+ filename,
+ QCoreApplication::translate("Work", "CSV File (*.csv)"),
+ nullptr);
if (!newfilename.isEmpty())
{
s.tracklogging_filename = newfilename;
@@ -30,7 +35,7 @@ std::shared_ptr<TrackLogger> Work::make_logger(main_settings &s)
if (s.tracklogging_enabled)
{
QString filename = browse_datalogging_file(s);
- if (static_cast<QString>(s.tracklogging_filename).isEmpty())
+ if (filename.isEmpty())
{
// The user probably canceled the file dialog. In this case we don't want to do anything.
}
@@ -40,8 +45,8 @@ std::shared_ptr<TrackLogger> Work::make_logger(main_settings &s)
if (!logger->is_open())
{
logger = nullptr;
- QMessageBox::warning(nullptr, "Logging Error",
- "Unable to open file: " + s.tracklogging_filename + ". Proceeding without logging.",
+ QMessageBox::warning(nullptr, QCoreApplication::translate("Work", "Logging error"),
+ QCoreApplication::translate("Work", "Unable to open file '%1'. Proceeding without logging.").arg(s.tracklogging_filename),
QMessageBox::Ok,
QMessageBox::NoButton);
}
diff --git a/logic/work.hpp b/logic/work.hpp
index c29a53b0..b614c580 100644
--- a/logic/work.hpp
+++ b/logic/work.hpp
@@ -40,4 +40,5 @@ struct OPENTRACK_LOGIC_EXPORT Work
private:
static std::shared_ptr<TrackLogger> make_logger(main_settings &s);
+ static QString browse_datalogging_file(main_settings &s);
};
diff --git a/proto-fg/ftnoir_protocol_fg.h b/proto-fg/ftnoir_protocol_fg.h
index 070ca571..019b8c57 100644
--- a/proto-fg/ftnoir_protocol_fg.h
+++ b/proto-fg/ftnoir_protocol_fg.h
@@ -37,7 +37,7 @@ public:
bool correct();
void pose(const double *headpose);
QString game_name() {
- return "FlightGear";
+ return QCoreApplication::translate("flightgear", "FlightGear");
}
private:
settings s;
@@ -64,6 +64,6 @@ private slots:
class flightgearDll : public Metadata
{
public:
- QString name() { return QString("FlightGear"); }
+ QString name() { return QString(QCoreApplication::translate("flightgearDll", "FlightGear")); }
QIcon icon() { return QIcon(":/images/flightgear.png"); }
};
diff --git a/proto-fsuipc/ftnoir_protocol_fsuipc.h b/proto-fsuipc/ftnoir_protocol_fsuipc.h
index eea346c3..cd2ed9a7 100644
--- a/proto-fsuipc/ftnoir_protocol_fsuipc.h
+++ b/proto-fsuipc/ftnoir_protocol_fsuipc.h
@@ -54,7 +54,7 @@ public:
void pose(const double* headpose);
QString game_name()
{
- return "Microsoft Flight Simulator X";
+ return QCoreApplication::translate("fsuipc", "Microsoft Flight Simulator X");
}
private:
QLibrary FSUIPCLib;
@@ -84,7 +84,7 @@ private slots:
class fsuipcDll : public Metadata
{
public:
- QString name() { return QString("FSUIPC -- Microsoft FS2002/FS2004"); }
+ QString name() { return QString(QCoreApplication::translate("fsuipcDll", "FSUIPC -- Microsoft FS2002/FS2004")); }
QIcon icon() { return QIcon(":/images/fs9.png"); }
};
diff --git a/proto-ft/ftnoir_protocol_ft.h b/proto-ft/ftnoir_protocol_ft.h
index 19bb39c3..e5a63e17 100644
--- a/proto-ft/ftnoir_protocol_ft.h
+++ b/proto-ft/ftnoir_protocol_ft.h
@@ -93,6 +93,6 @@ private slots:
class freetrackDll : public Metadata
{
public:
- QString name() { return QString("freetrack 2.0 Enhanced"); }
+ QString name() { return QString(QCoreApplication::translate("freetrackDll", "freetrack 2.0 Enhanced")); }
QIcon icon() { return QIcon(":/images/freetrack.png"); }
};
diff --git a/proto-ftn/ftnoir_protocol_ftn.h b/proto-ftn/ftnoir_protocol_ftn.h
index 28abf204..383b4ed7 100644
--- a/proto-ftn/ftnoir_protocol_ftn.h
+++ b/proto-ftn/ftnoir_protocol_ftn.h
@@ -38,7 +38,7 @@ public:
bool correct();
void pose(const double *headpose);
QString game_name() {
- return "UDP Tracker";
+ return QCoreApplication::translate("udp", "UDP Tracker");
}
private:
QUdpSocket outSocket;
@@ -64,6 +64,6 @@ private slots:
class udpDll : public Metadata
{
public:
- QString name() { return QString("UDP receiver"); }
+ QString name() { return QString(QCoreApplication::translate("udpDll", "UDP receiver")); }
QIcon icon() { return QIcon(":/images/facetracknoir.png"); }
};
diff --git a/proto-mouse/ftnoir_protocol_mouse.h b/proto-mouse/ftnoir_protocol_mouse.h
index 39209401..e920c047 100644
--- a/proto-mouse/ftnoir_protocol_mouse.h
+++ b/proto-mouse/ftnoir_protocol_mouse.h
@@ -60,6 +60,6 @@ private slots:
class mouseDll : public Metadata
{
public:
- QString name() { return QString("mouse emulation"); }
+ QString name() { return QString(QCoreApplication::translate("mouseDll", "mouse emulation")); }
QIcon icon() { return QIcon(":/images/mouse.png"); }
};
diff --git a/proto-sc/ftnoir_protocol_sc.h b/proto-sc/ftnoir_protocol_sc.h
index 5f8717f4..ff664351 100644
--- a/proto-sc/ftnoir_protocol_sc.h
+++ b/proto-sc/ftnoir_protocol_sc.h
@@ -103,6 +103,6 @@ private slots:
class simconnectDll : public Metadata
{
public:
- QString name() { return QString("Microsoft FSX SimConnect"); }
+ QString name() { return QString(QCoreApplication::translate("simconnectDll", "Microsoft FSX SimConnect")); }
QIcon icon() { return QIcon(":/images/fsx.png"); }
};
diff --git a/proto-vjoystick/vjoystick.cpp b/proto-vjoystick/vjoystick.cpp
index 85fe9421..557b5e99 100644
--- a/proto-vjoystick/vjoystick.cpp
+++ b/proto-vjoystick/vjoystick.cpp
@@ -99,11 +99,11 @@ vjoystick_proto::vjoystick_proto()
{
QMessageBox msgbox;
msgbox.setIcon(QMessageBox::Critical);
- msgbox.setText("vjoystick driver missing");
- msgbox.setInformativeText("vjoystick won't work without the driver installed.");
+ msgbox.setText(QCoreApplication::translate("vjoystick_proto", "vjoystick driver missing"));
+ msgbox.setInformativeText(QCoreApplication::translate("vjoystick_proto", "vjoystick won't work without the driver installed."));
- QPushButton* driver_button = msgbox.addButton("Download the driver", QMessageBox::ActionRole);
- QPushButton* project_site_button = msgbox.addButton("Visit project site", QMessageBox::ActionRole);
+ QPushButton* driver_button = msgbox.addButton(QCoreApplication::translate("vjoystick_proto", "Download the driver"), QMessageBox::ActionRole);
+ QPushButton* project_site_button = msgbox.addButton(QCoreApplication::translate("vjoystick_proto", "Visit project site"), QMessageBox::ActionRole);
msgbox.addButton(QMessageBox::Close);
(void) msgbox.exec();
diff --git a/proto-vjoystick/vjoystick.h b/proto-vjoystick/vjoystick.h
index 2d3fd378..49302030 100644
--- a/proto-vjoystick/vjoystick.h
+++ b/proto-vjoystick/vjoystick.h
@@ -74,6 +74,6 @@ private:
class vjoystick_metadata : public Metadata
{
public:
- QString name() { return QString("Joystick emulation -- vjoystick"); }
+ QString name() { return QString(QCoreApplication::translate("vjoystick_metadata", "Joystick emulation -- vjoystick")); }
QIcon icon() { return QIcon(":/images/vjoystick.png"); }
};
diff --git a/tracker-aruco/ftnoir_tracker_aruco.h b/tracker-aruco/ftnoir_tracker_aruco.h
index 7500438b..ccb1ad21 100644
--- a/tracker-aruco/ftnoir_tracker_aruco.h
+++ b/tracker-aruco/ftnoir_tracker_aruco.h
@@ -131,6 +131,6 @@ private slots:
class aruco_metadata : public Metadata
{
- QString name() { return QString("aruco -- paper marker tracker"); }
+ QString name() { return QString(QCoreApplication::translate("aruco_metadata", "aruco -- paper marker tracker")); }
QIcon icon() { return QIcon(":/images/aruco.png"); }
};
diff --git a/tracker-freepie-udp/ftnoir_tracker_freepie-udp.h b/tracker-freepie-udp/ftnoir_tracker_freepie-udp.h
index d7bc3733..5a98e194 100644
--- a/tracker-freepie-udp/ftnoir_tracker_freepie-udp.h
+++ b/tracker-freepie-udp/ftnoir_tracker_freepie-udp.h
@@ -63,7 +63,7 @@ private slots:
class meta_freepie : public Metadata
{
public:
- QString name() { return QString("FreePIE UDP receiver"); }
+ QString name() { return QString(QCoreApplication::translate("meta_freepie", "FreePIE UDP receiver")); }
QIcon icon() { return QIcon(":/glovepie.png"); }
};
diff --git a/tracker-hatire/ftnoir_tracker_hat.h b/tracker-hatire/ftnoir_tracker_hat.h
index 0d9d48ad..9876414f 100644
--- a/tracker-hatire/ftnoir_tracker_hat.h
+++ b/tracker-hatire/ftnoir_tracker_hat.h
@@ -14,8 +14,6 @@
#include <QtSerialPort/QSerialPortInfo>
#include <QSettings>
-#define VER_FILEVERSION_STR "Version 2.1.1"
-
class hatire : public QObject, public ITracker
{
Q_OBJECT
@@ -50,6 +48,6 @@ private:
class hatire_metadata : public Metadata
{
- QString name() { return QString("Hatire Arduino"); }
+ QString name() { return QString(QCoreApplication::translate("hatire_metadata", "Hatire Arduino")); }
QIcon icon() { return QIcon(":/images/hat.png"); }
};
diff --git a/tracker-joystick/ftnoir_tracker_joystick.h b/tracker-joystick/ftnoir_tracker_joystick.h
index 3a5175ed..aea45983 100644
--- a/tracker-joystick/ftnoir_tracker_joystick.h
+++ b/tracker-joystick/ftnoir_tracker_joystick.h
@@ -72,7 +72,7 @@ private slots:
class joystickDll : public Metadata
{
public:
- QString name() { return QString("Joystick input"); }
+ QString name() { return QString(QCoreApplication::translate("joystickDll", "Joystick input")); }
QIcon icon() { return QIcon(":/images/facetracknoir.png"); }
};
diff --git a/tracker-pt/ftnoir_tracker_pt.h b/tracker-pt/ftnoir_tracker_pt.h
index 23bc1e9c..fe4458f7 100644
--- a/tracker-pt/ftnoir_tracker_pt.h
+++ b/tracker-pt/ftnoir_tracker_pt.h
@@ -84,7 +84,7 @@ private:
class PT_metadata : public Metadata
{
- QString name() { return QString("PointTracker 1.1"); }
+ QString name() { return QString(QCoreApplication::translate("PT_metadata", "PointTracker 1.1")); }
QIcon icon() { return QIcon(":/Resources/Logo_IR.png"); }
};
diff --git a/tracker-rift-025/ftnoir_tracker_rift_025.h b/tracker-rift-025/ftnoir_tracker_rift_025.h
index 622b0722..96331fd2 100644
--- a/tracker-rift-025/ftnoir_tracker_rift_025.h
+++ b/tracker-rift-025/ftnoir_tracker_rift_025.h
@@ -57,7 +57,7 @@ private slots:
class rift_025Dll : public Metadata
{
public:
- QString name() { return QString("Oculus Rift runtime 0.2.5 -- HMD"); }
+ QString name() { return QString(QCoreApplication::translate("rift_025Dll", "Oculus Rift runtime 0.2.5 -- HMD")); }
QIcon icon() { return QIcon(":/images/rift_tiny.png"); }
};
diff --git a/tracker-rift-042/ftnoir_tracker_rift_042.h b/tracker-rift-042/ftnoir_tracker_rift_042.h
index 103db3cc..ed802da0 100644
--- a/tracker-rift-042/ftnoir_tracker_rift_042.h
+++ b/tracker-rift-042/ftnoir_tracker_rift_042.h
@@ -54,7 +54,7 @@ private slots:
class rift_042Dll : public Metadata
{
public:
- QString name() { return QString("Oculus Rift runtime 0.4.2 -- HMD"); }
+ QString name() { return QString(QCoreApplication::translate("rift_042Dll", "Oculus Rift runtime 0.4.2 -- HMD")); }
QIcon icon() { return QIcon(":/images/rift_tiny.png"); }
};
diff --git a/tracker-rift-080/ftnoir_tracker_rift_080.h b/tracker-rift-080/ftnoir_tracker_rift_080.h
index e1283226..7868b2a2 100644
--- a/tracker-rift-080/ftnoir_tracker_rift_080.h
+++ b/tracker-rift-080/ftnoir_tracker_rift_080.h
@@ -53,7 +53,7 @@ private slots:
class rift_080Dll : public Metadata
{
public:
- QString name() { return QString("Oculus Rift runtime 0.8.0 -- HMD"); }
+ QString name() { return QString(QCoreApplication::translate("rift_080Dll", "Oculus Rift runtime 0.8.0 -- HMD")); }
QIcon icon() { return QIcon(":/images/rift_tiny.png"); }
};
diff --git a/tracker-rift-140/rift-140.hpp b/tracker-rift-140/rift-140.hpp
index 22b2b383..23ec6fb3 100644
--- a/tracker-rift-140/rift-140.hpp
+++ b/tracker-rift-140/rift-140.hpp
@@ -54,7 +54,7 @@ private slots:
class rift_140Dll : public Metadata
{
public:
- QString name() { return QString("Oculus Rift runtime 1.4.0 -- HMD"); }
+ QString name() { return QString(QCoreApplication::translate("rift_140Dll", "Oculus Rift runtime 1.4.0 -- HMD")); }
QIcon icon() { return QIcon(":/images/rift_tiny.png"); }
};
diff --git a/tracker-rs/ftnoir_tracker_rs.cpp b/tracker-rs/ftnoir_tracker_rs.cpp
index 4364eca0..6eae0693 100644
--- a/tracker-rs/ftnoir_tracker_rs.cpp
+++ b/tracker-rs/ftnoir_tracker_rs.cpp
@@ -46,7 +46,7 @@ void RSTracker::configurePreviewFrame()
void RSTracker::start_tracker(QFrame* previewFrame)
{
- qDebug() << "tracker_rs: starting tracker";
+ qDebug() << "tracker_rs: starting tracker";
mPreviewFrame = previewFrame;
@@ -58,20 +58,20 @@ void RSTracker::start_tracker(QFrame* previewFrame)
}
void RSTracker::startPreview(){
- qDebug() << "tracker_rs: starting preview";
+ qDebug() << "tracker_rs: starting preview";
mPreviewUpdateTimer.start(kPreviewUpdateInterval);
}
void RSTracker::updatePreview(){
- if (mImageWidget != nullptr && mImageWidget->isEnabled() && mTrackerWorkerThread.isRunning())
- mImageWidget->setImage(mTrackerWorkerThread.getPreview());
- else
- qDebug() << "tracker_rs: not updating preview. worker thread running: " << mTrackerWorkerThread.isRunning();
+ if (mImageWidget != nullptr && mImageWidget->isEnabled() && mTrackerWorkerThread.isRunning())
+ mImageWidget->setImage(mTrackerWorkerThread.getPreview());
+ else
+ qDebug() << "tracker_rs: not updating preview. worker thread running: " << mTrackerWorkerThread.isRunning();
}
void RSTracker::stopPreview(){
- mPreviewUpdateTimer.stop();
- qDebug() << "tracker_rs: stopped preview";
+ mPreviewUpdateTimer.stop();
+ qDebug() << "tracker_rs: stopped preview";
}
void RSTracker::handleTrackingEnded(int exitCode){
@@ -98,17 +98,17 @@ void RSTracker::showRealSenseErrorMessageBox(int exitCode)
msgBox.setIcon(QMessageBox::Critical);
msgBox.setText("RealSense Tracking Error");
- switch(exitCode){
- case -101: //The implementation got an invalid handle from the RealSense SDK session/modules
+ switch(exitCode){
+ case -101: //The implementation got an invalid handle from the RealSense SDK session/modules
msgBox.setInformativeText("Couldn't initialize RealSense tracking. Please make sure SDK Runtime 2016 R2 is installed.");
- break;
- case -301: //RealSense SDK runtime execution aborted.
- msgBox.setInformativeText("Tracking stopped after the RealSense SDK Runtime execution has aborted.");
- break;
- case -601: //RealSense Camera stream configuration has changed.
- msgBox.setInformativeText("Tracking stopped after another program changed camera streams configuration.");
- break;
- default:
+ break;
+ case -301: //RealSense SDK runtime execution aborted.
+ msgBox.setInformativeText("Tracking stopped after the RealSense SDK Runtime execution has aborted.");
+ break;
+ case -601: //RealSense Camera stream configuration has changed.
+ msgBox.setInformativeText("Tracking stopped after another program changed camera streams configuration.");
+ break;
+ default:
msgBox.setInformativeText("Status code: " + QString::number(exitCode) + ".\n\nNote that you need the latest camera drivers and the SDK runtime 2016 R2 to be installed.");
}
@@ -126,7 +126,7 @@ void RSTracker::data(double *data)
}
RSTracker::~RSTracker() {
- qDebug() << "tracker is being destroyed.";
+ qDebug() << "tracker is being destroyed.";
stopPreview();
@@ -142,7 +142,7 @@ RSTracker::~RSTracker() {
}
QString RSTrackerMetaData::name() {
- return QString("Intel® RealSense™ Technology");
+ return QString(QCoreApplication::translate("RSTrackerMetaData", "Intel® RealSense™ Technology"));
}
QIcon RSTrackerMetaData::icon() {
diff --git a/tracker-test/test.h b/tracker-test/test.h
index 5d425b96..fd446f98 100644
--- a/tracker-test/test.h
+++ b/tracker-test/test.h
@@ -39,7 +39,7 @@ private slots:
class metadata : public Metadata
{
public:
- QString name() { return QString("Testing - sine wave"); }
+ QString name() { return QString(QCoreApplication::translate("metadata", "Testing - sine wave")); }
QIcon icon() { return QIcon(":/images/facetracknoir.png"); }
};
diff --git a/tracker-udp/ftnoir_tracker_udp.h b/tracker-udp/ftnoir_tracker_udp.h
index 307417b2..ecbc9a6d 100644
--- a/tracker-udp/ftnoir_tracker_udp.h
+++ b/tracker-udp/ftnoir_tracker_udp.h
@@ -54,7 +54,7 @@ private slots:
class udpDll : public Metadata
{
public:
- QString name() { return QString("UDP sender"); }
+ QString name() { return QString(QCoreApplication::translate("udpDll", "UDP sender")); }
QIcon icon() { return QIcon(":/images/facetracknoir.png"); }
};