summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Lioncash2020-12-31 10:28:42 -0500
committerGravatar Lioncash2020-12-31 12:44:31 -0500
commit8c27a74132c25e14a051777053559ad044d5a316 (patch)
tree140ee72493d028544f5d786b7a21dff241c6c1d4
parentmain: Tidy up enum comparison (diff)
downloadyuzu-8c27a74132c25e14a051777053559ad044d5a316.tar.gz
yuzu-8c27a74132c25e14a051777053559ad044d5a316.tar.xz
yuzu-8c27a74132c25e14a051777053559ad044d5a316.zip
main: Make the loader error dialog fully translatable
Makes the dialog fully localizable and also adds disambiguation comments to help translators understand what the formatting specifiers indicate.
-rw-r--r--src/yuzu/main.cpp20
1 files changed, 12 insertions, 8 deletions
diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp
index e8f979440..2905f0224 100644
--- a/src/yuzu/main.cpp
+++ b/src/yuzu/main.cpp
@@ -1054,14 +1054,18 @@ bool GMainWindow::LoadROM(const QString& filename, std::size_t program_index) {
1054 const u16 error_id = static_cast<u16>(result) - loader_id; 1054 const u16 error_id = static_cast<u16>(result) - loader_id;
1055 const std::string error_code = fmt::format("({:04X}-{:04X})", loader_id, error_id); 1055 const std::string error_code = fmt::format("({:04X}-{:04X})", loader_id, error_id);
1056 LOG_CRITICAL(Frontend, "Failed to load ROM! {}", error_code); 1056 LOG_CRITICAL(Frontend, "Failed to load ROM! {}", error_code);
1057 QMessageBox::critical( 1057
1058 this, 1058 const auto title =
1059 tr("Error while loading ROM! ").append(QString::fromStdString(error_code)), 1059 tr("Error while loading ROM! %1", "%1 signifies a numeric error code.")
1060 QString::fromStdString(fmt::format( 1060 .arg(QString::fromStdString(error_code));
1061 "{}<br>Please follow <a href='https://yuzu-emu.org/help/quickstart/'>the " 1061 const auto description =
1062 "yuzu quickstart guide</a> to redump your files.<br>You can refer " 1062 tr("%1<br>Please follow <a href='https://yuzu-emu.org/help/quickstart/'>the "
1063 "to the yuzu wiki</a> or the yuzu Discord</a> for help.", 1063 "yuzu quickstart guide</a> to redump your files.<br>You can refer "
1064 static_cast<Loader::ResultStatus>(error_id)))); 1064 "to the yuzu wiki</a> or the yuzu Discord</a> for help.",
1065 "%1 signifies a numeric error ID.")
1066 .arg(error_id);
1067
1068 QMessageBox::critical(this, title, description);
1065 } else { 1069 } else {
1066 QMessageBox::critical( 1070 QMessageBox::critical(
1067 this, tr("Error while loading ROM!"), 1071 this, tr("Error while loading ROM!"),