refactor: Messages::showNewClientPrompt enable translations

This commit is contained in:
sithlord48 2025-06-06 22:16:28 -04:00 committed by Nick Bolton
parent 3adcb64f57
commit 8bb6056469

View file

@ -220,16 +220,16 @@ NewClientPromptResult showNewClientPrompt(QWidget *parent, const QString &client
// When peer auth is enabled you will be prompted to allow the connection before seeing this dialog. // When peer auth is enabled you will be prompted to allow the connection before seeing this dialog.
// This is why we do not show a dialog with an option to ignore the new client // This is why we do not show a dialog with an option to ignore the new client
QMessageBox::information( QMessageBox::information(
parent, QString("New Client"), parent, QObject::tr("%1 - New Client").arg(kAppName),
QString("A new client called '%1' has been accepted. You'll need to add it to your server's screen layout.") QObject::tr("A new client called '%1' has been accepted. You'll need to add it to your server's screen layout.")
.arg(clientName) .arg(clientName)
); );
return Add; return Add;
} else { } else {
QMessageBox message(parent); QMessageBox message(parent);
const QPushButton *ignore = message.addButton("Ignore", QMessageBox::RejectRole); const QPushButton *ignore = message.addButton(QObject::tr("Ignore"), QMessageBox::RejectRole);
const QPushButton *add = message.addButton("Add client", QMessageBox::AcceptRole); const QPushButton *add = message.addButton(QObject::tr("Add client"), QMessageBox::AcceptRole);
message.setText(QString("A new client called '%1' wants to connect").arg(clientName)); message.setText(QObject::tr("A new client called '%1' wants to connect").arg(clientName));
message.exec(); message.exec();
if (message.clickedButton() == add) { if (message.clickedButton() == add) {
return Add; return Add;