mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-06-08 03:33:14 +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
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue