mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
translations: initialize water type strings at run time
The water type strings were static and therefore passed through gettextFromC::tr() before main(). One would hope to get a warning in such a case, but this is not the case. Therefore, use the QT_TRANSLATE_NOOP macro to register the strings in Qt's translation system and translate the list when needed. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
9ee85c0802
commit
9d3b15bf9c
3 changed files with 24 additions and 11 deletions
|
@ -27,7 +27,7 @@ TabDiveInformation::TabDiveInformation(QWidget *parent) : TabBase(parent), ui(ne
|
|||
QStringList atmPressTypes { "mbar", get_depth_unit() ,tr("Use DC")};
|
||||
ui->atmPressType->insertItems(0, atmPressTypes);
|
||||
pressTypeIndex = 0;
|
||||
ui->waterTypeCombo->insertItems(0, waterTypes);
|
||||
ui->waterTypeCombo->insertItems(0, getWaterTypesAsString());
|
||||
|
||||
// This needs to be the same order as enum dive_comp_type in dive.h!
|
||||
QStringList types;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue