#tyndur · 2009-10-16

14 Nachrichten · Seite 1 von 1 · Original-CSV herunterladen

  1. kwolfpcmattman: Hm, for the strings to be localised, do you think we can calculate a hash at compile time?
  2. 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. ;-)
  3. kwolfExcept that the example code doesn't work *sigh*
  4. pcmattmankwolf: What do you mean by that?
  5. kwolfWell, basically if we have that _("this is a string") mentioned yesterday, I don't want to do a strcmp at runtime
  6. pcmattmanRight
  7. kwolfThough hasing at runtime could be okay, don't know
  8. kwolf*hashing
  9. pcmattmanDepends on what works best really; and what's fastest
  10. kwolfI'm open for any suggestions
  11. pcmattmanI don't know a lot about translation to really comment intelligently
  12. 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
  13. kwolfWell, for us I think mapping one string to another is enough
  14. 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