[lkml]   [1997]   [Jan]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: Jive -> Kernel (International Linux)
On Fri, 17 Jan 1997, Adam D. Bradley wrote:

> Ack! Worst problem:
> (1) Strings have to be _recognized_ and then substituted. Have to do a
> bunch of strstr()'s over a massive string table. Alternately, you could
> do a hash on the fmt pointer to speed up the search, but still. And this
> invokes this same overhead on _any_ printk message once the language
> module is loaded; there's no allowance for "quick+dirty" dumps, eg OOPS
> data which we don't have/want to think about translating/formatting.
> Adam
> --

We've had modules, user processes, kernel loading predetermined files with
the relivent strings, ....

Why not just make it simple, and have a config option that appends a
'-D<lang>' to the cflags, and then have the printk's like this:

#ifdef LANG1
"Message that %s said %d in lang 1\n"
#else /* not in LANG1 */
#ifdef LANG2
"Message that %s said %d in lang 2\n"
else /* not in LANG2 */
"Message that %s said %d in english\n"
#endif /* LANG2 */
#endif /* LANG1 */
, device->name, status);

That way if the printk hasn't been translated to the perticular
language yet, the english is used, it dosn't use memory for each
additional language, and you also don't have all that messing
with loading, and searching through, lists of translations.

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 ;-)

 \ /
  Last update: 2005-03-22 13:38    [W:0.041 / U:0.760 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site