From 0c8611bd497fd9333a78d5417b402b3059271c53 Mon Sep 17 00:00:00 2001 From: Megamouse Date: Sat, 8 Feb 2020 10:10:11 +0100 Subject: [PATCH] Qt: fix game category localization --- rpcs3/rpcs3qt/game_list_frame.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/rpcs3/rpcs3qt/game_list_frame.cpp b/rpcs3/rpcs3qt/game_list_frame.cpp index 06b3e9e28e..66e9abcabd 100644 --- a/rpcs3/rpcs3qt/game_list_frame.cpp +++ b/rpcs3/rpcs3qt/game_list_frame.cpp @@ -923,7 +923,7 @@ void game_list_frame::ShowContextMenu(const QPoint &pos) hide_serial->setChecked(m_hidden_list.contains(serial)); myMenu.addSeparator(); QMenu* remove_menu = myMenu.addMenu(tr("&Remove")); - QAction* removeGame = remove_menu->addAction(tr("&Remove %1").arg(qstr(currGame.category))); + QAction* removeGame = remove_menu->addAction(tr("&Remove %1").arg(gameinfo->localized_category)); if (gameinfo->hasCustomConfig) { QAction* remove_custom_config = remove_menu->addAction(tr("&Remove Custom Configuration")); @@ -1076,7 +1076,7 @@ void game_list_frame::ShowContextMenu(const QPoint &pos) return; } - QMessageBox* mb = new QMessageBox(QMessageBox::Question, tr("Confirm %1 Removal").arg(qstr(currGame.category)), tr("Permanently remove %0 from drive?\nPath: %1").arg(name).arg(qstr(currGame.path)), QMessageBox::Yes | QMessageBox::No, this); + QMessageBox* mb = new QMessageBox(QMessageBox::Question, tr("Confirm %1 Removal").arg(gameinfo->localized_category), tr("Permanently remove %0 from drive?\nPath: %1").arg(name).arg(qstr(currGame.path)), QMessageBox::Yes | QMessageBox::No, this); mb->setCheckBox(new QCheckBox(tr("Remove caches and custom configs"))); mb->deleteLater(); if (mb->exec() == QMessageBox::Yes) @@ -1093,12 +1093,12 @@ void game_list_frame::ShowContextMenu(const QPoint &pos) RemoveCustomPadConfiguration(currGame.serial); } m_game_data.erase(std::remove(m_game_data.begin(), m_game_data.end(), gameinfo), m_game_data.end()); - game_list_log.success("Removed %s %s in %s", currGame.category, currGame.name, currGame.path); + game_list_log.success("Removed %s %s in %s", sstr(gameinfo->localized_category), currGame.name, currGame.path); Refresh(true); } else { - game_list_log.error("Failed to remove %s %s in %s (%s)", currGame.category, currGame.name, currGame.path, fs::g_tls_error); + game_list_log.error("Failed to remove %s %s in %s (%s)", sstr(gameinfo->localized_category), currGame.name, currGame.path, fs::g_tls_error); QMessageBox::critical(this, tr("Failure!"), tr(remove_caches ? "Failed to remove %0 from drive!\nPath: %1\nCaches and custom configs have been left intact." : "Failed to remove %0 from drive!\nPath: %1").arg(name).arg(qstr(currGame.path))); } }