[gDesklets] Translation support (was: Develbook 0.36 rc1)



Hi there,

I just tried to dig a bit deeper into "how to manage multiple language in a documentation project" (or whatever you would like to call it ;) ).
Looks like using docbook and gettext might be the only useful approach... ?!

Anyway, this brought me back to this:

It would be better to have language support for desklets in the core, but for the time being it might be a good idea to have translation of (at least) the basic desklets.

So I was thinking if there might be a "better way" of having translated desklets (for the time being).

So, here's a rough idea of my thoughts about it ;) :

Do we need "changing language on the fly" ?

Well... it *might be* nice and a good idea to have when implementing it into the core, but until then I would say: not really ;).


I guess it might be "good enough" to have a translated version of a desklet (display file and/or control) generated when it is installed/copied. So basically it looks like a good starting point to have the installation script or part of gDesklets (or the shell ?) look for additional languages and exchange the translated parts before the files are saved.

My idea:
- standard language for display and control files has to be english
- there is a new directory within every desklet homedir holding the translations (something like "translations", "po", ".po" etc.) - in this directory all translation files (po files seem to be fine for this) will be stored in this directory - on installation the shell/core will call a "gettext like" function to exchange the strings. Furthermore a comment should be added to the files to inform the reader about what has been done.

All we need would be a few scripts:
- one to generate the pot files (like looking for every "label", "help", "print", "echo" etc.) - one to install new language files if they are not included in the desklet's archive (this could be done by the shell like installing new desklets (open, d&d...)). - have the shell handle languages (showing available languages, switching languages etc.)

This is not perfect and including things into the core will be the better way (even though - when looking into the developers' wiki - it doesn't seem to be too clear how to be done yet), but this might be a good intermediate solution, especially when using po files (which could be reused later).

Anyway... just a few rough ideas and my 5 cents ;).

Comments, ideas, etc. ??!!

Greetings, Bjoern


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]