From f498e53cd2ee615bdb251096a77fca3f1f3830a8 Mon Sep 17 00:00:00 2001 From: Kimmo Varis Date: Mon, 4 Apr 2011 23:09:01 +0300 Subject: [PATCH] GUI: Improve the error message for language loading error. --- gui/mainwindow.cpp | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/gui/mainwindow.cpp b/gui/mainwindow.cpp index 168dbb71c..4281166c7 100644 --- a/gui/mainwindow.cpp +++ b/gui/mainwindow.cpp @@ -678,13 +678,17 @@ void MainWindow::SetLanguage(const QString &code) QString error; if (!mTranslation->SetLanguage(code, error)) { - QMessageBox msg(QMessageBox::Critical, - tr("Cppcheck"), - QString(tr("Failed to change the language:\n\n%1")).arg(error), - QMessageBox::Ok, - this); - - msg.exec(); + const QString msg(tr("Failed to change the user interface language:" + "\n\n%1\n\n" + "The user interface language has been reset to English. Open " + "the Preferences-dialog to select any of the available " + "languages.").arg(error)); + QMessageBox msgBox(QMessageBox::Warning, + tr("Cppcheck"), + msg, + QMessageBox::Ok, + this); + msgBox.exec(); } else {