L-Sherry / Localize-me

CCLoader mod to add locales
MIT License
5 stars 3 forks source link

This is bloat, should remove some deprecated stuff #4

Open L-Sherry opened 4 years ago

L-Sherry commented 4 years ago

This code is bloat and there are some code only left here to support old or never-released French-CC versions.

Localize-Me should be bumped to 1.0 and these should be removed:

dmitmel commented 4 years ago

I can try removing each of your points if you'd like.

L-Sherry commented 4 years ago

Feel free to do it if you want.

I should probably make a proper release of French-CC first, because the last release still depends on encraption and the patch_font thing, i only removed those in the master branch.

L-Sherry commented 4 years ago

So yeah, i want to deprecate more stuff:

dmitmel commented 4 years ago

Using from_locale to find lang labels (looking for any of en_US or langUid should be enough).

What do you mean here?

Searching for e.g. sc/lang/gimmick.nl_NL.json instead of looking for from_locale's one. Everyone uses en_US as from_locale anyway, and uses sc/lang/gimmick.en_US.json inside their pack files.

Fair enough, no objections.

By "everyone" you probably mean yourself and me? :)

L-Sherry commented 4 years ago

What do you mean here?

Currently, to detect lang labels inside game files, Localize-Me look for objects that contains from_locale. So if e.g. from_locale is "en_US", then any object with a en_US field is, from the point of view of Localize-Me, a LangLabel to translate.

Having the detection logic depends on from_locale is a bit silly. Let's just use en_US (and langUid, so that mods that don't have an english translation can be translated anyway) and be done with it.

Actually, it would also allow to partially fix deadlocks caused by mods that blocks until a json resource is loaded, but Localize-Me want to translate that resource and blocks on knowing the final locale. The fix would be to only block the loading of the resource if there are LangLabels in it.

By "everyone" you probably mean yourself and me? :)

I'm not aware of anyone else :)