2
1
Fork 0
mirror of https://github.com/yuzu-emu/yuzu.git synced 2024-07-04 23:31:19 +01:00

qt/main: Make installation dialog text within OnMenuInstallToNAND() translatable

This is user-facing text, so it should be marked as translatable by Qt.
This commit is contained in:
Lioncash 2018-08-16 10:30:41 -04:00
parent aac807fd3a
commit 2a3d7128d1

View file

@ -637,8 +637,9 @@ void GMainWindow::OnMenuInstallToNAND() {
std::array<u8, 0x1000> buffer{}; std::array<u8, 0x1000> buffer{};
const int progress_maximum = static_cast<int>(src->GetSize() / buffer.size()); const int progress_maximum = static_cast<int>(src->GetSize() / buffer.size());
QProgressDialog progress(fmt::format("Installing file \"{}\"...", src->GetName()).c_str(), QProgressDialog progress(
"Cancel", 0, progress_maximum, this); tr("Installing file \"%1\"...").arg(QString::fromStdString(src->GetName())),
tr("Cancel"), 0, progress_maximum, this);
progress.setWindowModality(Qt::WindowModal); progress.setWindowModality(Qt::WindowModal);
for (size_t i = 0; i < src->GetSize(); i += buffer.size()) { for (size_t i = 0; i < src->GetSize(); i += buffer.size()) {
@ -672,9 +673,9 @@ void GMainWindow::OnMenuInstallToNAND() {
}; };
const auto overwrite = [this]() { const auto overwrite = [this]() {
return QMessageBox::question(this, "Failed to Install", return QMessageBox::question(this, tr("Failed to Install"),
"The file you are attempting to install already exists " tr("The file you are attempting to install already exists "
"in the cache. Would you like to overwrite it?") == "in the cache. Would you like to overwrite it?")) ==
QMessageBox::Yes; QMessageBox::Yes;
}; };
@ -713,15 +714,15 @@ void GMainWindow::OnMenuInstallToNAND() {
return; return;
} }
static const QStringList tt_options{"System Application", const QStringList tt_options{tr("System Application"),
"System Archive", tr("System Archive"),
"System Application Update", tr("System Application Update"),
"Firmware Package (Type A)", tr("Firmware Package (Type A)"),
"Firmware Package (Type B)", tr("Firmware Package (Type B)"),
"Game", tr("Game"),
"Game Update", tr("Game Update"),
"Game DLC", tr("Game DLC"),
"Delta Title"}; tr("Delta Title")};
bool ok; bool ok;
const auto item = QInputDialog::getItem( const auto item = QInputDialog::getItem(
this, tr("Select NCA Install Type..."), this, tr("Select NCA Install Type..."),