Skip to content

Commit

Permalink
tag: add deleted/nominated on Commons (wikimedia-gadgets#1959)
Browse files Browse the repository at this point in the history
  • Loading branch information
TollensWP committed Sep 6, 2024
1 parent 0fba192 commit d04518c
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions modules/friendlytag.js
Original file line number Diff line number Diff line change
Expand Up @@ -1166,6 +1166,16 @@ Twinkle.tag.fileList = {
],
'Wikimedia Commons-related tags': [
{ label: '{{Copy to Commons}}: free media that should be copied to Commons', value: 'Copy to Commons' },
{
label: '{{Deleted on Commons}}: file has previously been deleted from Commons',
value: 'Deleted on Commons',
subgroup: {
type: 'input',
name: 'deletedOnCommonsName',
label: 'Name on Commons:',
tooltip: 'Name of the image on Commons (if different from local name), excluding the File: prefix'
}
},
{
label: '{{Do not move to Commons}}: file not suitable for moving to Commons',
value: 'Do not move to Commons',
Expand Down Expand Up @@ -1196,6 +1206,16 @@ Twinkle.tag.fileList = {
tooltip: 'Name of the image on Commons (if different from local name), excluding the File: prefix:'
}
},
{
label: '{{Nominated for deletion on Commons}}: file is nominated for deletion on Commons',
value: 'Nominated for deletion on Commons',
subgroup: {
type: 'input',
name: 'nominatedOnCommonsName',
label: 'Name on Commons:',
tooltip: 'Name of the image on Commons (if different from local name), excluding the File: prefix:'
}
},
{
label: '{{Now Commons}}: file has been copied to Commons',
value: 'Now Commons',
Expand Down Expand Up @@ -1959,6 +1979,16 @@ Twinkle.tag.callbacks = {
case 'Should be SVG':
currentTag += '|' + params.svgCategory;
break;
case 'Nominated for deletion on Commons':
if (params.nominatedOnCommonsName !== '') {
currentTag += '|1=' + params.nominatedOnCommonsName;
}
break;
case 'Deleted on Commons':
if (params.deletedOnCommonsName !== '') {
currentTag += '|1=' + params.deletedOnCommonsName;
}
break;
default:
break; // don't care
}
Expand Down

0 comments on commit d04518c

Please sign in to comment.