From 24c373245ebdab946f11627520edea76e1f23b8e Mon Sep 17 00:00:00 2001 From: Connor McLaughlin Date: Thu, 7 Jan 2021 12:14:41 +1000 Subject: [PATCH] MemoryCard: Make formatting OSD message translatable --- src/core/memory_card.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/core/memory_card.cpp b/src/core/memory_card.cpp index 33fb0b976..5292dff2a 100644 --- a/src/core/memory_card.cpp +++ b/src/core/memory_card.cpp @@ -256,12 +256,10 @@ std::unique_ptr MemoryCard::Open(std::string_view filename) mc->m_filename = filename; if (!mc->LoadFromFile()) { - SmallString message; - message.AppendString("Memory card at '"); - message.AppendString(filename.data(), static_cast(filename.length())); - message.AppendString("' could not be read, formatting."); - Log_ErrorPrint(message); - g_host_interface->AddOSDMessage(message.GetCharArray(), 5.0f); + Log_InfoPrintf("Memory card at '%s' could not be read, formatting.", mc->m_filename.c_str()); + g_host_interface->AddFormattedOSDMessage( + 5.0f, g_host_interface->TranslateString("OSDMessage", "Memory card at '%s' could not be read, formatting."), + mc->m_filename.c_str()); mc->Format(); }