Page MenuHomePhabricator

Replace underscore with space in thumbWikiText of prefillThanksPage: function()
Closed, ResolvedPublic

Description

Replace the underscores with spaces in prefillThanksPage: function() for wikilinks:

var thumbWikiText = "[[" + upload.title + "|thumb|Add caption here]]";

Btw: "Add caption here" should be localized too :-)


Version: unspecified
Severity: normal

Details

Reference
bz26178

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 11:11 PM
bzimport added a project: UploadWizard.
bzimport set Reference to bz26178.

neilk wrote:

Kaldari: you may find mw.Title.js useful here to do the conversion

This seems to work incomplete:

Uploaded today: http://commons.wikimedia.org/wiki/File:Sheikh_Abd_el-Qurna_(3704-06).jpg

Result (only the first underscore is replaced by a space):

[[File:Sheikh Abd_el-Qurna_(3704-06).jpg|thumb|Bildbeschriftung hier hinzufügen]]

My bad. Fixed for real in r87097.

neilk wrote:

re-fixed in an easier way (using the .toText() method of a mw.Title) in r87370