Not logged in
Log in now
Create an account
Subscribe to LWN
LWN.net Weekly Edition for December 5, 2013
Deadline scheduling: coming soon?
LWN.net Weekly Edition for November 27, 2013
ACPI for ARM?
LWN.net Weekly Edition for November 21, 2013
Instead of manually picking an id for each message why not just make a hash of the message
string? No need to manually maintain the ids. No possibility to change a text without updating
A kernel message catalog
Posted Aug 8, 2008 11:50 UTC (Fri) by jamesh (guest, #1159)
So if a spelling or grammar error gets missed, the message can't be fixed without breaking
(possibly printed) documentation? That doesn't sound like an improvement.
That said, if there is a way of getting rid of the IDs entirely it might be worth pursuing.
Not having to maintain message IDs is one of the reasons why gettext won over competing message
Posted Aug 8, 2008 13:41 UTC (Fri) by JohnNilsson (guest, #41242)
One could always maintain a mapping between id's that are the same. But yeah, that probably
isn't much of an improvement.
Posted Aug 8, 2008 20:10 UTC (Fri) by giraffedata (subscriber, #1954)
Of all the code changes that break the documentation, grammar and typo corrections will be an insignificant minority.
There's no need to do something fancy like a hash -- just use the literal format string as the identifier. It's already in the documentation code anyway.
Another idea, more searchable than actual text but less of a development PITA than a number: an alphanumeric message ID. Have the macro turn it into a name that would make the compilation fail if it isn't unique.
Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds