bbepis / XUnity.AutoTranslator

MIT License
2.01k stars 293 forks source link

Japanese Unity Game translate to Chinese with □□□ #542

Open getoutnow2013 opened 5 months ago

getoutnow2013 commented 5 months ago

.Background   Game: LOOK.hac -ルック・ハック-   It has 5 standalone version of different: Japanese, English, Trad-Chinese, Simp-Chinese, Korea   But non-Japanese versions were all translated by machine. So, they are Un-Readable.   The LOOKhac_Data folder of all versions are barely the same. Each version contains   all languages' data, pics, texts, resources... etc.   And it's TextMeshPro version is 1.4.0

.AutoTranslator   In Japanese-Version, I use BepInEx to translate Japanese to Chinese.   After I translated the text, some texts were shown as □ in there.   (Japanese-Ver, with AutoTranslator) 20240605_JpWithTrans

  (Chinese-Ver, All texts are correctly shown) 20240605_Tw

  I tried to set AutoTranslatorConfig.ini: OverrideFontTextMeshPro, FallbackFontTextMeshPro   By using "arialuni_sdf_u2018 / arialuni_sdf_u2019", the results are:   - arialuni_sdf_u2018: nothing changed.   - arialuni_sdf_u2019: all texts are disappear.

  (Japanese-Ver, with AutoTranslator,   OverrideFontTextMeshPro, FallbackFontTextMeshPro = arialuni_sdf_u2019) 20240605_JpWithFall

.Try to build font   I downloaded the Unity-Hub, build a "Unity 2022.3.4f1" environment.   Use the TextMeshPro ver1.4.0 package, and try to build a CJK font with Google Noto fonts.   But the new version Unity abandoned AssetBundle Builder,   So that I can't export the font to test. Now I am stuck here.

.Any Help   I wonder why the Chinese-Ver can show correctly texts.   (But that were machine-translated. So that are Un-Readable, Un-Understandable)   But Japanese-Ver will leak some Chinese texts. As these versions using the same Game-Data.

  Since "arialuni_sdf_u2018 / arialuni_sdf_u2019" seems built by TextMeshPro 1.2.0 or older.   So they can't work correctly. (Dismatch the TextMeshPro Version of this game?)   I need someone help me to build a CJK fonts using TextMeshPro 1.4.0.   Or someone know where can I download it?      Any help will be appericated!

ManlyMarco commented 5 months ago

The issue is usually the font not supporting the characters or the UI scale being too large to fit. Try changing the scaling settings.

nathan60107 commented 5 months ago

Try to add arialuni_sdf font and set OverrideFontTextMeshPro=arialuni_sdf. See this issue

getoutnow2013 commented 4 months ago

The issue is usually the font not supporting the characters or the UI scale being too large to fit. Try changing the scaling settings.

thanks for reply.

about scaling settings, I've set: EnableUIResizing=False ForceUIResizing=False

But nothing changed.

Besides, the □□ words are common words, For one example, You = 你 = □ Japan Ver + AutoTranslator: 你 -> □ Chines Ver without AutoTranslator : 你 -> 你

since both JapanVer and ChineseVer, their {Game Root}\LOOKhac_Data\data.unity3d are barely the same

getoutnow2013 commented 4 months ago

Try to add arialuni_sdf font and set OverrideFontTextMeshPro=arialuni_sdf. See this issue

thanks for reply

piture 3 is the result.

OverrideFontTextMeshPro = arialuni_sdf_u2019 FallbackFontTextMeshPro = arialuni_sdf_u2019 or OverrideFontTextMeshPro = arialuni_sdf_u2019 FallbackFontTextMeshPro = or OverrideFontTextMeshPro = FallbackFontTextMeshPro = arialuni_sdf_u2019 the results are the same

According to the BepInEx\LogOutput.log LogOutput.log.txt

The reason is: TextMesh Pro version mismatch. Font asset version: 1.1.0, TextMesh Pro version: 1.4.0

So I tried to ask somewhere I can download CJK for TMP1.4.0.

nathan60107 commented 4 months ago

I use the file mentioned in #57. The file arialuni_sdf is located in fonts.zip, and I set OverrideFontTextMeshPro=arialuni_sdf. If you're not, you can try it again.

getoutnow2013 commented 4 months ago

I use the file mentioned in #57. The file arialuni_sdf is located in fonts.zip, and I set OverrideFontTextMeshPro=arialuni_sdf. If you're not, you can try it again.

I download #57 font and put it in game root. 20240703_LH0

CASE 1 - OverrideFontTextMeshPro=arialuni_sdf

20240703_LH1-1

CASE 1 - Result - still has □□□, and more not show words(left calendar, Reply button, Page button) 20240703_LH1-2

CASE 1 - BepinEx Log, unknow TMP version, mismatch, many exceptions LogOutput.log_set_overridefontTMP.txt

CASE 2 - FallbackFontTextMeshPro=arialuni_sdf

20240703_LH2-1

