mirror of
https://github.com/obsproject/obs-studio.git
synced 2026-09-19 09:41:32 +08:00
UI: Make sure all message box buttons are translated
Instead of QMessageBox::question and QMessageBox::information, use the OBSMessageBox class, which translates all buttons.
This commit is contained in:
@@ -102,13 +102,13 @@ static bool GetProfileName(QWidget *parent, std::string &name,
|
||||
return false;
|
||||
}
|
||||
if (name.empty()) {
|
||||
QMessageBox::information(parent,
|
||||
OBSMessageBox::information(parent,
|
||||
QTStr("NoNameEntered.Title"),
|
||||
QTStr("NoNameEntered.Text"));
|
||||
continue;
|
||||
}
|
||||
if (ProfileExists(name.c_str())) {
|
||||
QMessageBox::information(parent,
|
||||
OBSMessageBox::information(parent,
|
||||
QTStr("NameExists.Title"),
|
||||
QTStr("NameExists.Text"));
|
||||
continue;
|
||||
@@ -407,7 +407,7 @@ void OBSBasic::on_actionRemoveProfile_triggered()
|
||||
QString text = QTStr("ConfirmRemove.Text");
|
||||
text.replace("$1", QT_UTF8(oldName.c_str()));
|
||||
|
||||
QMessageBox::StandardButton button = QMessageBox::question(this,
|
||||
QMessageBox::StandardButton button = OBSMessageBox::question(this,
|
||||
QTStr("ConfirmRemove.Title"), text);
|
||||
if (button == QMessageBox::No)
|
||||
return;
|
||||
@@ -487,7 +487,7 @@ void OBSBasic::on_actionImportProfile_triggered()
|
||||
profileDir + "/recordEncoder.json");
|
||||
RefreshProfiles();
|
||||
} else {
|
||||
QMessageBox::information(this,
|
||||
OBSMessageBox::information(this,
|
||||
QTStr("Basic.MainMenu.Profile.Import"),
|
||||
QTStr("Basic.MainMenu.Profile.Exists"));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user