Moondust-Project
Moondust-Project copied to clipboard
[Engine] Provide localization system for episodes
Since SMBX exists, it was stuck on ASCII and English language for in-game texts and UI labels. PGE Engine introduces the ability to make the full localization of UI where is possible to translate any UI label. However, episodes are still non-translatable.
My idea is next:
- Make the
lupdate-like utility that will scan all levels and world maps (also, maybe scan lua-scripts fortr()call usage?) in the episode - This utility can create a set of Qt-Linguist compatible .ts files (or, maybe use a different format which would be human-editable without additional tools?) are will contain files as "context" and in-game strings as source strings. Means, single TS file for the entire episode.
- For the case of .ts, those files can be compiled by regular
lreleaseutility into .qm (or can be exported from Qt Linguist) are will be used in runtime. - For the case of human-editable translation files, load them as-is to allow easier testing of the stuff in a place (make translation loading on each level/world reload for hot replace support)
- [ ] Anyway, for convenience, ship Qt Linguist itself with PGE toolchain to allow in-place editing of translations without requiring to download it separately.