Embedding the text directly in the source files would make translations more difficult, which
would probably mean they didn't happen, so I don't think this is a good idea.
Instead, perhaps some post-processing of the source code could be done to embed the text for
your chosen language, so you do get the text directly in the log, as you suggest.
Posted Aug 9, 2008 10:07 UTC (Sat) by dark (subscriber, #8483)
[Link]
Embedding the text in the source code needn't make it harder to
translate -- gettext solves exactly this problem and I'm sure the
technique could be adapted for the kernel. The drawback is that if the
kernel outputs translated messages directly then the English-language
version is not available when submitting bug reports or asking kernel
developers for help. For that, a unique identifier would help.
A kernel message catalog
Posted Aug 9, 2008 16:31 UTC (Sat) by giraffedata (subscriber, #1954)
[Link]
The drawback is that if the
kernel outputs translated messages directly then the English-language
version is not available when submitting bug reports or asking kernel
developers for help. For that, a unique identifier would help.
Note that the current proposal works the other way around: the kernel produces English and a unique identifier, then the user looks up the identifier separately and finds a more complete explanation possibly in another language. And in mine, the difference is that the English part is longer and many users don't need the additional step.
"harder to translate" might mean harder for someone to generate the other-language message repository, as compared to where the English version is in a separate file of message text. But in the current proposal, I believe the full English text is in the source file anyway; it's just in comments instead of in the actual message. A program extracts this text from throughout the kernel and a translator uses that extract to generate a message repository.