diff --git a/FModel/Methods/Assets/AssetTranslations.cs b/FModel/Methods/Assets/AssetTranslations.cs index 70e6bbb5..f1953a46 100644 --- a/FModel/Methods/Assets/AssetTranslations.cs +++ b/FModel/Methods/Assets/AssetTranslations.cs @@ -84,18 +84,20 @@ namespace FModel.Methods.Assets isHotfixDefault = true; } - string hotfixString = HotfixLocResDict[tNamespace][tKey][ifNotFoundTemp].ContainsKey(GetLanguageCode()) - ? HotfixLocResDict[tNamespace][tKey][ifNotFoundTemp][GetLanguageCode()] - : ifNotFound; + if (HotfixLocResDict[tNamespace][tKey][ifNotFoundTemp].ContainsKey(GetLanguageCode())) + { + string hotfixString = HotfixLocResDict[tNamespace][tKey][ifNotFoundTemp][GetLanguageCode()]; - // ONLY if there is english in the hotfix. - // If the translation is empty, it will be the default text. - if (isHotfixDefault && !string.IsNullOrEmpty(ifNotFound) && string.IsNullOrEmpty(hotfixString)) - hotfixString = ifNotFound; + // ONLY if there is english in the hotfix. + // If the translation is empty, it will be the default text. + if (isHotfixDefault && !string.IsNullOrEmpty(ifNotFound) && string.IsNullOrEmpty(hotfixString)) + hotfixString = ifNotFound; - return hotfixString; + return hotfixString; + } } - else if (FProp.Default.FLanguage == "English") + + if (FProp.Default.FLanguage == "English") { return ifNotFound; } diff --git a/FModel/Methods/Assets/IconCreator/AthenaID/CosmeticSet.cs b/FModel/Methods/Assets/IconCreator/AthenaID/CosmeticSet.cs index 9ea8cf8b..1a7ff4e2 100644 --- a/FModel/Methods/Assets/IconCreator/AthenaID/CosmeticSet.cs +++ b/FModel/Methods/Assets/IconCreator/AthenaID/CosmeticSet.cs @@ -43,23 +43,9 @@ namespace FModel.Methods.Assets.IconCreator.AthenaID JToken set_source_string = AssetsUtility.GetPropertyTagText(setArray, "DisplayName", "source_string"); if (set_namespace != null && set_key != null && set_source_string != null) { - if (string.Equals(FProp.Default.FLanguage, "English")) - { - if (AssetTranslations.HotfixLocResDict != null && - AssetTranslations.HotfixLocResDict.ContainsKey(set_namespace.Value()) && - AssetTranslations.HotfixLocResDict[set_namespace.Value()].ContainsKey(set_key.Value()) && - AssetTranslations.HotfixLocResDict[set_namespace.Value()][set_key.Value()].ContainsKey("en")) - { - return string.Format("\nPart of the {0} set.", AssetTranslations.HotfixLocResDict[set_namespace.Value()][set_key.Value()]["en"]); - } - return string.Format("\nPart of the {0} set.", set_source_string.Value()); - } - else - { - string cosmeticSet = AssetTranslations.SearchTranslation(set_namespace.Value(), set_key.Value(), set_source_string.Value()); - string cosmeticPart = AssetTranslations.SearchTranslation("Fort.Cosmetics", "CosmeticItemDescription_SetMembership_NotRich", "\nPart of the {0} set."); - return string.Format(cosmeticPart, cosmeticSet); - } + string cosmeticSet = AssetTranslations.SearchTranslation(set_namespace.Value(), set_key.Value(), set_source_string.Value()); + string cosmeticPart = AssetTranslations.SearchTranslation("Fort.Cosmetics", "CosmeticItemDescription_SetMembership_NotRich", "\nPart of the {0} set."); + return string.Format(cosmeticPart, cosmeticSet); } } return string.Empty;