summaryrefslogtreecommitdiffstats
path: root/desktop-widgets
diff options
context:
space:
mode:
authorGravatar Robert C. Helling <helling@atdotde.de>2018-05-17 10:04:41 +0200
committerGravatar Robert C. Helling <helling@atdotde.de>2018-05-28 09:57:00 +0200
commit7c6e5ed5dbc32c90984b1cc92bc9dfc023295c84 (patch)
tree340500dba2318c05db62c76073a1e31165b91adc /desktop-widgets
parent424efb77201de370d35b10028eba40736a0fe955 (diff)
downloadsubsurface-7c6e5ed5dbc32c90984b1cc92bc9dfc023295c84.tar.gz
Distinguish between user and internal divemode names
The former should be translated but not those that go to xml/git. ... and fix capitalization of pSCR. Suggested-by: Stefan Fuchs <sfuchs@gmx.de> Signed-off-by: Robert C. Helling <helling@atdotde.de>
Diffstat (limited to 'desktop-widgets')
-rw-r--r--desktop-widgets/diveplanner.cpp3
-rw-r--r--desktop-widgets/tab-widgets/maintab.cpp5
2 files changed, 6 insertions, 2 deletions
diff --git a/desktop-widgets/diveplanner.cpp b/desktop-widgets/diveplanner.cpp
index b22d268d8..bbaf8dc7f 100644
--- a/desktop-widgets/diveplanner.cpp
+++ b/desktop-widgets/diveplanner.cpp
@@ -447,7 +447,8 @@ PlannerSettingsWidget::PlannerSettingsWidget(QWidget *parent, Qt::WindowFlags f)
disableDecoElements((int) prefs.planner_deco_mode);
// should be the same order as in dive_comp_type!
- rebreather_modes << tr("Open circuit") << tr("CCR") << tr("pSCR");
+ for (int i=0; i < FREEDIVE; i++)
+ rebreather_modes.append(QString(divemode_text_ui[i]));
ui.rebreathermode->insertItems(0, rebreather_modes);
modeMapper = new QSignalMapper(this);
diff --git a/desktop-widgets/tab-widgets/maintab.cpp b/desktop-widgets/tab-widgets/maintab.cpp
index 0f50800c9..c9dccc7ea 100644
--- a/desktop-widgets/tab-widgets/maintab.cpp
+++ b/desktop-widgets/tab-widgets/maintab.cpp
@@ -109,7 +109,10 @@ MainTab::MainTab(QWidget *parent) : QTabWidget(parent),
connect(ui.weights, SIGNAL(addButtonClicked()), this, SLOT(addWeight_clicked()));
// This needs to be the same order as enum dive_comp_type in dive.h!
- ui.DiveType->insertItems(0, QStringList() << tr("OC") << tr("CCR") << tr("pSCR") << tr("Freedive"));
+ QStringList types = QStringList();
+ for (int i = 0; i < NUM_DIVEMODE; i++)
+ types.append(QString(divemode_text_ui[i]));
+ ui.DiveType->insertItems(0, types);
connect(ui.DiveType, SIGNAL(currentIndexChanged(int)), this, SLOT(divetype_Changed(int)));
connect(ui.cylinders->view(), SIGNAL(clicked(QModelIndex)), this, SLOT(editCylinderWidget(QModelIndex)));