[hypermail] Language clearing task finished...

From: Nicolas Noble <Pixel_at_the-babel-tower.nobis.phear.org_at_hypermail-project.org>
Date: Mon, 15 Jan 2001 05:16:48 +0100 (CET)
Message-ID: <Pine.LNX.4.21.0101150454310.32137-100000_at_the-babel-tower.nobis.phear.org>


I've finished the work I've assigned to myself, ie the cleaning up of the whole message-thing of hypermail.

But I know some people that will *hate* me after that :)

Let me explain what I've done:

-) removed the whole 'lang[message_id]' system and changed to a
'lang_tr(message_id)' system, ie it's safier now (no chance of mis-choiced messages if in DEBUG_LANG mode)

-) moved out all the messages from lang.h and putting them into lang.c. I
really don't like the MAIN_FILE system. We can have all the strings created into lang.c without having gcc complaining. Since the symbols are defined as 'extern', ld will find the dependencies from itself.

-) changed the message structure (that's why I said translators will hate
me) from char ** to struct message_entry *. Take a look at lang.h to see it. Now I add the messageid sticked to the structure, in order to track down bugs more easily. I've changed the 'english' structure to adapt to this system but I didn't had enough strengh to change the structure for each language. The simple idea of changing the structure two times (one for english, one for french) had discouraged myself to do even the french one. I will do it a bit later. I would also add that it should be better for translators to change their string by the way. I mean that having non-ascii chars into the strings is really not fair. Having a bit of '&'-based control-chars will refresh hypermail a lot.

-) removed all the non-html messages from the list and put the messages
back into their respective source code. Don't be affraid: I've added each time a _() to support the GNU gettext structure. It isn't enabled yet (this will be another task) but this works (as I've defined the _ symbol into hypermail.h). I've added this symbol about in every non-translated strings I've caught into all the .c files. But I surely miss some... We will have to look further when doing the 'GNU gettext' task.

-) ho and yes: changed the #define MSG number system to an enum
system. This will be easier to insert a new string into the structure now.

-) The last but not the least: if a string is defined as NULL into the
structure, the lang_tr() function will fall back to english. That's means that you don't have to insert the string into all the languages structures when adding a new 'html' string, but only a 'NULL' pointer.

-) I think this is all.... So many changes were done that I can't remember
of everything.

I've done many changements into the whole code but I think hypermail will still works after that, since only simple string-based function are affected. This task was a bit more complicated that I thought, but it's done now. And since this has changed a lot the code, the patch is *HUGE* (about 170KB). So I won't drop it into this mail. You can download it here:



Received on Mon 15 Jan 2001 06:12:47 AM GMT

This archive was generated by hypermail 2.3.0 : Sat 13 Mar 2010 03:46:12 AM GMT GMT