Page MenuHomePhabricator

mw.ForeignStructuredUpload should have a configurable information template
Closed, ResolvedPublic

Description

Currently, ForeignStructuredUpload has a hardcoded template, which is used to provide more information for a file (I assume it's taken from commonswiki):
https://github.com/wikimedia/mediawiki/blob/74fa14ac787da8eccae118920e3f74732f3e1b4c/resources/src/mediawiki/mediawiki.ForeignStructuredUpload.js#L85-L104

That works great, if the target for an upload is commonswiki, or a wiki, where the template is created/present. But, if I think about many third party wikis, which probably use another language (like german), and already has a localized template, it sounds difficult to advise them to maintain two tmeplates, the localized one, which they're using for ages, and a english one, which can be taken from commonswiki, but maybe needs some adjustments.

It would be great, if the module would try to get a template from an own message key (which could be created on-wiki) and replaces some "magic words" with the information it already give. If the message key isn't present, it would fall back to the current form.

Event Timeline

Florian claimed this task.
Florian raised the priority of this task from to Low.
Florian updated the task description. (Show Details)
Florian added subscribers: Florian, matmarex.

Change 251797 had a related patch set uploaded (by Florianschmidtwelzow):
Allow Wiki-Sysadmins to configure the template used for ForeignStructeredUpload

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

Florian renamed this task from mw.ForeignStructuredUpload should have a configurable infortaion template to mw.ForeignStructuredUpload should have a configurable informaion template.Nov 9 2015, 4:21 PM
Prtksxna renamed this task from mw.ForeignStructuredUpload should have a configurable informaion template to mw.ForeignStructuredUpload should have a configurable information template.Nov 17 2015, 12:09 PM

Change 287103 had a related patch set uploaded (by Bartosz Dziewoński):
[WIP] Refactor upload dialog to make it configurable

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

Change 287103 merged by jenkins-bot:
Refactor upload dialog to make it configurable

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

Change 251797 abandoned by Bartosz Dziewoński:
Allow sysops to change which template is used in ForeignStructuredUpload

Reason:
Superseded by https://gerrit.wikimedia.org/r/287103. Thanks for your work here!

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

matmarex claimed this task.

This will be possible in MW 1.27 using $wgUploadDialog. https://www.mediawiki.org/wiki/Manual:$wgUploadDialog

Change 289126 had a related patch set uploaded (by Bartosz Dziewoński):
Refactor upload dialog to make it configurable

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

Change 289126 merged by jenkins-bot:
Refactor upload dialog to make it configurable

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