Posted 27 September 2012 - 05:28 PM
As a translation system, I warmly recomment gettext po files. This will make your localisers happy!
Online platforms are also a good idea to keep the efforts coordinated, you might even be able to automatise adding online translations into nightly builds. I know that SuperTuxKart do that. Some also automatically inform the translators when changes have been made to the source language file.
Here's the platforms I'm familiar with:
Posted 02 October 2012 - 10:32 AM
Edited by raymond, 02 October 2012 - 10:33 AM.
Posted 07 December 2012 - 06:19 PM
I was investigating how to improve translation for GlestAE when stumbling across this thread. There's one big similarity in both projects: Most data is stored in XML files. This includes strings which one has to extract for translation. So, i thought i might share my findings with you here.
First of all, as i'm working on linux, using gnu gettext as i18n framework is more or less a given. There's good tool support and many translators are also familiar with it. You don't have to use the gnu implementation, e.g. boost::locale is a bit more flexible when searching for the message catalog and can support virtual filesystems like physfs.
When using gettext the source and data files are written in english. The strings are then extracted out of these files (preferable done by the build system). For source files this is very easily done with xgettext, see this quick tutorial.
Obviously xgettext can't support arbitrary XML structures. Turns out there's a W3C-standard named ITS. With this, one can define rules which text in the XML file should be translated. I recently found itstool which executes these rules and gives us a nice POT-file like xgettext. Only minor problem here: It might get "out-of-sync" what you fed through gettext and what you mark as translatable.
So, as i wrecked my previous test program while trying to get the opengl backend of cairo working, i made a simplier new one. This time using an XML file from 0 A.D. (which doesn't sound ridiculous in german, btw). It shows how to extract string(s) from XML, translate them and render them with pango. It includes a very rough and incomplete german translation (LANG=de_DE.utf8). Look at the Makefile first to see what you need (sorry, no nice build system and linux-only, should be easy to port through).
It would be nice if someone could provide a translation in a more complex script, like arabic or so. Just for testing. Use po/hoplite.pot as template.
Posted 15 December 2012 - 02:12 PM
Jonathan Waller [ aka quantumstate ]
Wildfire Games AI Scripter
Contact me: jonathanmarkwaller at gmail dot com
Support Wildfire Games!
Posted 16 December 2012 - 12:53 PM
gettext can help here a bit. The english strings get extracted from the source files, be it data or code, and get merged with existing translations. It even does fuzzy matching: If the string change is small enough, it still uses the old translation but marks it as fuzzy, so the translator should have a look at it. Old and obsolete translations get removed/commented out. That should be all done by the build system and commited by the one making the string change. There's probably more stuff depending on the translation editor used.
Your english texts probably evolve in the same way like everything else: Step by step. So, why not let translators do the same continuously in parallel? Of course some translations will get obsolete but that's just normal.
Many open source projects integrate their translation system with their version control system. So, translators get every change directly after it was made. Other projects update their language files only when they are near a release and make a "Call for translation" to notify the translators. If you're that much concerned about "wasted" effort by translators choose the latter approach. I think 0ad is stable enough to get at least started.
Posted 21 December 2012 - 11:42 AM
I already noticed your json files some days ago and json2po, converter from translate-toolkit, looks like it suits the job. Use the filter option to pick the leaves you want to extract, e.g.:
json2po --filter=History,Description -o hele.pot hele.jsonThis only works with current git master of translate-toolkit as i had to patch it and it got already merged upstream. You can only filter for key-names and not their position in the tree, but i guess that's not a problem for you.
You have to mark strings with some kind of function like _(), otherwise it's not extractable (just how you would do in C++). Best you link the gettext function to it as well (don't know how you call C++ from js).
This has some limitations, e.g. you can't use string concatenations like this one:
_("Open "+url+"\n in default web browser.")The string needs to be constant. Format strings seem to be the alternative which can be easily added. The translator can then move the special characters of the format string where they need to be in the translated string (that's why it's a bad idea to break it up in multiple strings).
As you can see it gets complex quite easily. Still, it shouldn't be too hard to add it to your build system (i'm not familiar with premake, i might be wrong).
Posted 21 January 2013 - 03:09 PM
First great work with the game. I've just downloaded it and I'm having fun with it.
I'm french and i can help you with french localization when time comes (done that for other games already)
Posted 22 February 2013 - 05:05 PM
Ykkrosh suggested to use pango to get bidi and font shaping support (uses harfbuzz internally). Some other nice features of pango: It searches for the right font based on the needed glyphs and some attributes you specified (uses fontconfig). Pango markup can be used to get some basic text effects. It also provides some basic layout features like word wrapping. You basically just throw text at it and you're done. You don't have to worry about the details. The negative things: It pulls in many dependencies and as it replaces all the text rendering and font handling, it probably takes quite some time to integrate.
I suggested to use gettext as i18n framework and pointed out some ways to extract strings from source and data files (see some posts above).
Some people mentioned different online translation systems which make it very easy for translators to get started and to collaberate. To make use of these you have to provide your strings in a compatible format like gettext does. If you want to run it on your own server, pootle is a good project. Other public translation systems are transifex and rosetta (part of launchpad).
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users