aboutsummaryrefslogtreecommitdiffstats
path: root/qt-ui/models.cpp
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2013-12-02 07:36:40 -0800
committerGravatar Dirk Hohndel <dirk@hohndel.org>2013-12-02 07:36:40 -0800
commite0b70b82cad914b4e4f01c671f0fab12e3c8976b (patch)
tree811d06bd4b878d6d54875bb9ea2d1fb7487782fc /qt-ui/models.cpp
parent83766db87bb7920b44e8a35f828e148fee8d6486 (diff)
downloadsubsurface-e0b70b82cad914b4e4f01c671f0fab12e3c8976b.tar.gz
Fix translation of weightsystem names
This is very much the same as in commit dc03b7e7d689 ("We need the correct context to translate event names"). I didn't pay enough attention when reading the bug report and missed that the weight system names were also not correctly translated. Fixes #312 (I hope this time for real) Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/models.cpp')
-rw-r--r--qt-ui/models.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/qt-ui/models.cpp b/qt-ui/models.cpp
index bb0de69f3..d7add1b3f 100644
--- a/qt-ui/models.cpp
+++ b/qt-ui/models.cpp
@@ -12,6 +12,7 @@
#include "../device.h"
#include "../statistics.h"
#include "../qthelper.h"
+#include "../gettextfromc.h"
#include <QCoreApplication>
#include <QDebug>
@@ -610,7 +611,7 @@ QVariant WSInfoModel::data(const QModelIndex& index, int role) const
ret = gr;
break;
case DESCRIPTION:
- ret = QString(info->name);
+ ret = gettextFromC::instance()->tr(info->name);
break;
}
break;
@@ -761,7 +762,7 @@ TankInfoModel::TankInfoModel() : rows(-1)
setHeaderDataStrings( QStringList() << tr("Description") << tr("ml") << tr("bar"));
struct tank_info_t *info = tank_info;
for (info = tank_info; info->name; info++, rows++){
- QString infoName(info->name);
+ QString infoName = gettextFromC::instance()->tr(info->name);
if (infoName.count() > biggerEntry.count())
biggerEntry = infoName;
}