almanac weird text bugfix, I THINK THIS SHOULD BE IT GUYS
This commit is contained in:
parent
90e9f3c35a
commit
2a4f1a7c32
5 changed files with 34 additions and 13 deletions
|
|
@ -1084,8 +1084,9 @@ namespace PvZ_Fusion_Translator.AssetStore
|
||||||
{ "Japanese" , "困難:" },
|
{ "Japanese" , "困難:" },
|
||||||
{ "Korean", "난이도:" },
|
{ "Korean", "난이도:" },
|
||||||
{ "Javanese" , "Kesulitan:" },
|
{ "Javanese" , "Kesulitan:" },
|
||||||
{ "Polish", "Trudność"},
|
{ "Polish", "Trudność:"},
|
||||||
{ "Hungarian", "Nehézség"},
|
{ "Hungarian", "Nehézség:"},
|
||||||
|
{ "Arabic", "صعوبة:"},
|
||||||
// { "Ukrainian" , "Складність:" },
|
// { "Ukrainian" , "Складність:" },
|
||||||
// { "Slovak" , "Náročnosť:" },
|
// { "Slovak" , "Náročnosť:" },
|
||||||
}
|
}
|
||||||
|
|
@ -1107,6 +1108,7 @@ namespace PvZ_Fusion_Translator.AssetStore
|
||||||
{ "Javanese" , "Mayit:" },
|
{ "Javanese" , "Mayit:" },
|
||||||
{ "Polish" , "Zombi:" },
|
{ "Polish" , "Zombi:" },
|
||||||
{ "Hungarian" , "Zombik:" },
|
{ "Hungarian" , "Zombik:" },
|
||||||
|
{ "Arabic" , "الزومبي:" },
|
||||||
// { "Ukrainian" , "Зомбі:" },
|
// { "Ukrainian" , "Зомбі:" },
|
||||||
// { "Slovak" , "Zombíci:"}
|
// { "Slovak" , "Zombíci:"}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -107,6 +107,12 @@ namespace PvZ_Fusion_Translator.AssetStore
|
||||||
"Kerüld a többi forrást, mert vírusokat tartalmazhatnak.\n" +
|
"Kerüld a többi forrást, mert vírusokat tartalmazhatnak.\n" +
|
||||||
"Kérjük, látogass el közösségünkbe a jövőbeli frissítésekért.</size>",
|
"Kérjük, látogass el közösségünkbe a jövőbeli frissítésekért.</size>",
|
||||||
"Oké! Értem.") },
|
"Oké! Értem.") },
|
||||||
|
{ "Arabic" , ("<size=10>The only valid source of this translation is from this community:\n" +
|
||||||
|
"<color=#64DD17>discord.gg/DPAC5ZVJ8T</color>. If you got this <i>anywhere</i> else like \n" +
|
||||||
|
"<color=#8B0000>Plants Hybrid</color> and <color=#8B0000>superhybrid.online</color>, they stole it.\n" +
|
||||||
|
"Stray away from other sources as they may contain viruses.\n" +
|
||||||
|
"Please visit our community for future updates.</size>",
|
||||||
|
"Okay! Got it.") },
|
||||||
// { "OTHER" , ("<size=10>A única fonte válida dessa tradução é desta\ncomunidade: <color=#64DD17>discord.gg/DPAC5ZVJ8T</color>. Se você obteve \nisso <i>em qualquer lugar</i> como <color=#8B0000>Plants Hybrid</color>\ne <color=#8B0000>superhybrid.online</color>,ou Blue Fly do Youtube,\nelses roubaram. Fique longe de sites falsos. Por favor,\nvisite nossa comunidade para futuras atualizações.</size>", "¡Okei! Entendido.") }
|
// { "OTHER" , ("<size=10>A única fonte válida dessa tradução é desta\ncomunidade: <color=#64DD17>discord.gg/DPAC5ZVJ8T</color>. Se você obteve \nisso <i>em qualquer lugar</i> como <color=#8B0000>Plants Hybrid</color>\ne <color=#8B0000>superhybrid.online</color>,ou Blue Fly do Youtube,\nelses roubaram. Fique longe de sites falsos. Por favor,\nvisite nossa comunidade para futuras atualizações.</size>", "¡Okei! Entendido.") }
|
||||||
// { "OTHER" , ("<size=9.5>Ang translation na ito ay galing dito lamang:\n<color=#64DD17>discord.gg/DPAC5ZVJ8T</color>. Pag nakuha niyo ito <i>sa iba pa</i>\nkagaya ng <color=#8B0000>Plants Hybrid</color> o <color=#8B0000>superhybrid.online</color>, anumang\nginawagawa ng <color=#8B0000>Blue Fly mula sa Youtube</color>, o anumang\n<color=#8B0000>Sub2Unlock links</color>, scam sila. MAG INGAT dahil\nkasi baka may virus 'jan. Join kayo sa discord namin!\nFilipino Translation by ColinPogi</size>" , "Tayo magsi-laro!") }
|
// { "OTHER" , ("<size=9.5>Ang translation na ito ay galing dito lamang:\n<color=#64DD17>discord.gg/DPAC5ZVJ8T</color>. Pag nakuha niyo ito <i>sa iba pa</i>\nkagaya ng <color=#8B0000>Plants Hybrid</color> o <color=#8B0000>superhybrid.online</color>, anumang\nginawagawa ng <color=#8B0000>Blue Fly mula sa Youtube</color>, o anumang\n<color=#8B0000>Sub2Unlock links</color>, scam sila. MAG INGAT dahil\nkasi baka may virus 'jan. Join kayo sa discord namin!\nFilipino Translation by ColinPogi</size>" , "Tayo magsi-laro!") }
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@ namespace PvZ_Fusion_Translator.Patches.BaseTextObjects
|
||||||
{
|
{
|
||||||
if (!string.IsNullOrEmpty(__instance.text))
|
if (!string.IsNullOrEmpty(__instance.text))
|
||||||
{
|
{
|
||||||
if (__instance.transform.parent.name.StartsWith("AlmanacHelp"))
|
if (__instance.transform.parent.name.StartsWith("AlmanacHelp") || __instance.transform.parent.name.StartsWith("CardBank"))
|
||||||
{
|
{
|
||||||
__instance = StringStore.TranslateText(__instance);
|
__instance = StringStore.TranslateText(__instance);
|
||||||
__instance.autoSizeTextContainer = false;
|
__instance.autoSizeTextContainer = false;
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,7 @@
|
||||||
using Il2Cpp;
|
using Il2Cpp;
|
||||||
using Il2CppTMPro;
|
using Il2CppTMPro;
|
||||||
using MelonLoader;
|
using MelonLoader;
|
||||||
|
using MelonLoader.TinyJSON;
|
||||||
using PvZ_Fusion_Translator.AssetStore;
|
using PvZ_Fusion_Translator.AssetStore;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using static PvZ_Fusion_Translator.FileLoader;
|
using static PvZ_Fusion_Translator.FileLoader;
|
||||||
|
|
@ -12,8 +13,8 @@ namespace PvZ_Fusion_Translator.Patches.Managers
|
||||||
public static partial class AlmanacPlantBank_Patch
|
public static partial class AlmanacPlantBank_Patch
|
||||||
{
|
{
|
||||||
[HarmonyPatch(nameof(AlmanacPlantBank.InitNameAndInfoFromJson))]
|
[HarmonyPatch(nameof(AlmanacPlantBank.InitNameAndInfoFromJson))]
|
||||||
[HarmonyPrefix]
|
[HarmonyPostfix]
|
||||||
private static bool InitNameAndInfoFromJson(Il2Cpp.AlmanacPlantBank __instance)
|
private static void InitNameAndInfoFromJson(Il2Cpp.AlmanacPlantBank __instance)
|
||||||
{
|
{
|
||||||
#if MULTI_LANGUAGE
|
#if MULTI_LANGUAGE
|
||||||
string currentLanguage = Utils.Language.ToString();
|
string currentLanguage = Utils.Language.ToString();
|
||||||
|
|
@ -27,7 +28,7 @@ namespace PvZ_Fusion_Translator.Patches.Managers
|
||||||
if (!File.Exists(path))
|
if (!File.Exists(path))
|
||||||
{
|
{
|
||||||
Log.LogError($"LawnStringsTranslate.json file not found at path: {path}");
|
Log.LogError($"LawnStringsTranslate.json file not found at path: {path}");
|
||||||
return true;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if OBFUSCATE
|
#if OBFUSCATE
|
||||||
|
|
@ -66,6 +67,7 @@ namespace PvZ_Fusion_Translator.Patches.Managers
|
||||||
{
|
{
|
||||||
if (plantInfo.seedType == __instance.theSeedType)
|
if (plantInfo.seedType == __instance.theSeedType)
|
||||||
{
|
{
|
||||||
|
component.autoSizeTextContainer = false;
|
||||||
component.text = plantInfo.info + "\n\n" + plantInfo.introduce;
|
component.text = plantInfo.info + "\n\n" + plantInfo.introduce;
|
||||||
component.overflowMode = TextOverflowModes.Page;
|
component.overflowMode = TextOverflowModes.Page;
|
||||||
|
|
||||||
|
|
@ -95,14 +97,13 @@ namespace PvZ_Fusion_Translator.Patches.Managers
|
||||||
}
|
}
|
||||||
component2.font = fontAsset;
|
component2.font = fontAsset;
|
||||||
component3.font = fontAsset;
|
component3.font = fontAsset;
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
[HarmonyPatch(nameof(AlmanacPlantBank_Patch.OnMouseDown))]
|
[HarmonyPatch(nameof(AlmanacPlantBank.OnMouseDown))]
|
||||||
[HarmonyPrefix]
|
[HarmonyPrefix]
|
||||||
private static bool OnMouseDown(Il2Cpp.AlmanacPlantBank __instance)
|
private static bool OnMouseDown(Il2Cpp.AlmanacPlantBank __instance)
|
||||||
{
|
{
|
||||||
|
|
@ -114,5 +115,16 @@ namespace PvZ_Fusion_Translator.Patches.Managers
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[HarmonyPatch(nameof(AlmanacPlantBank.PVPInit))]
|
||||||
|
[HarmonyPostfix]
|
||||||
|
private static void PVPInit(Il2Cpp.AlmanacPlantBank __instance)
|
||||||
|
{
|
||||||
|
TextMeshPro component = __instance.introduce.GetComponent<TextMeshPro>();
|
||||||
|
if (component != null)
|
||||||
|
{
|
||||||
|
component.autoSizeTextContainer = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -127,6 +127,7 @@ namespace PvZ_Fusion_Translator
|
||||||
// Slovak,
|
// Slovak,
|
||||||
Polish,
|
Polish,
|
||||||
Hungarian,
|
Hungarian,
|
||||||
|
Arabic,
|
||||||
|
|
||||||
LANG_END
|
LANG_END
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue