summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2021-01-03 00:44:32 +0100
committerGitHub <noreply@github.com>2021-01-03 00:44:32 +0100
commit235b5d27ae2c6405583e06cafca0c1b542b25d0d (patch)
tree984eb4b1f32a6698dbc2ac8843cbe85e8bddfe44
parentMerge pull request #5277 from Morph1984/fix-comments (diff)
parentmain: Make the loader error dialog fully translatable (diff)
downloadyuzu-235b5d27ae2c6405583e06cafca0c1b542b25d0d.tar
yuzu-235b5d27ae2c6405583e06cafca0c1b542b25d0d.tar.gz
yuzu-235b5d27ae2c6405583e06cafca0c1b542b25d0d.tar.bz2
yuzu-235b5d27ae2c6405583e06cafca0c1b542b25d0d.tar.lz
yuzu-235b5d27ae2c6405583e06cafca0c1b542b25d0d.tar.xz
yuzu-235b5d27ae2c6405583e06cafca0c1b542b25d0d.tar.zst
yuzu-235b5d27ae2c6405583e06cafca0c1b542b25d0d.zip
Diffstat (limited to '')
-rw-r--r--src/yuzu/main.cpp23
1 files changed, 13 insertions, 10 deletions
diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp
index f39da90ba..43d64b708 100644
--- a/src/yuzu/main.cpp
+++ b/src/yuzu/main.cpp
@@ -1045,20 +1045,23 @@ bool GMainWindow::LoadROM(const QString& filename, std::size_t program_index) {
break;
default:
- if (static_cast<u32>(result) >
- static_cast<u32>(Core::System::ResultStatus::ErrorLoader)) {
+ if (result > Core::System::ResultStatus::ErrorLoader) {
const u16 loader_id = static_cast<u16>(Core::System::ResultStatus::ErrorLoader);
const u16 error_id = static_cast<u16>(result) - loader_id;
const std::string error_code = fmt::format("({:04X}-{:04X})", loader_id, error_id);
LOG_CRITICAL(Frontend, "Failed to load ROM! {}", error_code);
- QMessageBox::critical(
- this,
- tr("Error while loading ROM! ").append(QString::fromStdString(error_code)),
- QString::fromStdString(fmt::format(
- "{}<br>Please follow <a href='https://yuzu-emu.org/help/quickstart/'>the "
- "yuzu quickstart guide</a> to redump your files.<br>You can refer "
- "to the yuzu wiki</a> or the yuzu Discord</a> for help.",
- static_cast<Loader::ResultStatus>(error_id))));
+
+ const auto title =
+ tr("Error while loading ROM! %1", "%1 signifies a numeric error code.")
+ .arg(QString::fromStdString(error_code));
+ const auto description =
+ tr("%1<br>Please follow <a href='https://yuzu-emu.org/help/quickstart/'>the "
+ "yuzu quickstart guide</a> to redump your files.<br>You can refer "
+ "to the yuzu wiki</a> or the yuzu Discord</a> for help.",
+ "%1 signifies a numeric error ID.")
+ .arg(error_id);
+
+ QMessageBox::critical(this, title, description);
} else {
QMessageBox::critical(
this, tr("Error while loading ROM!"),