Made more strings translatable

This commit is contained in:
Bill Somerville 2020-05-19 11:26:24 +01:00
parent 4f08363d68
commit 84f153517a
No known key found for this signature in database
GPG Key ID: D864B06D1E81618F
2 changed files with 42 additions and 42 deletions

View File

@ -101,22 +101,22 @@ QString DecodeHighlightingModel::highlight_name (Highlight h)
{ {
switch (h) switch (h)
{ {
case Highlight::CQ: return "CQ in message"; case Highlight::CQ: return tr ("CQ in message");
case Highlight::MyCall: return "My Call in message"; case Highlight::MyCall: return tr ("My Call in message");
case Highlight::Tx: return "Transmitted message"; case Highlight::Tx: return tr ("Transmitted message");
case Highlight::DXCC: return "New DXCC"; case Highlight::DXCC: return tr ("New DXCC");
case Highlight::DXCCBand: return "New DXCC on Band"; case Highlight::DXCCBand: return tr ("New DXCC on Band");
case Highlight::Grid: return "New Grid"; case Highlight::Grid: return tr ("New Grid");
case Highlight::GridBand: return "New Grid on Band"; case Highlight::GridBand: return tr ("New Grid on Band");
case Highlight::Call: return "New Call"; case Highlight::Call: return tr ("New Call");
case Highlight::CallBand: return "New Call on Band"; case Highlight::CallBand: return tr ("New Call on Band");
case Highlight::Continent: return "New Continent"; case Highlight::Continent: return tr ("New Continent");
case Highlight::ContinentBand: return "New Continent on Band"; case Highlight::ContinentBand: return tr ("New Continent on Band");
case Highlight::CQZone: return "New CQ Zone"; case Highlight::CQZone: return tr ("New CQ Zone");
case Highlight::CQZoneBand: return "New CQ Zone on Band"; case Highlight::CQZoneBand: return tr ("New CQ Zone on Band");
case Highlight::ITUZone: return "New ITU Zone"; case Highlight::ITUZone: return tr ("New ITU Zone");
case Highlight::ITUZoneBand: return "New ITU Zone on Band"; case Highlight::ITUZoneBand: return tr ("New ITU Zone on Band");
case Highlight::LotW: return "LotW User"; case Highlight::LotW: return tr ("LoTW User");
} }
return "Unknown"; return "Unknown";
} }
@ -166,9 +166,9 @@ QVariant DecodeHighlightingModel::data (const QModelIndex& index, int role) cons
return QString {"%1%2%3%4%4%5%6"} return QString {"%1%2%3%4%4%5%6"}
.arg (highlight_name (item.type_)) .arg (highlight_name (item.type_))
.arg (fg_unset || bg_unset ? QString {" ["} : QString {}) .arg (fg_unset || bg_unset ? QString {" ["} : QString {})
.arg (fg_unset ? QString {"f/g unset"} : QString {}) .arg (fg_unset ? tr ("f/g unset") : QString {})
.arg (fg_unset && bg_unset ? QString {" "} : QString {}) .arg (fg_unset && bg_unset ? QString {" "} : QString {})
.arg (bg_unset ? QString {"b/g unset"} : QString {}) .arg (bg_unset ? tr ("b/g unset") : QString {})
.arg (fg_unset || bg_unset ? QString {"]"} : QString {}); .arg (fg_unset || bg_unset ? QString {"]"} : QString {});
break; break;
case Qt::ForegroundRole: case Qt::ForegroundRole:

View File

