Re: Kernel-Messages translation

Joe Pranevich (joepran@telerama.lm.com)
Sun, 15 Jun 1997 14:13:08 -0400


James Mastros wrote:
>
> ----
> From: Keith Rohrer <kwrohrer@uiuc.edu>
> To: Kurt Huwig <kurt@huwig.de>
> Cc: amu@mit.edu; linux-kernel@vger.rutgers.edu; pavel@atrey.karlin.mff.cuni.
>
> cz; joepran@telerama.lm.com
> Date: Thursday, June 12, 1997 7:27 PM
> Subject: Re: Kernel-Messages translation
>
> >Executive summary:
> >1) global string tables, loading only one at a time to avoid bloating
> > the binary (nobody seems to care about kernel source bloat)
> >2) code which doesn't explicitly do the table lookup will work the
> > same as always
> >3) use multiple tables/table sections to minimize message allocation
> > conflicts
> >
> How about this:
> There are several files, lang.err.msg (one for each language, obviously),
> each containing somthing like this:
> english.err.msg:
> #define ERROR_MSG_READ_ONLY "read-only"
> #define ERROR_MSG_REMOUNT "Error, remounting "
> ...
> Make config copies the approate error defines for your locality, and
> anything that needs error-messages includes this file. Viola, no slowdown,
> no new code (not much anyway), and no bloat in the binary.
> When a developer needs to translate an error message back to their native
> tounge, they simply need to grep the approtate lang.err.msg file.
> The only problem I see is that when a developer adds a message, they need
> to do so in all of the lang.err.msg files. Perhaps we should cat /w

<SNIP>

> -=- James Mastros

Well, to solve the first problem you mentioned, you *could* include
something like defaulttrans.h *after* the native language file which
would consist of a LOT of #ifndef sets. *Really* ugly, but it would
work.

Joe