From f6927e4fe579c1eac4288818d0b6bf49682ae8bb Mon Sep 17 00:00:00 2001 From: Kurt Date: Thu, 26 Oct 2017 20:37:11 -0700 Subject: [PATCH] Add gen2 KOR localization exceptions Closes #1547 Thanks @host1126 ! --- PKHeX.Core/PKM/PKX.cs | 2 ++ PKHeX.Core/PKM/StringConverter.cs | 17 +++++++++++++++++ 2 files changed, 19 insertions(+) diff --git a/PKHeX.Core/PKM/PKX.cs b/PKHeX.Core/PKM/PKX.cs index 8a18c8dcc..fc40499dc 100644 --- a/PKHeX.Core/PKM/PKX.cs +++ b/PKHeX.Core/PKM/PKX.cs @@ -220,6 +220,8 @@ namespace PKHeX.Core return "タマゴ"; string nick = GetSpeciesName(species, lang); + if (generation == 2 && lang == (int)LanguageID.Korean) + return StringConverter.LocalizeKOR2(nick); if (generation < 5 && (generation != 4 || species != 0)) // All caps GenIV and previous, except GenIV eggs. { diff --git a/PKHeX.Core/PKM/StringConverter.cs b/PKHeX.Core/PKM/StringConverter.cs index 699e82b1a..fa9f03250 100644 --- a/PKHeX.Core/PKM/StringConverter.cs +++ b/PKHeX.Core/PKM/StringConverter.cs @@ -2040,5 +2040,22 @@ namespace PKHeX.Core { 'Ê', 'E' }, { 'Ï', 'I' }, }; + + /// + /// Localizes a Gen4+ Korean species name to the localization used in Generation 2 Gold/Silver + /// + /// Generation 4 Species Name + /// Localized Name for Generation 2 + public static string LocalizeKOR2(string nick) + { + if (KorG2Localized.TryGetValue(nick, out string localized)) + return localized; + return nick; + } + private static readonly Dictionary KorG2Localized = new Dictionary + { + { "덩쿠리", "덩구리" }, // Tangela + { "슈륙챙이", "수륙챙이" }, // Poliwhirl + }; } }