Truinto / ONI-Modloader-SimpleMods

OxygenNotIncluded Mods
MIT License
18 stars 6 forks source link

Translation will cause some Customize to fail #26

Closed Ventulus-lab closed 2 years ago

Ventulus-lab commented 2 years ago

I use strings_zh_klei.pot in your mod folder.Everything seems to be fine. But in fact ,some Customize will fail in Chinese Translation,Works under English. For Example,I set "Smart Battery KJ" to 40000 and "WireRefinedWatts" to 4000.Game set to Chinese. However, the in-game Smartbattery capacity and WireRefined and have not changed.still 20000 and 2000. When I set game to English,Your mod is still set up like this。 But in game Smartbattery capacity and WireRefined has changed as 40000 and 4000. So Strange!As a rule, the translation does not change the function.

By the way,I also tried DDEle 's Mod Translation,deleting your strings_zh_klei.pot and adding his zh-hans.po. then your mod shows Chinese and In-game buidings changed correctly. So,maybe you can improve your Localize Function, or try to support localization by DDEle 's Mod,or try Plib's Function PLocalization.

Ventulus-lab commented 2 years ago

Additional test: the button "Reset To Klei Default" fails when using your Localize function in Chinese. And it works fine when use DDEle 's Mod.

Truinto commented 2 years ago

Maybe true. Could be some weird formatting that I parse wrong. I will use the official parser and update shortly. Let me know if this fixes it.

Ventulus-lab commented 2 years ago

well [1.0.54.0] still has this bug。。

Ventulus-lab commented 2 years ago

Oh,1.0.55.0 it works!

Truinto commented 2 years ago

Ah, I see. Then it wasn't formatting. From a Steam comment I got the tip that the settings are getting reset from the ingame menu. I forgot to include the json resolver, which meant that half the logic wasn't able to understand the file and just kept resetting.