User "Brion VIBBER" posted a comment on MediaWiki.r90858.

Full URL: 
https://secure.wikimedia.org/wikipedia/mediawiki/wiki/Special:Code/MediaWiki/90858#c20457
Commit summary:

Make parser->getFunctionLang be dependent on title->getPageLanguage() instead 
of $wgContLang, i.e. the page content language instead of the wiki content 
language. This sets the right language on page view + edit for all pages, 
instead of only edit preview on MediaWiki namespace pages (as in EditPage.php).

Comment:

I'm actually kind of inclined to do it robin's way; the content direction is a 
property of the page, and having to explicitly set it _separately_ from other 
page metadata like the page title feels a bit odd. Every bit of code that calls 
the parser would have to know to check the page's directionality and pass it in 
if we have to add it to ParserOptions, which feels worse to me.

Alternatively, ParserOptions could be initialized from '''both''' a user and a 
title, but a) that still requires changing all the existing code and b) I'm not 
sure that fits with the theory of ParserOptions. Since page metadata like title 
and revision ID aren't passed through ParserOptions either, I kinda feel like 
it should come along with the title.

In the next-gen parser interface, we may want to have separate notions of 
'general environment info' and 'this-page info', where this-page includes the 
title, revision id, and any other such metadata that's related to '''what''' 
you're parsing rather than '''who''' is parsing it.

_______________________________________________
MediaWiki-CodeReview mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-codereview

Reply via email to