On 11/14/07, Steve Bennett <stevagewp(a)gmail.com> wrote:
So, two questions:
1) Is it possible/feasible to restrict the range of what could be a magic
word in some
way, like that they have to start with __, or some range of characters.
It would probably be best to replace all magic words with curly-brace
constructs of some kind for consistency (with backward compatibility
in the core parser for existing constructs, with the understanding
that they would eventually be removed from the database at least), if
you're going to be redoing the parser anyway. This is a small
improvement in consistency that I don't think anyone would mind.
2) Is it possible to get a complete list of all the
magic words currently
used for all the languages of Wikipedia? Does the contents of the
languages/messages directory already represent that?
The id's for all of the core ones should be in includes/MagicWord.php,
I suppose, but anything can add new ones (including core code, but I'm
not sure if that does). I'm not sure what the syntax is: direct
modification of MagicWord::$mVariableIDs? You'll want to look around
for that.
I realise that the term "magic word" is
somewhat ambiguous
Not really, it's quite specific. Anything that uses
includes/MagicWord.php is a magic word. That's mostly curly-brace
stuff, though.