UI: minor changes to make it translation friendly (#23032)

pull/23041/head
eFini 2021-11-26 14:30:07 +08:00 committed by GitHub
parent 68c1a666a0
commit 21ff97b8c9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 4 deletions

View File

@ -178,6 +178,6 @@ void OffroadHome::refresh() {
update_notif->setVisible(updateAvailable);
alert_notif->setVisible(alerts);
if (alerts) {
alert_notif->setText(QString::number(alerts) + " ALERT" + (alerts > 1 ? "S" : ""));
alert_notif->setText(QString::number(alerts) + (alerts > 1 ? " ALERTS" : " ALERT"));
}
}

View File

@ -145,7 +145,7 @@ void DeclinePage::showEvent(QShowEvent *event) {
QObject::connect(back_btn, &QPushButton::clicked, this, &DeclinePage::getBack);
QPushButton *uninstall_btn = new QPushButton("Decline, uninstall " + getBrand());
QPushButton *uninstall_btn = new QPushButton(QString("Decline, uninstall %1").arg(getBrand()));
uninstall_btn->setStyleSheet("background-color: #B73D3D");
buttons->addWidget(uninstall_btn);
QObject::connect(uninstall_btn, &QPushButton::clicked, [=]() {

View File

@ -46,13 +46,13 @@ void SshControl::getUserKeys(const QString &username) {
params.put("GithubUsername", username.toStdString());
params.put("GithubSshKeys", resp.toStdString());
} else {
ConfirmationDialog::alert("Username '" + username + "' has no keys on GitHub", this);
ConfirmationDialog::alert(QString("Username '%1' has no keys on GitHub").arg(username), this);
}
refresh();
request->deleteLater();
});
QObject::connect(request, &HttpRequest::failedResponse, [=] {
ConfirmationDialog::alert("Username '" + username + "' doesn't exist on GitHub", this);
ConfirmationDialog::alert(QString("Username '%1' doesn't exist on GitHub").arg(username), this);
refresh();
request->deleteLater();
});