Use correct "tr" call for translating dive mode names
Correctly use gettextFromC::instance()->tr(); instead of a simple
tr(); to translate the dive mode names.
This goes on top of 0bc9edf855
and finally makes the whole thing work.
Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
#include "core/device.h"
|
||||
#include "core/qthelper.h"
|
||||
#include "core/subsurface-qt/SettingsObjectWrapper.h"
|
||||
#include "core/gettextfromc.h"
|
||||
#include <QApplication>
|
||||
#include <QTextDocument>
|
||||
#include <QtConcurrent>
|
||||
@@ -252,7 +253,7 @@ QVariant DivePlannerPointsModel::data(const QModelIndex &index, int role) const
|
||||
else
|
||||
return p.time / 60;
|
||||
case DIVEMODE:
|
||||
return QString(tr(divemode_text_ui[p.divemode]));
|
||||
return gettextFromC::instance()->tr(divemode_text_ui[p.divemode]);
|
||||
case GAS:
|
||||
/* Check if we have the same gasmix two or more times
|
||||
* If yes return more verbose string */
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
*/
|
||||
#include "qt-models/models.h"
|
||||
#include "core/qthelper.h"
|
||||
#include "core/gettextfromc.h"
|
||||
|
||||
#include <QLocale>
|
||||
|
||||
@@ -83,7 +84,7 @@ void DiveTypeSelectionModel::repopulate()
|
||||
{
|
||||
QStringList modes = QStringList();
|
||||
for (int i = 0; i < FREEDIVE; i++)
|
||||
modes.append(QString(tr(divemode_text_ui[i])));
|
||||
modes.append(gettextFromC::instance()->tr(divemode_text_ui[i]));
|
||||
setStringList(modes);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user