mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Fix translation of weightsystem names
This is very much the same as in commit dc03b7e7d6
("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>
This commit is contained in:
parent
83766db87b
commit
e0b70b82ca
1 changed files with 3 additions and 2 deletions
|
@ -12,6 +12,7 @@
|
||||||
#include "../device.h"
|
#include "../device.h"
|
||||||
#include "../statistics.h"
|
#include "../statistics.h"
|
||||||
#include "../qthelper.h"
|
#include "../qthelper.h"
|
||||||
|
#include "../gettextfromc.h"
|
||||||
|
|
||||||
#include <QCoreApplication>
|
#include <QCoreApplication>
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
|
@ -610,7 +611,7 @@ QVariant WSInfoModel::data(const QModelIndex& index, int role) const
|
||||||
ret = gr;
|
ret = gr;
|
||||||
break;
|
break;
|
||||||
case DESCRIPTION:
|
case DESCRIPTION:
|
||||||
ret = QString(info->name);
|
ret = gettextFromC::instance()->tr(info->name);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -761,7 +762,7 @@ TankInfoModel::TankInfoModel() : rows(-1)
|
||||||
setHeaderDataStrings( QStringList() << tr("Description") << tr("ml") << tr("bar"));
|
setHeaderDataStrings( QStringList() << tr("Description") << tr("ml") << tr("bar"));
|
||||||
struct tank_info_t *info = tank_info;
|
struct tank_info_t *info = tank_info;
|
||||||
for (info = tank_info; info->name; info++, rows++){
|
for (info = tank_info; info->name; info++, rows++){
|
||||||
QString infoName(info->name);
|
QString infoName = gettextFromC::instance()->tr(info->name);
|
||||||
if (infoName.count() > biggerEntry.count())
|
if (infoName.count() > biggerEntry.count())
|
||||||
biggerEntry = infoName;
|
biggerEntry = infoName;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue