diff --git a/logbook/WorkedBefore.cpp b/logbook/WorkedBefore.cpp index d6a794108..e7214d41b 100644 --- a/logbook/WorkedBefore.cpp +++ b/logbook/WorkedBefore.cpp @@ -8,6 +8,7 @@ #include #include #include +#include #include #include #include @@ -254,7 +255,7 @@ namespace } else { - throw LoaderException (std::runtime_error {"Invalid ADIF field " + fieldName.toStdString () + ": " + record.toStdString ()}); + throw LoaderException (std::runtime_error {QCoreApplication::translate ("WorkedBefore", "Invalid ADIF field %0: %1").arg (fieldName).arg (record).toLocal8Bit ()}); } if (closingBracketIndex > fieldNameIndex && fieldLengthIndex > fieldNameIndex && fieldLengthIndex < closingBracketIndex) @@ -271,7 +272,7 @@ namespace } else { - throw LoaderException (std::runtime_error {"Malformed ADIF field " + fieldName.toStdString () + ": " + record.toStdString ()}); + throw LoaderException (std::runtime_error {QCoreApplication::translate ("WorkedBefore", "Malformed ADIF field %0: %1").arg (fieldName).arg (record).toLocal8Bit ()}); } } return QString {}; @@ -308,7 +309,7 @@ namespace { if (end_position < 0) { - throw LoaderException (std::runtime_error {"Invalid ADIF header"}); + throw LoaderException (std::runtime_error {QCoreApplication::translate ("WorkedBefore", "Invalid ADIF header").toLocal8Bit ()}); } buffer.remove (0, end_position + 5); } @@ -354,7 +355,7 @@ namespace } else { - throw LoaderException (std::runtime_error {"Error opening ADIF log file for read: " + inputFile.errorString ().toStdString ()}); + throw LoaderException (std::runtime_error {QCoreApplication::translate ("WorkedBefore", "Error opening ADIF log file for read: %0").arg (inputFile.errorString ()).toLocal8Bit ()}); } } return worked;