Truinto / ONI-Modloader-SimpleMods

OxygenNotIncluded Mods
MIT License
16 stars 6 forks source link

[Customize Buildings] update for localization data #63

Open neavo opened 2 months ago

neavo commented 2 months ago

I think the Chinese localization data that comes with the mod needs to be updated, the translation of some of the terms is really hard to understand and doesn't match the readme. But unfortunately I found out that the mod uses the localization string as the key of the config file, once a change is made to the localization terms, the player will lose his mod settings ... If this problem can be solved, I can maintain and update the Chinese localization data,include Customize Buildings and other mods.

neavo commented 2 months ago

In my development experience, it's not a good idea to mix data configuration with description text, it's better to keep it separate, the configuration file just needs the original key in English

Truinto commented 2 months ago

I experiemented with translating the config file as well. Some settings can only be changed manually. Not being able to read the strings is probably an issue. But I can see that my implementation did not work well.

Truinto commented 2 months ago

I will remove the "PROPERTY" key in future releases. If these are missing, then the config won't be translated. I will also remove individual config files per language. strings_NEW.txt

(Here is a regex, if useful #.*\.PROPERTY\..*\n.*\n.*\n.*\n.*\n check that format line end is set to UNIX.)

neavo commented 2 months ago

I will remove the "PROPERTY" key in future releases. If these are missing, then the config won't be translated. I will also remove individual config files per language. strings_NEW.txt

(Here is a regex, if useful #.*\.PROPERTY\..*\n.*\n.*\n.*\n.*\n check that format line end is set to UNIX.)

should I use this .txt file or the .po file in the mod to translate?

Truinto commented 2 months ago

It's the same, minus the property entries. Github doesn't allow .po extension.