[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 -3
View File
@@ -19,6 +19,7 @@
*/
#include "process_copy.h"
#include "constants.h"
#include "progresswidget.h"
#include <QEventLoop>
#include <QFile>
@@ -67,7 +68,7 @@ void CopyProcess::onTimer()
progress->setValue(i);
}
else {
QMessageBox::warning(NULL, tr("Error"), tr("Write error"));
QMessageBox::warning(NULL, CPN_STR_TTL_ERROR, tr("Write error"));
result = false;
break;
}
@@ -75,12 +76,12 @@ void CopyProcess::onTimer()
destinationFile.close();
}
else {
QMessageBox::warning(NULL, tr("Error"),tr("Cannot write %1 (reason: %2)").arg(destinationFile.fileName()).arg(sourceFile.errorString()));
QMessageBox::warning(NULL, CPN_STR_TTL_ERROR,tr("Cannot write %1 (reason: %2)").arg(destinationFile.fileName()).arg(sourceFile.errorString()));
result = false;
}
}
else {
QMessageBox::warning(NULL, tr("Error"),tr("Cannot open %1 (reason: %2)").arg(sourceFile.fileName()).arg(sourceFile.errorString()));
QMessageBox::warning(NULL, CPN_STR_TTL_ERROR,tr("Cannot open %1 (reason: %2)").arg(sourceFile.fileName()).arg(sourceFile.errorString()));
result = false;
}