mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-12-10 05:38:49 +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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user