Tuxemon / Tuxemon

Open source monster-fighting RPG.
GNU General Public License v3.0
941 stars 197 forks source link

Support multiple translation files for mod support #602

Open bitcraft opened 4 years ago

bitcraft commented 4 years ago

NOTE: this is a discussion on a feature in development and is likely going to change as it is developed. This is related to mod support. Mods are stored in the the "mods" folder, with the default being "tuxemon". This feature should allow translations of the same locale to be loaded from multiple folders. When this is implemented, a number of issues must be handled:

MirceaKitsune commented 4 years ago

Just a clarification as I forgot to post this a few days ago: #601 should half fix this. The new game loader allows all files to be overridden from a campaign's directory, including locale. So if you have a mod/mygame/l18n/en_US/LC_MESSAGES/base.po it will replace the default resources/l18n/en_US/LC_MESSAGES/base.po if you're launching Tuxemon with the mygame data folder.

Like I mentioned the only slight critique I have is that one base.po contains everything from dialogue to builtin command names, instead of being divided into a small category of files (eg: builtin.po, defs.po, dialogue.po) which would allow a campaign to only modify and maintain the ones it needs to. Other than that I'm personally satisfied with how this will work following that PR.

bitcraft commented 4 years ago

There are features which still need to be implemented so I will keep this issue open. Please keep the “split PO files” comments to its own discussion.