Support system messages for upload text #60
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Currently, the default upload text for new files is very simple, they simply just add a template using subpage name, and using additional parameters when call through parser function.
On some wikis, uploaded files need to be tagged with copyright information. which is mandatory or recommended. Currently, SimpleBatchUpload do not have the ability to set a default upload text on root page, it means editors needs to write the upload text manually, and there is usually someone forget it, increases workload for maintenance on forementioned wikis.
This PR allows administrators set default texts for root page and subpages, at
MediaWiki:Simplebatchupload-filesummary
andMediaWiki:Simplebatchupload-filesummary-<subpagename>
respectively, the message for the root page is also registered in the message file. Additionally, optional template parameters passed through parser functions can be substituted on$1
in these system messages (prefix|
included).Some other changes are also made in this PR:
simplebatchupload-parameters
system message in the message file, a message for an existing feature.simplebatchupload-parameters
system message, prettier in format, like the format inMediaWiki:Gadgets-definition
.{{#batchupload:|arg1|arg2}}
).zh-hans
,zh-hant
,zh-hk
).This PR should be compatible with existing usages.