tbleher Posted January 29, 2021 Report Share Posted January 29, 2021 Dear 0ad developers, I'm wondering whether it is possible to translate the scenario editor? Background: my children (4 and 8 years old) really love 0ad (as a world-building game, without fighting) Yesterday, I showed them the scenario editor, and they were very interested. Unfortunately, the scenario editor is in English (which my children don't speak). I briefly looked at the code, and it uses the wx widgets translation functions (e.g. menuBar->Append(menuMisc, _("&Misc hacks"));). However, the editor does not show up in German, even though German is reported as being translated 100% in https://www.transifex.com/wildfire-games/0ad/. Would you be willing to take patches to translate the scenario editor? If yes, I would also welcome pointers about the current translation system (I saw that the game uses tinygettext, but did not look at the scripts yet that capture the strings into po files), and how to extend it to cover the scenario editor. Thank you for making such a beautiful game! Thomas 1 Quote Link to comment Share on other sites More sharing options...
Stan` Posted January 29, 2021 Report Share Posted January 29, 2021 Hi Thomas, Welcome to the forums. I suppose adding translations to Atlas before we remove wxwidgets (which could happen only in years) sounds like a great idea! Indeed it seems we do not pull translation from it, maybe @wraitii or @Gallaecio knows why it wasn't done. Since it's done in other parts of the C++ I assume it must be possible. I'll let them answer for specifics /pointers Quote Link to comment Share on other sites More sharing options...
wraitii Posted January 30, 2021 Report Share Posted January 30, 2021 Hello I think the atlas source code simply isn't picked up in the translation files, so it's not actually translatable/translated. That sounds quite fixable indeed. We'll certainly take patches regardless Quote Link to comment Share on other sites More sharing options...
tbleher Posted January 30, 2021 Author Report Share Posted January 30, 2021 OK, I looked a bit into this. Pulling the strings into the pot file is indeed quite easy. Patch is at https://github.com/0ad/0ad/compare/master...tbleher:atlas-translation. However, showing the translations in Atlas seems a bit more involved: The game itself works on po files directly (using tinygettext) wxWidgets expects mo files (which could be generated from po files, but aren't currently) I see two ways forward: Generating mo files from po files. Possible pain point: requires gettext tooling, which I assume is currently not available/needed on Windows? Adapt Atlas to use tinygettext and the L10n classes from the game. This seems more integrated, but I have no idea currently what libraries may be used in which part of the code. Any guidance on this? Quote Link to comment Share on other sites More sharing options...
Stan` Posted January 31, 2021 Report Share Posted January 31, 2021 Hey thanks for the quick patch! Unfortunately that's incorrect because there are more things than atlas in source/tools so you need to ignore that as well. For the mo generation I suppose we could use an extra python script to generate them? see source/tools/i18n for more info on how we generate things. 10 hours ago, tbleher said: Adapt Atlas to use tinygettext and the L10n classes from the game. This seems more integrated, but I have no idea currently what libraries may be used in which part of the code. I believe tinygettext is currently built statically with the game while atlas is built as a dll (as it is optionnal) Finally and apologize about this, we use phabricator and arcanists for code submissions See https://trac.wildfiregames.com/wiki/SubmittingPatches and https://trac.wildfiregames.com/wiki/Phabricator for more information on how to upload your code to code.wildfiregames.com Quote Link to comment Share on other sites More sharing options...
Stan` Posted April 23, 2021 Report Share Posted April 23, 2021 @Itms re atlas translations ^ Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.