1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-01-18 03:52:11 +01:00

OP-1174 wizard upgrade page - made all strings translatable

This commit is contained in:
Philippe Renon 2014-05-01 23:19:50 +02:00
parent 7fef044325
commit fababeeeee

View File

@ -41,7 +41,7 @@ void AutoUpdatePage::updateStatus(uploader::AutoUpdateStep status, QVariant valu
case uploader::WAITING_DISCONNECT: case uploader::WAITING_DISCONNECT:
disableButtons(); disableButtons();
getWizard()->show(); getWizard()->show();
ui->statusLabel->setText("Waiting for all OP boards to be disconnected"); ui->statusLabel->setText(tr("Waiting for all OP boards to be disconnected."));
// TODO get rid of magic number 20s // TODO get rid of magic number 20s
ui->levellinProgressBar->setMaximum(20); ui->levellinProgressBar->setMaximum(20);
ui->levellinProgressBar->setValue(value.toInt()); ui->levellinProgressBar->setValue(value.toInt());
@ -58,32 +58,32 @@ void AutoUpdatePage::updateStatus(uploader::AutoUpdateStep status, QVariant valu
// End of Note // End of Note
disableButtons(); disableButtons();
getWizard()->show(); getWizard()->show();
ui->statusLabel->setText("Please connect the board to the USB port (don't use external supply)"); ui->statusLabel->setText(tr("Please connect the board to the USB port (don't use external supply)."));
// TODO get rid of magic number 20s // TODO get rid of magic number 20s
ui->levellinProgressBar->setMaximum(20); ui->levellinProgressBar->setMaximum(20);
ui->levellinProgressBar->setValue(value.toInt()); ui->levellinProgressBar->setValue(value.toInt());
break; break;
case uploader::JUMP_TO_BL: case uploader::JUMP_TO_BL:
ui->levellinProgressBar->setValue(0); ui->levellinProgressBar->setValue(0);
ui->statusLabel->setText("Board going into bootloader mode"); ui->statusLabel->setText(tr("Board going into bootloader mode."));
break; break;
case uploader::LOADING_FW: case uploader::LOADING_FW:
ui->statusLabel->setText("Loading firmware"); ui->statusLabel->setText(tr("Loading firmware."));
break; break;
case uploader::UPLOADING_FW: case uploader::UPLOADING_FW:
ui->statusLabel->setText("Uploading firmware"); ui->statusLabel->setText(tr("Uploading firmware."));
ui->levellinProgressBar->setMaximum(100); ui->levellinProgressBar->setMaximum(100);
ui->levellinProgressBar->setValue(value.toInt()); ui->levellinProgressBar->setValue(value.toInt());
break; break;
case uploader::UPLOADING_DESC: case uploader::UPLOADING_DESC:
ui->statusLabel->setText("Uploading description"); ui->statusLabel->setText(tr("Uploading description."));
break; break;
case uploader::BOOTING: case uploader::BOOTING:
ui->statusLabel->setText("Booting the board"); ui->statusLabel->setText(tr("Booting the board."));
break; break;
case uploader::SUCCESS: case uploader::SUCCESS:
enableButtons(true); enableButtons(true);
ui->statusLabel->setText("Board updated, please press 'Next' to continue"); ui->statusLabel->setText(tr("Board updated, please press 'Next' to continue."));
break; break;
case uploader::FAILURE: case uploader::FAILURE:
//getWizard()->setWindowFlags(getWizard()->windowFlags() | Qt::WindowStaysOnTopHint); //getWizard()->setWindowFlags(getWizard()->windowFlags() | Qt::WindowStaysOnTopHint);
@ -92,7 +92,7 @@ void AutoUpdatePage::updateStatus(uploader::AutoUpdateStep status, QVariant valu
getWizard()->show(); getWizard()->show();
QString msg = value.toString(); QString msg = value.toString();
if (msg.isEmpty()) { if (msg.isEmpty()) {
msg = "Something went wrong, you will have to manually upgrade the board using the uploader plugin"; msg = tr("Something went wrong, you will have to manually upgrade the board using the uploader plugin.");
} }
ui->statusLabel->setText(msg); ui->statusLabel->setText(msg);
break; break;