mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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>
This commit is contained in:
parent
87c91af824
commit
2d17edeb40
2 changed files with 4 additions and 3 deletions
|
@ -1,3 +1,4 @@
|
|||
desktop: localize salinity string with respect to thousands separators
|
||||
desktop: update date and time fields on maintab if user changes preferences
|
||||
mobile: small improvements to usability with dark theme
|
||||
Core: improve service selection for BLE, adding white list and black list
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Add table
Reference in a new issue