From db4f521d92de9c06f21f5b9faa0441babccde0b4 Mon Sep 17 00:00:00 2001 From: Connor McLaughlin Date: Thu, 18 Feb 2021 02:08:27 +1000 Subject: [PATCH] System: Make some boot error messages translatable --- src/core/host_interface.cpp | 5 +++-- src/core/system.cpp | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/core/host_interface.cpp b/src/core/host_interface.cpp index 1535bf988..56a203d86 100644 --- a/src/core/host_interface.cpp +++ b/src/core/host_interface.cpp @@ -101,7 +101,7 @@ bool HostInterface::BootSystem(const SystemBootParameters& parameters) if (!AcquireHostDisplay()) { - ReportFormattedError("Failed to acquire host display"); + ReportFormattedError(g_host_interface->TranslateString("System", "Failed to acquire host display.")); OnSystemDestroyed(); return false; } @@ -115,7 +115,8 @@ bool HostInterface::BootSystem(const SystemBootParameters& parameters) if (!System::Boot(parameters)) { - ReportFormattedError("System failed to boot. The log may contain more information."); + ReportFormattedError( + g_host_interface->TranslateString("System", "System failed to boot. The log may contain more information.")); OnSystemDestroyed(); m_audio_stream.reset(); ReleaseHostDisplay(); diff --git a/src/core/system.cpp b/src/core/system.cpp index 5f07ba9a2..d4470a03a 100644 --- a/src/core/system.cpp +++ b/src/core/system.cpp @@ -716,7 +716,8 @@ bool Boot(const SystemBootParameters& params) std::optional bios_image = g_host_interface->GetBIOSImage(s_region); if (!bios_image) { - g_host_interface->ReportFormattedError("Failed to load %s BIOS", Settings::GetConsoleRegionName(s_region)); + g_host_interface->ReportFormattedError(g_host_interface->TranslateString("System", "Failed to load %s BIOS."), + Settings::GetConsoleRegionName(s_region)); Shutdown(); return false; }