Skip to content

Commit

Permalink
No need to cache translations
Browse files Browse the repository at this point in the history
  • Loading branch information
Manu098vm committed Jun 5, 2024
1 parent 8caac57 commit 78389d1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions TeraFinder.Plugins/Utils/WinFormsTranslator.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using PKHeX.Core;
using pkNX.Structures;
using System.Reflection;

//Most of functions are taken from pkhex
Expand Down Expand Up @@ -104,8 +105,7 @@ private static ReadOnlySpan<string> GetTranslationFile(string lang)
}

var txt = Core.ResourcesUtil.GetTextResource(file);
return txt is not null ? (string[])typeof(Util).GetMethod("LoadStringList",
BindingFlags.NonPublic | BindingFlags.Static)!.Invoke(null, [file, txt ])! : [];
return txt is not null ? txt.Split("\r\n") : [];
}

private static IEnumerable<object> GetTranslatableControls(Control f)
Expand Down

0 comments on commit 78389d1

Please sign in to comment.