From 79fb0efe67081202119fcb1291cecb75ff6c3f76 Mon Sep 17 00:00:00 2001 From: Fabio Attard Date: Wed, 3 Apr 2024 00:56:48 -0300 Subject: [PATCH] Fix load resources for other languages, when not translated version exists --- EventFlagsChecker.cs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/EventFlagsChecker.cs b/EventFlagsChecker.cs index 81231e5..3a0e22c 100644 --- a/EventFlagsChecker.cs +++ b/EventFlagsChecker.cs @@ -250,8 +250,6 @@ protected static string ReadResFile(string resName, string? langCode = null) var offResPath = System.IO.Path.Combine(System.IO.Path.GetDirectoryName(assembly.Location)!, resFileName); if (!System.IO.File.Exists(offResPath)) { - resFileName = assembly.GetManifestResourceNames().Single(str => str.EndsWith(resFileName)); - try { resFileName = assembly.GetManifestResourceNames().Single(str => str.EndsWith(resFileName)); @@ -259,7 +257,7 @@ protected static string ReadResFile(string resName, string? langCode = null) catch (InvalidOperationException) { // Load default language - return ReadResFile(resFileName, "en"); + return ReadResFile(resName, "en"); } using (var stream = assembly.GetManifestResourceStream(resFileName))