@ -1779,8 +1779,8 @@ void MainWindow::on_actionSettings_triggered() //Setup Dialog
m_config.transceiver_online (); m_config.transceiver_online ();
if(!m_bFastMode) setXIT (ui->TxFreqSpinBox->value ()); if(!m_bFastMode) setXIT (ui->TxFreqSpinBox->value ());
if(m_config.single_decode() or m_mode=="JT4") { if(m_config.single_decode() or m_mode=="JT4") {
ui->label_6->setText("Single-Period Decodes"); ui->label_6->setText(tr ("Single-Period Decodes"));
ui->label_7->setText("Average Decodes"); ui->label_7->setText(tr ("Average Decodes"));
} }
update_watchdog_label (); update_watchdog_label ();
@ -4215,7 +4215,7 @@ void MainWindow::stopTx2()
WSPR_scheduling (); WSPR_scheduling ();
m_ntr=0; m_ntr=0;
} }
last_tx_label.setText("Last Tx: " + m_currentMessage.trimmed()); last_tx_label.setText(tr ("Last Tx: %1").arg (m_currentMessage.trimmed()));
} }
void MainWindow::ba2msg(QByteArray ba, char message[]) //ba2msg() void MainWindow::ba2msg(QByteArray ba, char message[]) //ba2msg()
@ -5787,8 +5787,8 @@ void MainWindow::on_actionFT4_triggered()
m_wideGraph->setPeriod(m_TRperiod,m_nsps); m_wideGraph->setPeriod(m_TRperiod,m_nsps);
m_modulator->setTRPeriod(m_TRperiod); // TODO - not thread safe m_modulator->setTRPeriod(m_TRperiod); // TODO - not thread safe
m_detector->setTRPeriod(m_TRperiod); // TODO - not thread safe m_detector->setTRPeriod(m_TRperiod); // TODO - not thread safe
ui->label_7->setText("Rx Frequency"); ui->label_7->setText(tr ("Rx Frequency"));
ui->label_6->setText("Band Activity"); ui->label_6->setText(tr ("Band Activity"));
ui->decodedTextLabel->setText( " UTC dB DT Freq Message"); ui->decodedTextLabel->setText( " UTC dB DT Freq Message");
displayWidgets(nWidgets("111010000100111000010000000110001")); displayWidgets(nWidgets("111010000100111000010000000110001"));
ui->txrb2->setEnabled(true); ui->txrb2->setEnabled(true);
@ -5831,12 +5831,12 @@ void MainWindow::on_actionFT8_triggered()
m_wideGraph->setPeriod(m_TRperiod,m_nsps); m_wideGraph->setPeriod(m_TRperiod,m_nsps);
m_modulator->setTRPeriod(m_TRperiod); // TODO - not thread safe m_modulator->setTRPeriod(m_TRperiod); // TODO - not thread safe
m_detector->setTRPeriod(m_TRperiod); // TODO - not thread safe m_detector->setTRPeriod(m_TRperiod); // TODO - not thread safe
ui->label_7->setText("Rx Frequency"); ui->label_7->setText(tr ("Rx Frequency"));
if(SpecOp::FOX==m_config.special_op_id()) { if(SpecOp::FOX==m_config.special_op_id()) {
ui->label_6->setText("Stations calling DXpedition " + m_config.my_callsign()); ui->label_6->setText(tr ("Stations calling DXpedition %1").arg (m_config.my_callsign()));
ui->decodedTextLabel->setText( "Call Grid dB Freq Dist Age Continent"); ui->decodedTextLabel->setText( "Call Grid dB Freq Dist Age Continent");
} else { } else {
ui->label_6->setText("Band Activity"); ui->label_6->setText(tr ("Band Activity"));
ui->decodedTextLabel->setText( " UTC dB DT Freq Message"); ui->decodedTextLabel->setText( " UTC dB DT Freq Message");
} }
displayWidgets(nWidgets("111010000100111000010000100110001")); displayWidgets(nWidgets("111010000100111000010000100110001"));
@ -5858,7 +5858,7 @@ void MainWindow::on_actionFT8_triggered()
ui->tabWidget->setCurrentIndex(2); ui->tabWidget->setCurrentIndex(2);
ui->TxFreqSpinBox->setValue(300); ui->TxFreqSpinBox->setValue(300);
displayWidgets(nWidgets("111010000100111000010000000000100")); displayWidgets(nWidgets("111010000100111000010000000000100"));
ui->labDXped->setText("Fox"); ui->labDXped->setText(tr ("Fox"));
on_fox_log_action_triggered(); on_fox_log_action_triggered();
} }
if(SpecOp::HOUND == m_config.special_op_id()) { if(SpecOp::HOUND == m_config.special_op_id()) {
@ -5868,7 +5868,7 @@ void MainWindow::on_actionFT8_triggered()
ui->tabWidget->setCurrentIndex(0); ui->tabWidget->setCurrentIndex(0);
ui->cbHoldTxFreq->setChecked(true); ui->cbHoldTxFreq->setChecked(true);
displayWidgets(nWidgets("111010000100110000010000000000110")); displayWidgets(nWidgets("111010000100110000010000000000110"));
ui->labDXped->setText("Hound"); ui->labDXped->setText(tr ("Hound"));
ui->txrb1->setChecked(true); ui->txrb1->setChecked(true);
ui->txrb2->setEnabled(false); ui->txrb2->setEnabled(false);
ui->txrb4->setEnabled(false); ui->txrb4->setEnabled(false);
@ -5932,8 +5932,8 @@ void MainWindow::on_actionJT4_triggered()
m_bFast9=false; m_bFast9=false;
setup_status_bar (bVHF); setup_status_bar (bVHF);
ui->sbSubmode->setMaximum(6); ui->sbSubmode->setMaximum(6);
ui->label_6->setText("Single-Period Decodes"); ui->label_6->setText(tr ("Single-Period Decodes"));
ui->label_7->setText("Average Decodes"); ui->label_7->setText(tr ("Average Decodes"));
ui->decodedTextLabel->setText("UTC dB DT Freq Message"); ui->decodedTextLabel->setText("UTC dB DT Freq Message");
ui->decodedTextLabel2->setText("UTC dB DT Freq Message"); ui->decodedTextLabel2->setText("UTC dB DT Freq Message");
if(bVHF) { if(bVHF) {
@ -5994,8 +5994,8 @@ void MainWindow::on_actionJT9_triggered()
m_wideGraph->setPeriod(m_TRperiod,m_nsps); m_wideGraph->setPeriod(m_TRperiod,m_nsps);
m_modulator->setTRPeriod(m_TRperiod); // TODO - not thread safe m_modulator->setTRPeriod(m_TRperiod); // TODO - not thread safe
m_detector->setTRPeriod(m_TRperiod); // TODO - not thread safe m_detector->setTRPeriod(m_TRperiod); // TODO - not thread safe
ui->label_6->setText("Band Activity"); ui->label_6->setText(tr ("Band Activity"));
ui->label_7->setText("Rx Frequency"); ui->label_7->setText(tr ("Rx Frequency"));
if(bVHF) { if(bVHF) {
displayWidgets(nWidgets("111110101000111110010000000000000")); displayWidgets(nWidgets("111110101000111110010000000000000"));
} else { } else {
@ -6034,8 +6034,8 @@ void MainWindow::on_actionJT9_JT65_triggered()
m_bFastMode=false; m_bFastMode=false;
m_bFast9=false; m_bFast9=false;
ui->sbSubmode->setValue(0); ui->sbSubmode->setValue(0);
ui->label_6->setText("Band Activity"); ui->label_6->setText(tr ("Band Activity"));
ui->label_7->setText("Rx Frequency"); ui->label_7->setText(tr ("Rx Frequency"));
ui->decodedTextLabel->setText("UTC dB DT Freq Message"); ui->decodedTextLabel->setText("UTC dB DT Freq Message");
ui->decodedTextLabel2->setText("UTC dB DT Freq Message"); ui->decodedTextLabel2->setText("UTC dB DT Freq Message");
displayWidgets(nWidgets("111010000001111000010000000000001")); displayWidgets(nWidgets("111010000001111000010000000000001"));
@ -6078,12 +6078,12 @@ void MainWindow::on_actionJT65_triggered()
ui->sbSubmode->setMaximum(2); ui->sbSubmode->setMaximum(2);
if(bVHF) { if(bVHF) {
ui->sbSubmode->setValue(m_nSubMode); ui->sbSubmode->setValue(m_nSubMode);
ui->label_6->setText("Single-Period Decodes"); ui->label_6->setText(tr ("Single-Period Decodes"));
ui->label_7->setText("Average Decodes"); ui->label_7->setText(tr ("Average Decodes"));
} else { } else {
ui->sbSubmode->setValue(0); ui->sbSubmode->setValue(0);
ui->label_6->setText("Band Activity"); ui->label_6->setText(tr ("Band Activity"));
ui->label_7->setText("Rx Frequency"); ui->label_7->setText(tr ("Rx Frequency"));
} }
if(bVHF) { if(bVHF) {
displayWidgets(nWidgets("111110010000110110101100010000000")); displayWidgets(nWidgets("111110010000110110101100010000000"));
@ -6207,8 +6207,8 @@ void MainWindow::on_actionMSK144_triggered()
m_modulator->setTRPeriod(m_TRperiod); // TODO - not thread safe m_modulator->setTRPeriod(m_TRperiod); // TODO - not thread safe
m_detector->setTRPeriod(m_TRperiod); // TODO - not thread safe m_detector->setTRPeriod(m_TRperiod); // TODO - not thread safe
m_fastGraph->setTRPeriod(m_TRperiod); m_fastGraph->setTRPeriod(m_TRperiod);
ui->label_6->setText("Band Activity"); ui->label_6->setText(tr ("Band Activity"));
ui->label_7->setText("Tx Messages"); ui->label_7->setText(tr ("Tx Messages"));
ui->actionMSK144->setChecked(true); ui->actionMSK144->setChecked(true);
ui->rptSpinBox->setMinimum(-8); ui->rptSpinBox->setMinimum(-8);
ui->rptSpinBox->setMaximum(24); ui->rptSpinBox->setMaximum(24);
@ -8097,7 +8097,7 @@ void MainWindow::tx_watchdog (bool triggered)
if (m_tune) stop_tuning (); if (m_tune) stop_tuning ();
if (m_auto) auto_tx_mode (false); if (m_auto) auto_tx_mode (false);
tx_status_label.setStyleSheet ("QLabel{background-color: #ff0000}"); tx_status_label.setStyleSheet ("QLabel{background-color: #ff0000}");
tx_status_label.setText ("Runaway Tx watchdog"); tx_status_label.setText (tr ("Runaway Tx watchdog"));
QApplication::alert (this); QApplication::alert (this);
} }
else else
@ -8112,7 +8112,7 @@ void MainWindow::update_watchdog_label ()
{ {
if (m_config.watchdog () && !m_mode.startsWith ("WSPR")) if (m_config.watchdog () && !m_mode.startsWith ("WSPR"))
{ {
watchdog_label.setText (QString {"WD:%1m"}.arg (m_config.watchdog () - m_idleMinutes)); watchdog_label.setText (tr ("WD:%1m").arg (m_config.watchdog () - m_idleMinutes));
watchdog_label.setVisible (true); watchdog_label.setVisible (true);
} }
else else