From 7900a84bd68d7c9450bba719ce925b61043875f3 Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Sun, 26 Jul 2020 02:50:20 -0400 Subject: use ordinal comparison/sorting instead of invariant --- src/SMAPI/Framework/Translator.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/SMAPI/Framework/Translator.cs') diff --git a/src/SMAPI/Framework/Translator.cs b/src/SMAPI/Framework/Translator.cs index f2738633..11ec983b 100644 --- a/src/SMAPI/Framework/Translator.cs +++ b/src/SMAPI/Framework/Translator.cs @@ -12,7 +12,7 @@ namespace StardewModdingAPI.Framework ** Fields *********/ /// The translations for each locale. - private readonly IDictionary> All = new Dictionary>(StringComparer.InvariantCultureIgnoreCase); + private readonly IDictionary> All = new Dictionary>(StringComparer.OrdinalIgnoreCase); /// The translations for the current locale, with locale fallback taken into account. private IDictionary ForLocale; @@ -45,7 +45,7 @@ namespace StardewModdingAPI.Framework this.Locale = locale.ToLower().Trim(); this.LocaleEnum = localeEnum; - this.ForLocale = new Dictionary(StringComparer.InvariantCultureIgnoreCase); + this.ForLocale = new Dictionary(StringComparer.OrdinalIgnoreCase); foreach (string next in this.GetRelevantLocales(this.Locale)) { // skip if locale not defined @@ -90,7 +90,7 @@ namespace StardewModdingAPI.Framework // reset translations this.All.Clear(); foreach (var pair in translations) - this.All[pair.Key] = new Dictionary(pair.Value, StringComparer.InvariantCultureIgnoreCase); + this.All[pair.Key] = new Dictionary(pair.Value, StringComparer.OrdinalIgnoreCase); // rebuild cache this.SetLocale(this.Locale, this.LocaleEnum); -- cgit