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:
rainmakerv2 2025-03-06 15:09:27 +08:00 committed by GitHub
parent f1aea5176d
commit 0efe9a4d0f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 55 additions and 54 deletions

View file

@ -235,21 +235,6 @@ SettingsDialog::SettingsDialog(std::span<const QString> physical_devices,
Common::FS::GetUserPath(Common::FS::PathType::CustomTrophy));
QDesktopServices::openUrl(QUrl::fromLocalFile(userPath));
});
connect(ui->PortableUserButton, &QPushButton::clicked, this, []() {
QString userDir;
Common::FS::PathToQString(userDir, std::filesystem::current_path() / "user");
if (std::filesystem::exists(std::filesystem::current_path() / "user")) {
QMessageBox::information(NULL, "Cannot create portable user folder",
userDir + " already exists");
} else {
std::filesystem::copy(Common::FS::GetUserPath(Common::FS::PathType::UserDir),
std::filesystem::current_path() / "user",
std::filesystem::copy_options::recursive);
QMessageBox::information(NULL, "Portable user folder created",
userDir + " successfully created");
}
});
}
// Input TAB
@ -300,6 +285,21 @@ SettingsDialog::SettingsDialog(std::span<const QString> physical_devices,
ui->currentSaveDataPath->setText(save_data_path_string);
}
});
connect(ui->PortableUserButton, &QPushButton::clicked, this, []() {
QString userDir;
Common::FS::PathToQString(userDir, std::filesystem::current_path() / "user");
if (std::filesystem::exists(std::filesystem::current_path() / "user")) {
QMessageBox::information(NULL, tr("Cannot create portable user folder"),
tr("%1 already exists").arg(userDir));
} else {
std::filesystem::copy(Common::FS::GetUserPath(Common::FS::PathType::UserDir),
std::filesystem::current_path() / "user",
std::filesystem::copy_options::recursive);
QMessageBox::information(NULL, tr("Portable user folder created"),
tr("%1 successfully created.").arg(userDir));
}
});
}
// DEBUG TAB