[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
+4 -4
View File
@@ -25,7 +25,7 @@ bool CategorizedStorageFormat::load(RadioData & radioData)
{
QByteArray radioSettingsBuffer;
if (!loadFile(radioSettingsBuffer, "RADIO/radio.bin")) {
setError(QObject::tr("Can't extract RADIO/radio.bin"));
setError(tr("Can't extract RADIO/radio.bin"));
return false;
}
@@ -38,7 +38,7 @@ bool CategorizedStorageFormat::load(RadioData & radioData)
QByteArray modelsListBuffer;
if (!loadFile(modelsListBuffer, "RADIO/models.txt")) {
setError(QObject::tr("Can't extract RADIO/models.txt"));
setError(tr("Can't extract RADIO/models.txt"));
return false;
}
@@ -82,14 +82,14 @@ bool CategorizedStorageFormat::load(RadioData & radioData)
qDebug() << "Loading model from file" << fileName << "into slot" << modelIndex;
QByteArray modelBuffer;
if (!loadFile(modelBuffer, QString("MODELS/%1").arg(fileName))) {
setError(QObject::tr("Can't extract %1").arg(fileName));
setError(tr("Can't extract %1").arg(fileName));
return false;
}
if ((int)radioData.models.size() <= modelIndex) {
radioData.models.resize(modelIndex + 1);
}
if (!loadModelFromByteArray(radioData.models[modelIndex], modelBuffer)) {
setError(QObject::tr("Error loading models"));
setError(tr("Error loading models"));
return false;
}
strncpy(radioData.models[modelIndex].filename, qPrintable(fileName), sizeof(radioData.models[modelIndex].filename));