CASE 2 - Result - still has □□□ 20240703_LH2-2

CASE 2 - BepinEx Log, unknow TMP version LogOutput.log_set_fallbackfontTMP.txt

nathan60107 commented 4 months ago

It seems that neither of your results successfully applied arialuni_sdf. Because arialuni_sdf is a sans-serif font(無襯線體字型). Another method I can suggest is using the following:

OverrideFont=Microsoft JhengHei
OverrideFontTextMeshPro=
FallbackFontTextMeshPro=

If this method also doesn't work, I have no other suggestions to help you.

getoutnow2013 commented 4 months ago

It seems that neither of your results successfully applied arialuni_sdf. Because arialuni_sdf is a sans-serif font(無襯線體字型). Another method I can suggest is using the following:

OverrideFont=Microsoft JhengHei
OverrideFontTextMeshPro=
FallbackFontTextMeshPro=

If this method also doesn't work, I have no other suggestions to help you.

thank you for help

That is not working. I've tried many fonts before(included Microsoft JhengHei). But this game is using TMP 1.4.0 for all displaying words. So OverrideFont means nothing changed.

I think there are 2 solutions, but I have no ability to do these:

1.By the BepInEx log file: TMP version mismatch. arialuni_sdf is unknow TMP version. Using TMP 1.4.0 to create a TMP font should be a solution.

2.I've extracted(by UABEA) and compared the Assets of JapanVer and ChineseVer. They are almost the same. So I think modify the C# code in assets. Using the TMP Fonts for chinese. That should be a solution.

Atamg1994 commented 4 months ago

It seems that neither of your results successfully applied arialuni_sdf. Because arialuni_sdf is a sans-serif font(無襯線體字型). Another method I can suggest is using the following:

OverrideFont=Microsoft JhengHei
OverrideFontTextMeshPro=
FallbackFontTextMeshPro=

If this method also doesn't work, I have no other suggestions to help you.

thank you for help

That is not working. I've tried many fonts before(included Microsoft JhengHei). But this game is using TMP 1.4.0 for all displaying words. So OverrideFont means nothing changed.

I think there are 2 solutions, but I have no ability to do these:

1.By the BepInEx log file: TMP version mismatch. arialuni_sdf is unknow TMP version. Using TMP 1.4.0 to create a TMP font should be a solution.

2.I've extracted(by UABEA) and compared the Assets of JapanVer and ChineseVer. They are almost the same. So I think modify the C# code in assets. Using the TMP Fonts for chinese. That should be a solution.

Looks like you have the same situation as me the font is losing characters!!! in my case, different symbols disappear every time I’m now using this mod to change the font to a dynamic one... and everything works.. but the problem is that it’s not suitable for all games... but more specifically for melon loader 0.5.7 and use your foreign hands to edit it if it doesn’t work in another game.. You can try it there in the post there are links to the MB versions, one of them will do!

https://github.com/bbepis/XUnity.AutoTranslator/issues/287

getoutnow2013 commented 4 months ago

It seems that neither of your results successfully applied arialuni_sdf. Because arialuni_sdf is a sans-serif font(無襯線體字型). Another method I can suggest is using the following:

OverrideFont=Microsoft JhengHei
OverrideFontTextMeshPro=
FallbackFontTextMeshPro=

If this method also doesn't work, I have no other suggestions to help you.

thank you for help That is not working. I've tried many fonts before(included Microsoft JhengHei). But this game is using TMP 1.4.0 for all displaying words. So OverrideFont means nothing changed. I think there are 2 solutions, but I have no ability to do these: 1.By the BepInEx log file: TMP version mismatch. arialuni_sdf is unknow TMP version. Using TMP 1.4.0 to create a TMP font should be a solution. 2.I've extracted(by UABEA) and compared the Assets of JapanVer and ChineseVer. They are almost the same. So I think modify the C# code in assets. Using the TMP Fonts for chinese. That should be a solution.

Looks like you have the same situation as me the font is losing characters!!! in my case, different symbols disappear every time I’m now using this mod to change the font to a dynamic one... and everything works.. but the problem is that it’s not suitable for all games... but more specifically for melon loader 0.5.7 and use your foreign hands to edit it if it doesn’t work in another game.. You can try it there in the post there are links to the MB versions, one of them will do!

287

thank you

I downloaded and extracted both MelonMod to the Game Root. (Already removed all BepInEx files) XUnity.AutoTranslator-MelonMod-5.3.1.zip XUnity.AutoTranslator-MelonMod-IL2CPP-5.3.1.zip

But neither of them generated AutoTranslator.ini. It seems that this game is not work with MelonMod.

code-monad commented 3 months ago

I am getting the same issue with you. OutputLog says the game is using TMP 1.4.0, with a japanese font named "lightnovelpopv2"(ラノベPOP v2) so i downloaded TMP 1.4.0 from github, generate the sdf file. but setting OverrideFontTextMeshPro and FallbackFontTextMeshPro seems does not working at all, it will never replace the font