aboutsummaryrefslogtreecommitdiff
path: root/src/Ryujinx.Ava/Common/Locale/LocaleManager.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Ryujinx.Ava/Common/Locale/LocaleManager.cs')
-rw-r--r--src/Ryujinx.Ava/Common/Locale/LocaleManager.cs20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/Ryujinx.Ava/Common/Locale/LocaleManager.cs b/src/Ryujinx.Ava/Common/Locale/LocaleManager.cs
index 464ab780..583619fe 100644
--- a/src/Ryujinx.Ava/Common/Locale/LocaleManager.cs
+++ b/src/Ryujinx.Ava/Common/Locale/LocaleManager.cs
@@ -13,17 +13,17 @@ namespace Ryujinx.Ava.Common.Locale
{
private const string DefaultLanguageCode = "en_US";
- private Dictionary<LocaleKeys, string> _localeStrings;
- private Dictionary<LocaleKeys, string> _localeDefaultStrings;
+ private readonly Dictionary<LocaleKeys, string> _localeStrings;
+ private Dictionary<LocaleKeys, string> _localeDefaultStrings;
private readonly ConcurrentDictionary<LocaleKeys, object[]> _dynamicValues;
- public static LocaleManager Instance { get; } = new LocaleManager();
+ public static LocaleManager Instance { get; } = new();
public LocaleManager()
{
- _localeStrings = new Dictionary<LocaleKeys, string>();
+ _localeStrings = new Dictionary<LocaleKeys, string>();
_localeDefaultStrings = new Dictionary<LocaleKeys, string>();
- _dynamicValues = new ConcurrentDictionary<LocaleKeys, object[]>();
+ _dynamicValues = new ConcurrentDictionary<LocaleKeys, object[]>();
Load();
}
@@ -126,11 +126,11 @@ namespace Ryujinx.Ava.Common.Locale
}
}
- private Dictionary<LocaleKeys, string> LoadJsonLanguage(string languageCode = DefaultLanguageCode)
+ private static Dictionary<LocaleKeys, string> LoadJsonLanguage(string languageCode = DefaultLanguageCode)
{
- var localeStrings = new Dictionary<LocaleKeys, string>();
- string languageJson = EmbeddedResources.ReadAllText($"Ryujinx.Ava/Assets/Locales/{languageCode}.json");
- var strings = JsonHelper.Deserialize(languageJson, CommonJsonContext.Default.StringDictionary);
+ var localeStrings = new Dictionary<LocaleKeys, string>();
+ string languageJson = EmbeddedResources.ReadAllText($"Ryujinx.Ava/Assets/Locales/{languageCode}.json");
+ var strings = JsonHelper.Deserialize(languageJson, CommonJsonContext.Default.StringDictionary);
foreach (var item in strings)
{
@@ -143,4 +143,4 @@ namespace Ryujinx.Ava.Common.Locale
return localeStrings;
}
}
-} \ No newline at end of file
+}