|| ||"Riley Williams" <Riley@Williams.Name>|
|| ||"Linus Torvalds" <email@example.com>,
|| ||Re: kernel support for non-English user messages|
|| ||Thu, 10 Apr 2003 10:05:17 +0100|
>> I wish to suggest a possible 2.6 or 2.7 feature (too late for
>> 2.4.x and 2.5.x, I believe) that I believe would be helpful.
>> Currently, printk messages are all in English, and I was
>> wondering if printk could be modified to print out user
>> messages that are in the default language of the machine.
> This has come up before.
> The answer is: go ahead and do it, but don't do it in the kernel.
> Do it in klogd or similar.
> I refuse to clutter the kernel with inane and fragile (and totally
> unmaintainable) internationalization code. The string lookup can
> equally well be done in user space where it isn't a stability and
> complexity issue.
Whilst I agree with the general sentiments above, any such code would
require some sort of code attached to each message for it to look up,
with the standard English message tagged on to the end for systems
where the translation code isn't in use.
At the moment, printk() calls are supposed to have a string along the
lines of "<2>" prepended onto each line. Can I ask whether you have
any objection in principle to this being changed to something along
the lines of <2:xxxx> where the xxxx is a code to enable translation
systems to index that message?
This would probably require the current macros used to prepend the
relevant string to be changed to macro functions such that...
printk(KERN_ERR "Sample error message.\n");
printk(KERN_NO(KERN_NO_ERR,"1234") "Sample error message.\n");
...and would result in...
"<3:1234>Sample error message.\n"
...being printed out. The change of macro name is specifically for
backwards compatibility, and the resulting system would allow the
actual messages to be changed over time rather than all at once.
If this is acceptable, then the patch to make all relevant changes
against the 2.5.67 kernel tree is attached. This patch assigns the
message number 0000 to all current messages, thus reserving that
number as "Not yet numbered" as far as translation software is
Best wishes from Riley.
* Nothing as pretty as a smile, nothing as ugly as a frown.
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.470 / Virus Database: 268 - Release Date: 8-Apr-2003
[2. application/octet-stream; Linux-Logging-2.5.67.diff]...
to post comments)