Last modified: 2013-10-25 19:17:49 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T45499, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 43499 - Move wikitext parsing from jqueryMsg to server
Move wikitext parsing from jqueryMsg to server
Status: NEW
Product: MediaWiki
Classification: Unclassified
ResourceLoader (Other open bugs)
unspecified
All All
: Normal normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-12-29 01:44 UTC by Matthew Flaschen
Modified: 2013-10-25 19:17 UTC (History)
7 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Matthew Flaschen 2012-12-29 01:44:11 UTC
As it says (https://gerrit.wikimedia.org/r/gitweb?p=mediawiki/core.git;a=blob;f=resources/mediawiki/mediawiki.jqueryMsg.js;h=6e2d3b410b33cfb8f2835ee6f1457b7dc264f35f;hb=refs/heads/master#l156) this functionality should be moved to the server.

There is no logical reason to put it on the client.  The current structure is confusing.  Among other things, the docs say to use mediawiki.jqueryMsg only when you need PLURAL/GRAMMAR/GENDER.  But it's actually needed for any message with e.g. an external link (it also has part of the infrastructure for wikilink parsing, but not there's a missing piece, wlink; see https://bugzilla.wikimedia.org/show_bug.cgi?id=43498).
Comment 1 Niklas Laxström 2012-12-30 10:00:54 UTC
Doing it server side could be a performance issue, since if the message contains parameters, it can be parsed only by sending those parameters to the server when we know what they are.
Comment 2 Nemo 2012-12-30 10:07:36 UTC
(In reply to comment #0)
> There is no logical reason to put it on the client.  The current structure is
> confusing.  Among other things, the docs say to use mediawiki.jqueryMsg only
> when you need PLURAL/GRAMMAR/GENDER.

What docs? There are some unreviewed changes in the manual page in this moment. https://www.mediawiki.org/wiki/Manual_talk:Messages_API
Comment 3 Matthew Flaschen 2012-12-30 10:34:29 UTC
Nikas, I believe the specific idea is to have the server generate an AST.  However, there are certainly cases where you want wikitext parsing, but there are no actual variables.  In that case the server could do everything.  

Right now, the only way you can get 100% reliable parsing is by sending requests to the server (https://www.mediawiki.org/wiki/RL/DM#mediawiki.api.parse).  The goal is to avoid that by having the server do the parsing up front, and bundle it into the modules' messages data.

We definitely need an architecture.  See also https://bugzilla.wikimedia.org/show_bug.cgi?id=25349, which suggests letting modules choose.  Perhaps one of those ways could be AST, for when you have to plug in variables on the client.

Nemo, that page.  I'm Superm401, and I just replied to you there.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links