#tyndur · 2009-10-16
14 Nachrichten · Seite 1 von 1 · Original-CSV herunterladen
- kwolfpcmattman: Hm, for the strings to be localised, do you think we can calculate a hash at compile time?
- kwolfHm, seems to work and there even is some code in the net. I'm not the first one to think about such preprocessor abuse. ;-)
- kwolfExcept that the example code doesn't work *sigh*
- pcmattmankwolf: What do you mean by that?
- kwolfWell, basically if we have that _("this is a string") mentioned yesterday, I don't want to do a strcmp at runtime
- pcmattmanRight
- kwolfThough hasing at runtime could be okay, don't know
- kwolf*hashing
- pcmattmanDepends on what works best really; and what's fastest
- kwolfI'm open for any suggestions
- pcmattmanI don't know a lot about translation to really comment intelligently
- kwolfI was just thinking that hashing could be done at compile time. But neither am I sure that it's feasible nor if it's worth the hassle
- kwolfWell, for us I think mapping one string to another is enough
- kwolfFor the userspace multilang thing I implemented, I introduced some special magic to deal with things like "1 file", but "2 files", but that's really not necessary for a driver where a user would never see the message. "n file(s)" would be just as good