mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-06-26 12:26:18 +00:00
Adds missing tr functions for certain GUI strings that should be translatable (#2598)
* Adds missing tr functions for certain GUI strings that should be translatable * set clang format off for multi-line strings, set userDir as arg --------- Co-authored-by: rainmakerv2 <30595646+jpau02@users.noreply.github.com>
This commit is contained in:
parent
f1aea5176d
commit
0efe9a4d0f
5 changed files with 55 additions and 54 deletions
|
@ -87,15 +87,16 @@ KBMSettings::KBMSettings(std::shared_ptr<GameInfoClass> game_info_get, QWidget*
|
|||
|
||||
connect(ui->CopyCommonButton, &QPushButton::clicked, this, [this] {
|
||||
if (ui->ProfileComboBox->currentText() == "Common Config") {
|
||||
QMessageBox::information(this, "Common Config Selected",
|
||||
"This button copies mappings from the Common Config to the "
|
||||
"currently selected profile, and cannot be used when the "
|
||||
"currently selected profile is the Common Config.");
|
||||
QMessageBox::information(this, tr("Common Config Selected"),
|
||||
// clang-format off
|
||||
tr("This button copies mappings from the Common Config to the currently selected profile, and cannot be used when the currently selected profile is the Common Config."));
|
||||
// clang-format on
|
||||
} else {
|
||||
QMessageBox::StandardButton reply =
|
||||
QMessageBox::question(this, "Copy values from Common Config",
|
||||
"Do you want to overwrite existing mappings with the "
|
||||
"mappings from the Common Config?",
|
||||
QMessageBox::question(this, tr("Copy values from Common Config"),
|
||||
// clang-format off
|
||||
tr("Do you want to overwrite existing mappings with the mappings from the Common Config?"),
|
||||
// clang-format on
|
||||
QMessageBox::Yes | QMessageBox::No);
|
||||
if (reply == QMessageBox::Yes) {
|
||||
SetUIValuestoMappings("default");
|
||||
|
@ -423,8 +424,8 @@ void KBMSettings::SaveKBMConfig(bool CloseOnSave) {
|
|||
// Prevent duplicate inputs for KBM as this breaks the engine
|
||||
for (auto it = inputs.begin(); it != inputs.end(); ++it) {
|
||||
if (std::find(it + 1, inputs.end(), *it) != inputs.end()) {
|
||||
QMessageBox::information(this, "Unable to Save",
|
||||
"Cannot bind any unique input more than once");
|
||||
QMessageBox::information(this, tr("Unable to Save"),
|
||||
tr("Cannot bind any unique input more than once"));
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -625,7 +626,7 @@ void KBMSettings::GetGameTitle() {
|
|||
void KBMSettings::onHelpClicked() {
|
||||
if (!HelpWindowOpen) {
|
||||
HelpWindow = new HelpDialog(&HelpWindowOpen, this);
|
||||
HelpWindow->setWindowTitle("Help");
|
||||
HelpWindow->setWindowTitle(tr("Help"));
|
||||
HelpWindow->setAttribute(Qt::WA_DeleteOnClose); // Clean up on close
|
||||
HelpWindow->show();
|
||||
HelpWindowOpen = true;
|
||||
|
@ -643,7 +644,7 @@ void KBMSettings::StartTimer(QPushButton*& button) {
|
|||
mapping = button->text();
|
||||
|
||||
DisableMappingButtons();
|
||||
button->setText("Press a key [" + QString::number(MappingTimer) + "]");
|
||||
button->setText(tr("Press a key") + " [" + QString::number(MappingTimer) + "]");
|
||||
timer = new QTimer(this);
|
||||
MappingButton = button;
|
||||
connect(timer, &QTimer::timeout, this, [this]() { CheckMapping(MappingButton); });
|
||||
|
@ -652,7 +653,7 @@ void KBMSettings::StartTimer(QPushButton*& button) {
|
|||
|
||||
void KBMSettings::CheckMapping(QPushButton*& button) {
|
||||
MappingTimer -= 1;
|
||||
button->setText("Press a key [" + QString::number(MappingTimer) + "]");
|
||||
button->setText(tr("Press a key") + " [" + QString::number(MappingTimer) + "]");
|
||||
|
||||
if (MappingCompleted) {
|
||||
EnableMapping = false;
|
||||
|
@ -1003,15 +1004,15 @@ bool KBMSettings::eventFilter(QObject* obj, QEvent* event) {
|
|||
if (std::find(AxisList.begin(), AxisList.end(), MappingButton) == AxisList.end()) {
|
||||
SetMapping("mousewheelup");
|
||||
} else {
|
||||
QMessageBox::information(this, "Cannot set mapping",
|
||||
"Mousewheel cannot be mapped to stick outputs");
|
||||
QMessageBox::information(this, tr("Cannot set mapping"),
|
||||
tr("Mousewheel cannot be mapped to stick outputs"));
|
||||
}
|
||||
} else if (wheelEvent->angleDelta().y() < -5) {
|
||||
if (std::find(AxisList.begin(), AxisList.end(), MappingButton) == AxisList.end()) {
|
||||
SetMapping("mousewheeldown");
|
||||
} else {
|
||||
QMessageBox::information(this, "Cannot set mapping",
|
||||
"Mousewheel cannot be mapped to stick outputs");
|
||||
QMessageBox::information(this, tr("Cannot set mapping"),
|
||||
tr("Mousewheel cannot be mapped to stick outputs"));
|
||||
}
|
||||
}
|
||||
if (wheelEvent->angleDelta().x() > 5) {
|
||||
|
@ -1023,8 +1024,8 @@ bool KBMSettings::eventFilter(QObject* obj, QEvent* event) {
|
|||
SetMapping("mousewheelright");
|
||||
}
|
||||
} else {
|
||||
QMessageBox::information(this, "Cannot set mapping",
|
||||
"Mousewheel cannot be mapped to stick outputs");
|
||||
QMessageBox::information(this, tr("Cannot set mapping"),
|
||||
tr("Mousewheel cannot be mapped to stick outputs"));
|
||||
}
|
||||
} else if (wheelEvent->angleDelta().x() < -5) {
|
||||
if (std::find(AxisList.begin(), AxisList.end(), MappingButton) == AxisList.end()) {
|
||||
|
@ -1034,8 +1035,8 @@ bool KBMSettings::eventFilter(QObject* obj, QEvent* event) {
|
|||
SetMapping("mousewheelleft");
|
||||
}
|
||||
} else {
|
||||
QMessageBox::information(this, "Cannot set mapping",
|
||||
"Mousewheel cannot be mapped to stick outputs");
|
||||
QMessageBox::information(this, tr("Cannot set mapping"),
|
||||
tr("Mousewheel cannot be mapped to stick outputs"));
|
||||
}
|
||||
}
|
||||
return true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue