Re: Jive -> Kernel (International Linux)

Bryn Paul Arnold Jones (bpaj@gytha.demon.co.uk)
Sat, 18 Jan 1997 16:47:44 +0000 (GMT)


On Sat, 18 Jan 1997, Philip Blundell wrote:

>
> That would be the worst thing, because it clutters up the source code
> something chronic. We do _not_ want that to happen. Internationalisation
> belongs somewhere else.
>
> P.
>

Ok, either we can have:

1. a methord that is fast, introduces minimal kernel bloat, can be
translated as and when is wanted, and works from _before_ booting.

Or

2. we can have a bloated, slow, posably all in one go methord that
introduces one of: a huge (unswapable) module, a huge userspace daemon,
or the kernel finding a file at boot time to load in the strings, and
these strings have to be kept in sync with the kernel for it to make
sense.

And it still won't do the boot messages, as they are generated before any
of the above could happen (they all require access to a filesystem).

Well I know which I'd choose ....

The only other alternitve that I can think off that has all the advantages
of the first methord, bar one (the it's right there one), would be to have
an include file per .c (or set of .c's) that defines the strings like:

/* strings for a.random.driver */
#ifdef LANG1
#define INFO_DEBUG_THE_CARD_SAY "Message that %s said %d in lang1"
....
#endif /* LANG1 */
#ifdef LANG2
#define INFO_DEBUG_THE_CARD_SAY "Message that %s said %d in lang2"
...
#endif /* LANG2 */
#ifndef INFO_DEBUG_THE_CARD_SAY
#define INFO_DEBUG_THE_CARD_SAY "Message that %s said %d in english"
#endif
...

but you'll end up with a block for lang1, lang2, ..., and a whole load of
#ifndef/#define/#endif's at the end to pickup untranslated messages, and
use the english. It does clean up the code tho, it becomes:

#include "a.random.driver.strings.h"
...
printk(KERN_DEBUG, INFO_DEBUG_THE_CARD_SAY, device->name, status);

It's the same solution as before tho ....

Bryn

--
PGP key pass phrase forgotten,   \ Overload -- core meltdown sequence 
again :( and I don't care ;)      |            initiated.
                                 / This space is intentionally left   
                                |  blank, apart from this text ;-)
                                 \____________________________________