Used tr() for some more GUI strings (there are plenty more that should be treated...
authorPhilipp Spitzer <philipp@spitzer.priv.at>
Mon, 23 Jan 2017 20:47:40 +0000 (21:47 +0100)
committerPhilipp Spitzer <philipp@spitzer.priv.at>
Mon, 23 Jan 2017 20:48:23 +0000 (21:48 +0100)
src/gui/mainwindow.cpp

index 556f6c7..98a45c8 100644 (file)
@@ -271,7 +271,7 @@ void MainWindow::onAlarmTimerTimeout() {
     // show message
     systemTrayIcon->show();
     // The next two lines are to prevent a very strange position of the message box the first time at X11/aweseome (not Win32/XP)
-    systemTrayIcon->showMessage("ConfClerk", "Your upcoming events", QSystemTrayIcon::Information);
+    systemTrayIcon->showMessage("ConfClerk", tr("Your upcoming events"), QSystemTrayIcon::Information);
     qApp->processEvents();
     systemTrayIcon->showMessage(title, message, QSystemTrayIcon::Information, 60*60*24*1000);
     QApplication::alert(this);
@@ -432,7 +432,7 @@ void MainWindow::sslErrors(QNetworkReply *aReply, const QList<QSslError> &errors
 
 void MainWindow::networkQueryFinished(QNetworkReply *aReply) {
     if (aReply->error() != QNetworkReply::NoError) {
-        error_message(QString("Error occurred during download: ") + aReply->errorString());
+        error_message(tr("Error occurred during download: %1").arg(aReply->errorString()));
     } else {
         QUrl redirectUrl = aReply->attribute(QNetworkRequest::RedirectionTargetAttribute).toUrl();
         if (!redirectUrl.isEmpty()) {
@@ -440,7 +440,7 @@ void MainWindow::networkQueryFinished(QNetworkReply *aReply) {
                 importFromNetwork(redirectUrl.toString(), aReply->request().attribute(QNetworkRequest::User).toInt());
                 return; // don't enable controls
             } else {
-                error_message(QString("Error: Cyclic redirection from %1 to itself.").arg(redirectUrl.toString()));
+                error_message(tr("Error: Cyclic redirection from %1 to itself.").arg(redirectUrl.toString()));
             }
         } else {
             importData(aReply->readAll(), aReply->url().toEncoded(), aReply->request().attribute(QNetworkRequest::User).toInt());