Skip to content

Language System Basis#6172

Merged
serprex merged 36 commits intoHarbourMasters:developfrom
Pepe20129:lang_data
Mar 29, 2026
Merged

Language System Basis#6172
serprex merged 36 commits intoHarbourMasters:developfrom
Pepe20129:lang_data

Conversation

@Pepe20129
Copy link
Copy Markdown
Contributor

@Pepe20129 Pepe20129 commented Jan 19, 2026

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 .json including 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

Comment thread soh/soh/util.cpp Outdated
Comment thread soh/soh/util.cpp Outdated
Comment thread soh/soh/Enhancements/randomizer/option.cpp
Comment thread soh/soh/util.cpp
@serprex serprex requested a review from Pepper0ni March 9, 2026 19:08
Copy link
Copy Markdown
Member

@serprex serprex left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, would like to get other's thoughts here tho

@Pepe20129 Pepe20129 requested a review from Malkierian March 27, 2026 23:24
@serprex
Copy link
Copy Markdown
Member

serprex commented Mar 28, 2026

@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

Comment thread soh/soh/SohGui/UIWidgets.hpp Outdated
@Malkierian
Copy link
Copy Markdown
Contributor

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?

@Pepe20129
Copy link
Copy Markdown
Contributor Author

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).

@Pepe20129
Copy link
Copy Markdown
Contributor Author

Also, having only some parts of the UI translated would be bad UX.

@Malkierian
Copy link
Copy Markdown
Contributor

Is more of the system hooked up to this than the rando options?

@Pepe20129
Copy link
Copy Markdown
Contributor Author

This PR only introduces the system and uses it for randomizer trick names & descriptions.
Other things such as the rest of the rando options and enhancements will be done in follow-up PRs.

@serprex serprex merged commit e0a1b23 into HarbourMasters:develop Mar 29, 2026
6 checks passed
@Pepe20129 Pepe20129 deleted the lang_data branch March 29, 2026 18:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants