mirror of
https://github.com/kwsch/PKHeX
synced 2024-11-26 22:10:21 +00:00
Fix fallback from unlocalized language file to default language
This commit is contained in:
parent
81e87c1a15
commit
133a19a468
1 changed files with 5 additions and 0 deletions
|
@ -122,6 +122,11 @@ namespace PKHeX.Core
|
||||||
var resourceName = manifestResourceNames
|
var resourceName = manifestResourceNames
|
||||||
.Where(x => x.StartsWith("PKHeX.Core.Resources.text.") && x.EndsWith(name + ".txt", StringComparison.OrdinalIgnoreCase))
|
.Where(x => x.StartsWith("PKHeX.Core.Resources.text.") && x.EndsWith(name + ".txt", StringComparison.OrdinalIgnoreCase))
|
||||||
.FirstOrDefault();
|
.FirstOrDefault();
|
||||||
|
|
||||||
|
if (resourceName == null) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
using (var resource = thisAssembly.GetManifestResourceStream(resourceName))
|
using (var resource = thisAssembly.GetManifestResourceStream(resourceName))
|
||||||
using (var reader = new StreamReader(resource))
|
using (var reader = new StreamReader(resource))
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue