summaryrefslogtreecommitdiffstats
path: root/desktop-widgets
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2020-05-24 11:52:01 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2020-05-25 08:33:08 -0700
commit2d17edeb40125458313ca078026f933d49356e7f (patch)
tree596436f3514fe1fcce53bf7042a097d91d20d63c /desktop-widgets
parent87c91af82407857ca0b14bbef992bca2ce0cfafd (diff)
downloadsubsurface-2d17edeb40125458313ca078026f933d49356e7f.tar.gz
desktop: localize salinity value
The salinity value was not displayed with localized thousands separators. E.g. to a user of a German locale the density read as slightly over 1 g/l, when it should be approximately 1000 g/l. For consistency, also localize that value. Also localize the CNS and OTU numbers, even though these should (hopefully!) never come with thousands separators. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'desktop-widgets')
-rw-r--r--desktop-widgets/tab-widgets/TabDiveInformation.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/desktop-widgets/tab-widgets/TabDiveInformation.cpp b/desktop-widgets/tab-widgets/TabDiveInformation.cpp
index e73de4148..1881c39e5 100644
--- a/desktop-widgets/tab-widgets/TabDiveInformation.cpp
+++ b/desktop-widgets/tab-widgets/TabDiveInformation.cpp
@@ -119,8 +119,8 @@ void TabDiveInformation::updateWaterTypeWidget()
// Update fields that depend on the dive profile
void TabDiveInformation::updateProfile()
{
- ui->maxcnsText->setText(QString("%1\%").arg(current_dive->maxcns));
- ui->otuText->setText(QString("%1").arg(current_dive->otu));
+ ui->maxcnsText->setText(QString("%L1\%").arg(current_dive->maxcns));
+ ui->otuText->setText(QString("%L1").arg(current_dive->otu));
ui->maximumDepthText->setText(get_depth_string(current_dive->maxdepth, true));
ui->averageDepthText->setText(get_depth_string(current_dive->meandepth, true));
@@ -343,7 +343,7 @@ void TabDiveInformation::divesChanged(const QVector<dive *> &dives, DiveField fi
else
salinity_value = current_dive->salinity;
ui->waterTypeCombo->setCurrentIndex(updateSalinityComboIndex(salinity_value));
- ui->salinityText->setText(QString("%1g/ℓ").arg(salinity_value / 10.0));
+ ui->salinityText->setText(QString("%L1g/ℓ").arg(salinity_value / 10.0));
// TODO: The profile should recognize itself when the dive mode changed.
// It seem awkward to route this via the dive-information tab.
if (replot)