Jump to content

Recommended Posts

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

 

 

  • Like 1
Link to post
Share on other sites

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

 

 

Link to post
Share on other sites

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

Link to post
Share on other sites

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:

  1. Generating mo files from po files. Possible pain point: requires gettext tooling, which I assume is currently not available/needed on Windows?
  2. 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?

Link to post
Share on other sites

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

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...