PonderJS .text() function not displaying translations, showing raw localization keys
Minecraft Version
1.21 NeoForge - 21.1.194
Mod Version
PonderJS-NeoForge-1.21.1-2.1.3
Describe the bug!
I am encountering a problem with the PonderJS .text() function in KubeJS. When I call .text() with a direct string (example: .text(60, "Example text", [2.0, 2.5, 2.5])), the exact string "Example text" is rendered raw, instead of being formatted properly or displayed as expected.
Similarly, when I call .text() with a localization key (example: .text(60, "kubejs.ponder.fission_reactor.text_1", [x, y, z])), the raw key "kubejs.ponder.fission_reactor.text_1" is rendered as-is instead of displaying the localized text.
I have ensured that localization files are correctly placed in kubejs/assets/kubejs/lang/ and contain valid JSON with the proper keys and translated values. I have restarted Minecraft multiple times, tried using /reload and F3+T, but the issue persists.
Crash Report
No response
Log
No response
Additions and Modifications
Yes
Additions and Modifications Description
No response
Did the issue happen in singleplayer or on a server?
Singleplayer
Minecraft Version
1.21 NeoForge - 21.1.194
Mod Version
PonderJS-NeoForge-1.21.1-2.1.3
Describe the bug!
I am encountering a problem with the PonderJS .text() function in KubeJS. When I call .text() with a direct string (example: .text(60, "Example text", [2.0, 2.5, 2.5])), the exact string "Example text" is rendered raw, instead of being formatted properly or displayed as expected.
Similarly, when I call .text() with a localization key (example: .text(60, "kubejs.ponder.fission_reactor.text_1", [x, y, z])), the raw key "kubejs.ponder.fission_reactor.text_1" is rendered as-is instead of displaying the localized text.
I have ensured that localization files are correctly placed in kubejs/assets/kubejs/lang/ and contain valid JSON with the proper keys and translated values. I have restarted Minecraft multiple times, tried using /reload and F3+T, but the issue persists.
Crash Report
No response
Log
No response
Additions and Modifications
Yes
Additions and Modifications Description
No response
Did the issue happen in singleplayer or on a server?
Singleplayer
After restarting my PC, the problem was resolved and the translation keys began displaying as intended. However, I want to note that in PonderJS, it is still not possible to provide a direct string to the .text() function: you are required to use a localization key and set up the corresponding entry in a language file. Passing a raw string will only display the string as-is and will not format or localize it.
I want to note that in PonderJS, it is still not possible to provide a direct string to the .text() function: you are required to use a localization key and set up the corresponding entry in a language file.
Can you provide a simple full example for this? Because .text() only works with text, not with localization keys. It was always like this.
I want to note that in PonderJS, it is still not possible to provide a direct string to the .text() function: you are required to use a localization key and set up the corresponding entry in a language file.
Can you provide a simple full example for this? Because
.text()only works with text, not with localization keys. It was always like this.
I also encountered the same problem. When I directly entered text in Ponderjs, it did generate en_us.json, but when I translated it to zh_cn, it did not display as Chinese as I expected, and still appeared as enus en_us
{
"kubejs.ponder.tag.ctnhponder": "CTNH Ponder"
}
zh_cn
{
"kubejs.ponder.tag.ctnhponder": "CTNH思索"
}
Although I have written the translation and ensured that the Minecraft language selection is zh_cn, and have restarted the game multiple times, it always displays as enus