From 4c64300576b6e08beeac58cf86bd85d62b8ada03 Mon Sep 17 00:00:00 2001 From: LotP <22-lotp@users.noreply.git.ryujinx.app> Date: Wed, 31 Dec 2025 20:21:35 -0600 Subject: [PATCH] fix new locale files data loading (ryubing/ryujinx!245) See merge request ryubing/ryujinx!245 --- src/Ryujinx/Common/LocaleManager.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Ryujinx/Common/LocaleManager.cs b/src/Ryujinx/Common/LocaleManager.cs index 330ef4f18..4433f9859 100644 --- a/src/Ryujinx/Common/LocaleManager.cs +++ b/src/Ryujinx/Common/LocaleManager.cs @@ -190,7 +190,7 @@ namespace Ryujinx.Ava.Common.Locale } - foreach (LocalesJson file in _localeData.Value.LocalesFiles.Values) + foreach ((string fileName, LocalesJson file) in _localeData.Value.LocalesFiles) { foreach (LocalesEntry locale in file.Locales) { @@ -206,7 +206,7 @@ namespace Ryujinx.Ava.Common.Locale $"Locale key {{{locale.ID}}} has too many languages! Has {locale.Translations.Count} translations, expected {_localeData.Value.Languages.Count}!"); } - if (!Enum.TryParse(locale.ID, out LocaleKeys localeKey)) + if (!Enum.TryParse(fileName == "Root.json" ? locale.ID : $"{fileName[..^".json".Length]}_{locale.ID}" , out LocaleKeys localeKey)) continue; string str = locale.Translations.TryGetValue(languageCode, out string val) && !string.IsNullOrEmpty(val)