mirror of
https://github.com/kwsch/PKHeX.git
synced 2026-08-28 14:25:40 -05:00
Fix translating non-translatables
addnew adds a key when not found in original translation, which results in translating to the old value when flipping back to that language. can result in invalid values if the control is used as any data display (ie Gender label) https://projectpokemon.org/home/forums/topic/44926-when-i-changed-the-language-a-bug-about-gender-occurred/
This commit is contained in:
@@ -25,6 +25,7 @@ public static void UpdateAll()
|
||||
|
||||
private static void UpdateTranslations()
|
||||
{
|
||||
WinFormsTranslator.SetRemovalMode(false); // add mode
|
||||
WinFormsTranslator.LoadAllForms(LoadBanlist); // populate with every possible control
|
||||
WinFormsTranslator.UpdateAll(DefaultLanguage, Languages); // propagate to others
|
||||
WinFormsTranslator.DumpAll(Banlist); // dump current to file
|
||||
|
||||
@@ -186,7 +186,7 @@ public static void RemoveAll(string defaultLanguage, params string[] banlist)
|
||||
|
||||
public class TranslationContext
|
||||
{
|
||||
public bool AddNew { private get; set; } = true;
|
||||
public bool AddNew { private get; set; }
|
||||
public bool RemoveUsedKeys { private get; set; }
|
||||
public const char Separator = '=';
|
||||
private readonly Dictionary<string, string> Translation = new Dictionary<string, string>();
|
||||
|
||||
Reference in New Issue
Block a user