This commit is contained in:
JustArchi
2017-02-25 10:53:35 +01:00
parent 833774aafc
commit b68b695150
2 changed files with 2 additions and 4 deletions

View File

@@ -254,9 +254,8 @@ namespace ArchiSteamFarm {
if (currentResourceSetCount < defaultResourceSetCount) {
// We don't want to report "en-AU" as 0.00% only because we don't have it as a dialect, if "en" is available and translated
// This typically will work only for English, as e.g. "nl-BE" doesn't fallback to "nl-NL", but "nl", and "nl" will be empty
CultureInfo neutralCulture = CultureInfo.CurrentCulture.Parent;
ushort neutralResourceSetCount = 0;
ResourceSet neutralResourceSet = Strings.ResourceManager.GetResourceSet(neutralCulture, true, false);
ResourceSet neutralResourceSet = Strings.ResourceManager.GetResourceSet(CultureInfo.CurrentCulture.Parent, true, false);
if (neutralResourceSet != null) {
neutralResourceSetCount = (ushort) neutralResourceSet.Cast<object>().Count();
}

View File

@@ -160,9 +160,8 @@ namespace ArchiSteamFarm {
if (currentResourceSetCount < defaultResourceSetCount) {
// We don't want to report "en-AU" as 0.00% only because we don't have it as a dialect, if "en" is available and translated
// This typically will work only for English, as e.g. "nl-BE" doesn't fallback to "nl-NL", but "nl", and "nl" will be empty
CultureInfo neutralCulture = CultureInfo.CurrentCulture.Parent;
ushort neutralResourceSetCount = 0;
ResourceSet neutralResourceSet = Strings.ResourceManager.GetResourceSet(neutralCulture, true, false);
ResourceSet neutralResourceSet = Strings.ResourceManager.GetResourceSet(CultureInfo.CurrentCulture.Parent, true, false);
if (neutralResourceSet != null) {
neutralResourceSetCount = (ushort) neutralResourceSet.Cast<object>().Count();
}