Page MenuHomePhabricator

Commons' TitleBlacklist messages are messy and not parseable by jqueryMsg
Closed, ResolvedPublic0 Estimated Story Points

Description

Commons' TitleBlacklist messages are huge, sometimes messy and generally not parseable by jqueryMsg for multiple reasons. This means that we can't currently display them in VisualEditor's file upload dialog.

https://commons.wikimedia.org/wiki/MediaWiki:Titleblacklist

Example: https://commons.wikimedia.org/wiki/MediaWiki:Titleblacklist-custom-filename

I'm not sure if we can solve this entirely from the technical side, or if we'll need to tweak the messages. Something to investigate.

Event Timeline

matmarex raised the priority of this task from to Needs Triage.
matmarex updated the task description. (Show Details)
matmarex subscribed.
Restricted Application added subscribers: Steinsplitter, Matanya, Aklapper. · View Herald Transcript
Jdforrester-WMF set Security to None.
Jdforrester-WMF edited a custom field.
Jdforrester-WMF moved this task from To Triage to Blocked on the VisualEditor board.

I'm sure we could solve this from the technical side, but I'm not sure it's worth it.

For this message (https://commons.wikimedia.org/wiki/MediaWiki:Titleblacklist-custom-filename):

Some things will cause jqueryMsg to fail:

  • {{#if:|}} parser function
  • <!-- --> comments

And some things are not properly parsed:

  • ''' bolding
  • : indents

I'm sure jqueryMsg could be improved to deal with all of these, but I don't think we want to turn it into a full-blown parser.

I'm in favor of tweaking the message.
E.g.: the good/bad examples could be moved to a "naming conventions" page that could be linked to (which a <!-- comment --> there already exists). That would get rid of the bolding, comments & indenting already.

Change 295630 had a related patch set uploaded (by Bartosz Dziewoński):
mw.jqueryMsg: Add support for {{PAGENAME}} and {{PAGENAMEE}}

https://gerrit.wikimedia.org/r/295630

Change 295630 merged by jenkins-bot:
mw.jqueryMsg: Add support for {{PAGENAME}} and {{PAGENAMEE}}

https://gerrit.wikimedia.org/r/295630