diff --git a/src/lib/gui/Messages.cpp b/src/lib/gui/Messages.cpp index 8dc417ea5..0e0cebedb 100644 --- a/src/lib/gui/Messages.cpp +++ b/src/lib/gui/Messages.cpp @@ -144,32 +144,41 @@ void showFirstServerStartMessage(QWidget *parent) void showFirstConnectedMessage(QWidget *parent, bool closeToTray, bool enableService, bool isServer) { - auto message = QString("

%1 is now connected!

").arg(kAppName); + auto message = QObject::tr("

%1 is now connected!

").arg(kAppName); if (isServer) { - message += "

Try moving your mouse to your other computer. Once there, go ahead " - "and type something.

" - "

Don't forget, you can copy and paste between computers too.

"; + message.append( + QObject::tr( + "

Try moving your mouse to your other computer. Once there, go ahead " + "and type something.

" + "

Don't forget, you can copy and paste between computers too.

" + ) + ); } else { - message += "

Try controlling this computer remotely.

"; + message.append(QObject::tr("

Try controlling this computer remotely.

")); } if (!closeToTray && !enableService) { - message += QString( - "

As you do not have the setting enabled to keep %1 running in " - "the background, you'll need to keep this window open or minimized " - "to keep %1 running.

" - ) - .arg(kAppName); + message.append( + QObject::tr( + "

As you do not have the setting enabled to keep %1 running in " + "the background, you'll need to keep this window open or minimized " + "to keep %1 running.

" + ) + .arg(kAppName) + ); } else { - message += QString( - "

You can now close this window and %1 will continue to run in " - "the background. This setting can be disabled.

" - ) - .arg(kAppName); + message.append( + QObject::tr( + "

You can now close this window and %1 will continue to run in " + "the background. This setting can be disabled.

" + ) + .arg(kAppName) + ); } - QMessageBox::information(parent, "Connected", message); + const auto title = QObject::tr("%1 Connected").arg(kAppName); + QMessageBox::information(parent, title, message); } void showClientConnectError(QWidget *parent, ClientError error, const QString &address)