mirror of
https://github.com/4sval/FModel.git
synced 2026-08-24 18:34:30 -05:00
Hotfix translation fixes:
- Correction when there is no language. - CosmeticSet translation.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -43,23 +43,9 @@ namespace FModel.Methods.Assets.IconCreator.AthenaID
|
||||
JToken set_source_string = AssetsUtility.GetPropertyTagText<JToken>(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<string>()) &&
|
||||
AssetTranslations.HotfixLocResDict[set_namespace.Value<string>()].ContainsKey(set_key.Value<string>()) &&
|
||||
AssetTranslations.HotfixLocResDict[set_namespace.Value<string>()][set_key.Value<string>()].ContainsKey("en"))
|
||||
{
|
||||
return string.Format("\nPart of the {0} set.", AssetTranslations.HotfixLocResDict[set_namespace.Value<string>()][set_key.Value<string>()]["en"]);
|
||||
}
|
||||
return string.Format("\nPart of the {0} set.", set_source_string.Value<string>());
|
||||
}
|
||||
else
|
||||
{
|
||||
string cosmeticSet = AssetTranslations.SearchTranslation(set_namespace.Value<string>(), set_key.Value<string>(), set_source_string.Value<string>());
|
||||
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<string>(), set_key.Value<string>(), set_source_string.Value<string>());
|
||||
string cosmeticPart = AssetTranslations.SearchTranslation("Fort.Cosmetics", "CosmeticItemDescription_SetMembership_NotRich", "\nPart of the {0} set.");
|
||||
return string.Format(cosmeticPart, cosmeticSet);
|
||||
}
|
||||
}
|
||||
return string.Empty;
|
||||
|
||||
Reference in New Issue
Block a user