Not logged inOpenClonk Forum
Up Topic Open Clonk in Polish.

This board is threaded (i.e. has a tree structure). Please use the Reply button of the specific post you are referring to, not just any random button. If you want to reply to the topic in general, use the Post button near the top and bottom of the page.

Post Reply
In Response to Günther
We don't actually have a "simple string-string mapping". We have at least three, and they aren't simple. There's lots of support code in the engine and redwolfs repository for it. I even wrote a hash table to fix a real performance issue! (I probably should have used std::map instead, but well.) If every file in tools/language is a separate tool, we have about the same amount of tools gettext has, except that the gettext ones are maintained by somebody else, have documentation (which is a good thing ;-)), and have more features, some of which we want but haven't yet.

When you ignore all the irrelevant aspects of the documentation, gettext is also simple. Take a look at docs/Makefile: There's one line to extract the source strings to doku.pot, one to update the .po files (commenting out no-longer-needed translations, deactivating translations whose source has slightly changed, adding new strings), and one to create the binary file to speed up lookups, and one to created the translated output files. (xml2po.py itself is more complex, but that is XML for you.)

I doesn't seem to me that extending our custom code to reimplement already existing features or reading through the old tools to learn how they work are that productive either. At least learning gettext will help you with working on basically any other open source project.

Powered by mwForum 2.29.7 © 1999-2015 Markus Wichitill