https://bugzilla.wikimedia.org/show_bug.cgi?id=25984

--- Comment #3 from Andrew Dunbar <hippytr...@gmail.com> 2010-11-19 02:37:24 
UTC ---
For getting templates and red/blue link info I suggest adding a layer of
abstraction that the parser can call rather than calling directly to the
database.

Parser users would then have the choice of implementing them or knowing not to
try parsing template calls. In my case I have written code to both existence
checking and wikitext extraction directly from locally stored (and indexed)
dump files.

ContentLang is harder but should probably also be abstracted with an English
default, the default strings could be automatically be extracted to a text file
included in the source tarball to make sure they're up to date. Parser users
should be able to implement their own ContentLang equivalent also.

One problem I've found with ContentLang is it's not possible to instantiate one
without a User. You either pass a user or the default constructor seems to call
the database anyway to get the language settings for the default user. This
would also need to be abstracted, which should not be difficult in principle
since MediaWiki already serves mostly to anonymous users who are not logged in.

Getting rid of all external dependencies is probably a fair goal but some might
be fine. The first goal might be to get the Parser working from a MediaWiki
tarball that has been unarchived but has not had its installer ran, which is
how I'm working on it on a machine with no web server or database software
installed.

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
You are on the CC list for the bug.

_______________________________________________
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to