Translate header strings for APD

We are matching translated header names. Thus, when composing
a header line for APD, make sure it contains translations.

This mechanism is quite brittle. Our German translations had
two different translations for "Sample time" and this already
broke it. This is why this patch also includes a fix for a
translation string (should be fixed in transiflex as well
of course).

Fixes #3246

Signed-off-by: Robert C. Helling <helling@atdotde.de>
This commit is contained in:
Robert C. Helling 2021-05-13 15:33:07 +02:00 committed by Dirk Hohndel
parent 5dfc183517
commit 41f87f3e77
2 changed files with 2 additions and 2 deletions

View file

@ -573,7 +573,7 @@ void DiveLogImportDialog::loadFileContents(int value, whatChanged triggeredBy)
apd=true;
firstLine = "Sample time" + apdseparator + "Sample depth" + apdseparator + "Sample setpoint" + apdseparator + "Sample sensor1 pO₂" + apdseparator + "Sample sensor2 pO₂" + apdseparator + "Sample sensor3 pO₂" + apdseparator + "Sample pO₂" + apdseparator + "" + apdseparator + "" + apdseparator + "" + apdseparator + "" + apdseparator + "" + apdseparator + "" + apdseparator + "" + apdseparator + "" + apdseparator + "Sample temperature" + apdseparator + "" + apdseparator + "Sample CNS" + apdseparator + "Sample stopdepth";
firstLine = tr("Sample time") + apdseparator + tr("Sample depth") + apdseparator + tr("Sample setpoint") + apdseparator + tr("Sample sensor1 pO₂") + apdseparator + tr("Sample sensor2 pO₂") + apdseparator + tr("Sample sensor3 pO₂") + apdseparator + tr("Sample pO₂") + apdseparator + "" + apdseparator + "" + apdseparator + "" + apdseparator + "" + apdseparator + "" + apdseparator + "" + apdseparator + "" + apdseparator + "" + apdseparator + tr("Sample temperature") + apdseparator + "" + apdseparator + tr("Sample CNS") + apdseparator + tr("Sample stopdepth");
blockSignals(true);
ui->CSVSeparator->setCurrentText(apdseparator);
if (triggeredBy == INITIAL && fileNames.first().contains(".apd", Qt::CaseInsensitive))

View file

@ -4013,7 +4013,7 @@ Position verwenden</translation>
<location filename="../desktop-widgets/divelogimportdialog.cpp" line="812"/>
<location filename="../desktop-widgets/divelogimportdialog.cpp" line="912"/>
<source>Sample time</source>
<translation>Segment Dauer</translation>
<translation>Segment Zeit</translation>
</message>
<message>
<location filename="../desktop-widgets/divelogimportdialog.cpp" line="694"/>