Originally Posted by
EVOEx
I've seen it before, but it's the dumbest thing ever coded imho.
See, it might make sense on first sight, especially for English people. But once you know a language other than English you should be able to realize that it makes no sense to use it this way.
Here's why: Quite commonly, sentences are reused in English that are slightly different in those context in other languages.
This might mean that the same string is used for the _ function (or macro) even though they are in a different context, making one of the contexts a horrible mistranslation.
But not just that, it also makes the translator's job hard. Let's say we get a random word: "comment". Now how is it used? In "1 comment"? As "give comment"? As "Person 1 and 2 comment:"? Good luck finding out translator: it might even be a mix of several of those.
Code:
#define _(string) TranslateString(string, __FILE__, __LINE__)
Problem solved, except in the incredibly improbable case where the same string appears twice on the same line of code and requires different translations.