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

old-commit-hash: 21ff97b8c93f63644345c77914ad12c8b178e8b8
This commit is contained in:
eFini
2021-11-26 14:30:07 +08:00
committed by GitHub
parent 5b2511162a
commit 6558e04dcb
3 changed files with 4 additions and 4 deletions
+1 -1
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"));
}
}
+1 -1
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, [=]() {
+2 -2
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();
});