Language System Basis#6172
Conversation
Co-authored-by: Philip Dubé <serprex@users.noreply.github.com>
serprex
left a comment
There was a problem hiding this comment.
lgtm, would like to get other's thoughts here tho
|
@Pepper0ni good with merging this? to avoid conflicts, no changes to randomizer trick enums should be made on develop-ackbar after this. otherwise it should target develop-ackbar |
|
I assume, the way this was setup, there's only an English lang file because it was doing the tricks, which only have English tooltips? |
|
There's only an english lang file because language switching can't be done at runtime yet (as the strings are only evaluated once and then stored) which will come later, after all menu strings use the translation system, to avoid having two copies of most menu methods for a long time (one for translation system stuff & one for stuff not yet using it). |
|
Also, having only some parts of the UI translated would be bad UX. |
|
Is more of the system hooked up to this than the rando options? |
|
This PR only introduces the system and uses it for randomizer trick names & descriptions. |
Introduces the basis for a language system to allow the UI to be translated to any language and/or have the text changed by mods.
A lot of things would require more work but, for a proof of concept, this PR makes all randomizer trick names & descriptions translatable (currently not re-loadable at runtime as that would require deeper changes and this is already merge conflict hell every time a trick is touched).
The language change widget is currently not registered into the UI as it should probably be improved (and everything made re-loadable) before being accessible.
The system works by passing it a "translation path" which is resolved in the
.jsonincluding object indentation. If the resulting json object is a list of strings, instead of a string, they get concatenated (purely for organization/QoL).Build Artifacts