Commons:Upload Wizard/Editing
Custom tags and categories
- Info The following is neither endorsed nor supported by the Wikimedia Foundation who took over the burden of the maintenance of our upload process.
if ("UploadWizard" === mw.config.get('wgCanonicalSpecialPageName')) {
mw.loader.using('ext.uploadWizard', function () {
try {
var autoAdd = mw.config.get('UploadWizardConfig').autoAdd;
// Add a custom category to all my upload wizard uploads
autoAdd.categories.push("Files uploaded by Rillke");
// Add a custom license tag to all my files uploaded using the sorcerer
autoAdd.wikitext += "{{My custom information or re-using tag}}";
} catch (ex) {
mw.log("Injecting user-category into UploadWizard failed.", ex);
}
});
}
which can be amended to your needs and inserted into your common.js. It takes effect after about 1 minute but you have to reload tabs where UploadWizard was open while making this change. Note that the category will not be shown in the user-interface during the upload process, instead it is added silently, just like Category:Uploaded with UploadWizard is.
Translation
Translation is via translatewiki.net
- UW messages in translatewiki – for translation (/qqq message descriptions)
License options
From gerrit.wikimedia.org UploadWizard.config.php:
Step 1: define the license
// 'licenses' is a list of licenses you could possibly use elsewhere, for instance in
148 // licensesOwnWork or licensesThirdParty.
149 // It just describes what licenses go with what wikitext, and how to display them in
150 // a menu of license choices. There probably isn't any reason to delete any entry here.
151 // Under normal circumstances, the license name is the name of the wikitext template to insert.
152 // For those that aren't, there is a "templates" property.
Example: cc-by-sa-3.0 is defined, with a MediaWiki message link (to MediaWiki:mwe-upwiz-license-cc-by-sa-3.0), icons, and a URL. Icons seem to be optional.
153 'licenses' => array(
154 'cc-by-sa-3.0' => array(
155 'msg' => 'mwe-upwiz-license-cc-by-sa-3.0',
156 'icons' => array( 'cc-by', 'cc-sa' ),
157 'url' => '//creativecommons.org/licenses/by-sa/3.0/'
158 ),
Step 2: Add to license list
Assuming it's a "non-own work"-type license (for "own work", see the equivalent 'licensesOwnWork' array):
Go to the 'licensesThirdParty' => array(
[...] subarray 'licenseGroups' => array(
Each heading on the licensing page is defined in a 'head' message, and an explanatory 'subhead' message, and a list of licenses choosable under that heading. So either add a new license (defined in Step 1) to an existing heading, or add a whole new heading.
360 array(
361 'head' => 'mwe-upwiz-license-public-domain-usa-head',
362 'subhead' => 'mwe-upwiz-license-public-domain-usa-subhead',
363 'licenses' => array(
364 'pd-us',
365 'pd-art',
366 )
367 ),