[Companion] Qualify all translation strings (#5557)

* [Companion] Qualify all remaining QObject translations with proper class/object names; Centralize some common strings into constants.h.

* [Companion] Replace all instances of some common strings with macros from constants.h.

* [Companion] Fix translation warnings from lupdate.
This commit is contained in:
Max Paperno
2017-12-25 13:36:34 +01:00
committed by Bertrand Songis
parent ad0f727880
commit f018425e12
50 changed files with 331 additions and 303 deletions
+2 -2
View File
@@ -147,7 +147,7 @@ void joystickDialog::joystickOpen(int stick)
}
}
else {
QMessageBox::critical(this, tr("Error"), tr("Cannot open joystick."));
QMessageBox::critical(this, CPN_STR_TTL_ERROR, tr("Cannot open joystick."));
}
}
@@ -255,7 +255,7 @@ void joystickDialog::on_okButton_clicked()
}
if (started && step < 4) {
int resp = QMessageBox::warning(this, tr("Warning"), tr("Calibration not complete, save anyway?"),
int resp = QMessageBox::warning(this, CPN_STR_TTL_WARNING, tr("Calibration not complete, save anyway?"),
QDialogButtonBox::Ok | QMessageBox::Default, QDialogButtonBox::Cancel | QMessageBox::Escape, QMessageBox::NoButton);
if (resp == QDialogButtonBox::Cancel)
return;
@@ -228,7 +228,7 @@ void SimulatorStartupDialog::onRadioTypeChanged(int index)
void SimulatorStartupDialog::onDataFileSelect(bool)
{
QString filter = EEPROM_FILES_FILTER % tr("All files (*.*)");
QString file = QFileDialog::getSaveFileName(this, QObject::tr("Select a data file"), ui->dataFile->text(),
QString file = QFileDialog::getSaveFileName(this, tr("Select a data file"), ui->dataFile->text(),
filter, NULL, QFileDialog::DontConfirmOverwrite);
if (!file.isEmpty()) {
ui->dataFile->setText(file);
@@ -238,7 +238,7 @@ void SimulatorStartupDialog::onDataFileSelect(bool)
void SimulatorStartupDialog::onDataFolderSelect(bool)
{
QString folder = QFileDialog::getExistingDirectory(this, QObject::tr("Select Data Directory"),
QString folder = QFileDialog::getExistingDirectory(this, tr("Select Data Directory"),
ui->dataFolder->text(), QFileDialog::DontUseNativeDialog);
if (!folder.isEmpty()) {
ui->dataFolder->setText(folder);
@@ -249,7 +249,7 @@ void SimulatorStartupDialog::onDataFolderSelect(bool)
void SimulatorStartupDialog::onSdPathSelect(bool)
{
QString folder = QFileDialog::getExistingDirectory(this, QObject::tr("Select SD Card Image Folder"),
QString folder = QFileDialog::getExistingDirectory(this, tr("Select SD Card Image Folder"),
ui->sdPath->text(), QFileDialog::DontUseNativeDialog);
if (!folder.isEmpty()) {
ui->sdPath->setText(folder);
+1 -1
View File
@@ -649,7 +649,7 @@ void SimulatorWidget::setupJoysticks()
joysticksEnabled = true;
}
else {
QMessageBox::critical(this, tr("Warning"), tr("Cannot open joystick, joystick disabled"));
QMessageBox::critical(this, CPN_STR_TTL_WARNING, tr("Cannot open joystick, joystick disabled"));
}
}
else if (joystick) {