diff --git a/src/lib/gui/Messages.cpp b/src/lib/gui/Messages.cpp index ab4cc380e..c9dfb4912 100644 --- a/src/lib/gui/Messages.cpp +++ b/src/lib/gui/Messages.cpp @@ -185,31 +185,34 @@ void showClientConnectError(QWidget *parent, ClientError error, const QString &a { using enum ClientError; - auto message = QString("
The connection to server '%1' didn't work.
").arg(address); + auto message = QObject::tr("Failed to connect to the server '%1'.
").arg(address); if (error == AlreadyConnected) { - message += // - "Two of your client computers have the same name or there are " - "two instances of the client process running.
" - "Please ensure that you're using a unique name and that only a " - "single client process is running.
"; + message.append( + QObject::tr( // + "A Client with your name is already connected to the server.
" + "Please ensure that you're using a unique name and that only a " + "single instance of the client process is running." + ) + ); } else if (error == HostnameError) { - message += // - "Please try to connect to the server using the server IP address " - "instead of the hostname.
" - "If that doesn't work, please check your TLS and " - "firewall settings.
"; + message.append( + QObject::tr( // + "Please try to connect to the server using the server IP address " + "instead of the hostname.
" + "If that doesn't work, please check your TLS and " + "firewall settings.
" + ) + ); } else if (error == GenericError) { - message += // - "Please check your TLS and firewall settings.
"; + message.append(QObject::tr("Please check your TLS and firewall settings.
")); } else { qFatal("unknown client error"); } - QMessageBox dialog(parent); - dialog.addButton(QObject::tr("Close"), QMessageBox::RejectRole); - dialog.setText(message); - dialog.exec(); + auto title = QObject::tr("%1 Connection Error").arg(kAppName); + + QMessageBox::warning(parent, title, message); } NewClientPromptResult showNewClientPrompt(QWidget *parent, const QString &clientName, bool serverRequiresPeerAuth)