Author Topic: New I18n system in CVS  (Read 8028 times)

Offline MarkC

  • Full Member
  • ***
  • Posts: 65
    • View Profile
New I18n system in CVS
« on: December 06, 2007, 14:03:32 »
The CVS code now uses a new system for internationalisation. The translations are no longer compiled into the client, but loaded from vompserver at runtime. I hope it will make the job of translation a lot easier. This obviously has an impact on translators, developers and users running CVS code.

For users running CVS code:
As Chris mentioned in a recent post, we now use the directory plugins/vompserver/ for the config files. The attached zip file should be extracted here, to produce the following directory tree:
plugins/vompserver/l10n/<translation files>
These files will be added to CVS, and we'll distribute them properly with the next release.

The client language settings will not be carried over from the old system. The first time a new CVS client runs, it will choose a language from the ones it finds on the server, with a preference for English.
If you want all your clients to use the same language automatically, for example German, the easiest solution is to install only the main-de and missing-de files into the l10n directory.

For translators:
The format of the new files should be fairly obvious. The format-definition in the zip file explains things in detail.
The encoding is still Latin-1. My next step is to convert to UTF-8 and extend (or replace) the font system.

For each language, there is a missing-* file, which lists the texts that have not yet been translated. It would be great if somebody who speaks one of these languages well could go through and fill in the missing texts. Please don't mix new translations into the main-* files; just leave them in a separate file and they will work. That way you can send us the file (or attach it here) containing only your new translations. I have some simple tools that can merge the files together with the texts in the correct order.

To test a new translation, either reboot the client or simply switch languages in the options screen.

The master-keys file is a complete list of all the texts that require translation.

For developers:
If you're writing code with text that should be localised, stop adding stuff to the language-data.h file and start patching the master-keys file (or simply send a list of new texts), along with translations into whatever languages you know, of course.

I have left the language-data.h file in CVS for now, in case anyone needs to diff a modified version against it.

Offline Harry

  • Full Member
  • ***
  • Posts: 168
    • View Profile
Re: New I18n system in CVS
« Reply #1 on: December 06, 2007, 19:57:37 »
hiya Mark,

does this cover the following "issue" as well?
http://www.loggytronic.com/forum/index.php?topic=279.0

Offline MarkC

  • Full Member
  • ***
  • Posts: 65
    • View Profile
Re: New I18n system in CVS
« Reply #2 on: December 06, 2007, 20:42:50 »
Hi Harry,

No, this only covers texts displayed by the VOMP client.

"VOMP client(s) connected" is the only text in the server code that asks to be translated. At some point we'll have to decide whether to bother setting up gettext / RegisterI18n for it, or just take out the call to tr() and leave it in English.

Offline Harry

  • Full Member
  • ***
  • Posts: 168
    • View Profile
Re: New I18n system in CVS
« Reply #3 on: December 07, 2007, 21:04:45 »
thx.

i vote English :)

happy weekend
Harry