Tweakeroo

Tweakeroo

2M Downloads

The setting only works for single player does not render according to the language file

erertertet opened this issue · 5 comments

commented

As dealing with the translation according to the template in en_US.json in 1.20.x branch, I set the language file of zh_cn.json as:

{ "disableBatSpawning": "测试", "config.comment.disablebatspawning": "测试文本", }

but in the running demo it have shown something like:

image

The same also happened to some other setting that only apply to single player entries

commented

The single player message is applied a different way, and a bit more hard coded.

Found it:
"tweakeroo.label.config_comment.single_player_only"

commented

I meant the "disablebatSpawning" string, that is not replaced by the string specified in language file

commented

Looks like you may actually want to use this format instead, or rather additionally, for the config names:
image

This stuff is somewhat of a mess in the old code, as some stuff uses getPrettyName() and some stuff uses getConfigGuiDisplayName().
image
image

So basically I think you want to provide the translation both for disableBatSpawning and also config.name.disablebatspawning.
And the latter will be made as that gold/orange text automatically for those "single player only" configs in Tweakeroo.
image

commented

It kind of worked out if I just use all the config name translation by just do

{"config.name.aaabbbccc": "<translation>"}

instead of

{"aaaBbbbCcc": "<translation>"}

image

should I use both of them or just use one of them as the translation.json?

commented

I think you need the short form for any of the toggle messages to be translated at least.