thexaero / Better-PVP-Translations

Translations to different languages for the Better PVP Minecraft mod.
Creative Commons Zero v1.0 Universal
8 stars 22 forks source link

This mod cannot display Chinese normally in the setting interface. #21

Closed rongke1997 closed 2 years ago

rongke1997 commented 2 years ago

Just like my title, I try to translate en_us.json in the lang folder and name it zh_cn.json, and then start the game,The minimap and worldmap settings interface is still in English .Can you take a look at this question ?

Greg-21 commented 2 years ago

Works for me (and always did), so I have a few questions for you:

rongke1997 commented 2 years ago

Minecraft 1.17.1-,Xaeros_Minimap_21.22.6_Fabric_1.17.1,XaerosWorldMap_1.18.8_Fabric_1.17.1, Before Translated document name is Xaeros_Minimap_21.22.6_Fabric_1.17.1.jar\assets\xaerobetterpvp\lang\en_us.json ,Translated file Xaeros_Minimap_21.22.6_Fabric_1.17.1.jar\assets\xaerobetterpvp\lang\ zh_cn.json. The file after adding my translation file :https://github.com/rongke1997/MC-mod

Greg-21 commented 2 years ago

Thanks. I've found the source of your problems in logs, look:

[Render thread/WARN]: Skipped language file: xaerobetterpvp:lang/zh_cn.json (com.google.gson.JsonSyntaxException: com.google.gson.stream.MalformedJsonException: Unterminated object at line 473 column 3 path $.gui.xaero_settings_not_found)
[Render thread/WARN]: Skipped language file: xaeroworldmap:lang/zh_cn.json (com.google.gson.JsonSyntaxException: com.google.gson.stream.MalformedJsonException: Unterminated object at line 105 column 3 path $.gui.xaero_waypoint_backgrounds)

Basically, your translation files cause JSON parsing errors as they lack commas at the ends of the following lines: 472 (Better PvP mod), and 104 & 116 (Xaero's World Map).

In the future, when working with Minecraft translation files (and JSON files in general), you should pay more attention to such things. Your current translations have a lot of strange and redundant whitespace characters here and there.

rongke1997 commented 2 years ago

Thank you very much, future translation documents must pay attention to these issues .

thexaero commented 2 years ago

@Greg-21 This is why I prefer the old lang format here :D

Greg-21 commented 2 years ago

Xaero, it looks like you were right back in the day...