"மீடியாவிக்கி:Gadget-friendlytag.js" பக்கத்தின் திருத்தங்களுக்கிடையேயான வேறுபாடு

9,935 பைட்டுகள் சேர்க்கப்பட்டது ,  2 மாதங்களுக்கு முன்
update from enwiki
(மொழிபெயர்பபு)
(update from enwiki)
 
// <nowiki>
 
(function($) {
 
(function($){
 
 
****************************************
* Mode of invocation: Tab ("Tag")
* Active on: Existing articles and drafts; file pages with a corresponding file
* which is local (not on Commons); existingall subpages ofredirects
* {Wikipedia|Wikipedia talk}:Articles for creation;
* all redirects
* Config directives in: FriendlyConfig
*/
 
Twinkle.tag = function friendlytag() {
// redirect tagging
if ( Morebits.wiki.isPageRedirect() ) {
Twinkle.tag.mode = 'redirect';
Twinkle.addPortletLink( Twinkle.tag.callback, "தொடு"'Tag', "'friendly-tag"', "வழிமாற்றை அடையாளப்படுத்த"'Tag redirect');
}
// file tagging
} else if( (mw.config.get('wgNamespaceNumber') === 6 && !document.getElementById("'mw-sharedupload"') && document.getElementById("'mw-imagepage-section-filehistory"') ) {
Twinkle.tag.mode = 'file';
Twinkle.addPortletLink( Twinkle.tag.callback, "தொடு"'Tag', "'friendly-tag"', "கோப்புக்குப்'Add பேணுகைmaintenance அடையாளப்படுத்தல்களைச்tags சேர்க்க"to file');
}
// article/draft article tagging
} else if( ([0, mw118].config.getindexOf('wgNamespaceNumber') === 0 || mw.config.get('wgNamespaceNumber')) =!== 118 || /^Wikipedia( talk)?\:Articles for creation\//.exec(Morebits.pageNameNorm) )-1 && mw.config.get('wgCurRevisionId') ) {
Twinkle.tag.mode = 'article';
// Can't remove tags when not viewing current version
Twinkle.addPortletLink( Twinkle.tag.callback, "தொடு", "friendly-tag", "கட்டுரைக்குப் பேணுகை அடையாளப்படுத்தல்களைச் சேர்க்க" );
Twinkle.tag.canRemove = (mw.config.get('wgCurRevisionId') === mw.config.get('wgRevisionId')) &&
// Disabled on latest diff because the diff slider could be used to slide
// away from the latest diff without causing the script to reload
!mw.config.get('wgDiffNewId');
Twinkle.addPortletLink(Twinkle.tag.callback, 'Tag', 'friendly-tag', 'Add or remove article maintenance tags');
}
};
 
Twinkle.tag.checkedTags = [];
 
Twinkle.tag.callback = function friendlytagCallback() {
var Window = new Morebits.simpleWindow( 630, (Twinkle.tag.mode === "'article")' ? 500 : 400 );
Window.setScriptName( "மின்னல்" 'Twinkle');
// anyone got a good policy/guideline/info page/instructional page link??
Window.addFooterLink('Tag "மின்னல் உதவி"prefs', "'WP:TW/DOCPREF#tag" ');
Window.addFooterLink('Twinkle help', 'WP:TW/DOC#tag');
Window.addFooterLink('Give feedback', 'WT:TW');
 
var form = new Morebits.quickForm( Twinkle.tag.callback.evaluate );
 
form.append({
if (document.getElementsByClassName("patrollink").length) {
type: 'input',
form.append( {
typelabel: 'checkboxFilter tag list: ',
name: 'quickfilter',
list: [
size: '30px',
{
event: function twinkletagquickfilter() {
label: 'பக்கத்தைச் சுற்றுக்காவலிட்டதாகக் குறி',
// flush the DOM of all existing underline spans
value: 'patrolPage',
$allCheckboxDivs.find('.search-hit').each(function(i, e) {
name: 'patrolPage',
var label_element = e.parentElement;
checked: Twinkle.getFriendlyPref('markTaggedPagesAsPatrolled')
// This would convert <label>Hello <span class=search-hit>wo</span>rld</label>
}
// to <label>Hello world</label>
]
label_element.innerHTML = label_element.textContent;
} );
});
}
 
if (this.value) {
switch( Twinkle.tag.mode ) {
$allCheckboxDivs.hide();
$allHeaders.hide();
var searchString = this.value;
var searchRegex = new RegExp(mw.util.escapeRegExp(searchString), 'i');
 
$allCheckboxDivs.find('label').each(function () {
var label_text = this.textContent;
var searchHit = searchRegex.exec(label_text);
if (searchHit) {
var range = document.createRange();
var textnode = this.childNodes[0];
range.selectNodeContents(textnode);
range.setStart(textnode, searchHit.index);
range.setEnd(textnode, searchHit.index + searchString.length);
var underline_span = $('<span>').addClass('search-hit').css('text-decoration', 'underline')[0];
range.surroundContents(underline_span);
this.parentElement.style.display = 'block'; // show
}
});
} else {
$allCheckboxDivs.show();
$allHeaders.show();
}
}
});
 
switch (Twinkle.tag.mode) {
case 'article':
Window.setTitle('Article maintenance tagging');
Window.setTitle( "கட்டுரைப் பேணுகைத் தொடுப்பிணைப்பி" );
 
// Object.values is unavailable in IE 11
var obj_values = Object.values || function (obj) {
return Object.keys(obj).map(function (key) {
return obj[key];
});
};
 
// Build sorting and lookup object flatObject, which is always
// needed but also used to generate the alphabetical list
Twinkle.tag.article.flatObject = {};
obj_values(Twinkle.tag.article.tagList).forEach(function (group) {
obj_values(group).forEach(function (subgroup) {
if (Array.isArray(subgroup)) {
subgroup.forEach(function (item) {
Twinkle.tag.article.flatObject[item.tag] = item;
});
} else {
Twinkle.tag.article.flatObject[subgroup.tag] = subgroup;
}
});
});
 
 
form.append({
type: 'select',
name: 'sortorder',
label: 'View this list:',
label: 'இப்பட்டியலைப் பார்க்கவும்:',
tooltip: 'You can change the default view order in your Twinkle preferences (WP:TWPREFS).',
tooltip: 'உங்கள் மின்னல் விருப்பத்தேர்வுகளில் (WP:TWPREFS) இயல்பிருப்புப் பார்வை வரிசையை மாற்றமுடியும்.',
event: Twinkle.tag.updateSortOrder,
list: [
{ type: 'option', value: 'cat', label: 'பகுப்புவாரியாகBy categories', selected: Twinkle.getFriendlyPrefgetPref('tagArticleSortOrder') === 'cat' },
{ type: 'option', value: 'alpha', label: 'அகரவரிசையில்In alphabetical order', selected: Twinkle.getFriendlyPrefgetPref('tagArticleSortOrder') === 'alpha' }
]
});
 
 
if (!Twinkle.tag.canRemove) {
var divElement = document.createElement('div');
divElement.innerHTML = 'For removal of existing tags, please open Tag menu from the current version of article';
form.append({
type: 'div',
name: 'untagnotice',
label: divElement
});
}
 
form.append({
});
 
form.append( {
type: 'checkbox',
list: [
{
label: 'இயலுமாயின்Group inside {{multiple issues}}இனுள் குழுவாக்கவும்if possible',
value: 'group',
name: 'group',
tooltip: 'If applying two or more templates supported by {{multiple issues}} and this box is checked, all supported templates will be grouped inside a {{multiple issues}} template.',
tooltip: '{{multiple issues}}ஆல் ஆதரவளிக்கப்படும் மூன்று அல்லது அதற்கு மேற்பட்ட வார்ப்புருக்களைச் சேர்க்கும்போது, இப்பெட்டி தெரிவுசெய்யப்பட்டிருந்தால், அவை {{multiple issues}} வார்ப்புருவினுள் குழுவாக்கப்படும்.',
checked: Twinkle.getFriendlyPrefgetPref('groupByDefault')
}
]
});
 
);
form.append({
type: 'input',
label: 'Reason',
name: 'reason',
tooltip: 'Optional reason to be appended in edit summary. Recommended when removing tags.',
size: '60px'
});
 
break;
 
case 'file':
Window.setTitle('File maintenance tagging');
Window.setTitle( "கோப்புப் பேணுகைத் தொடுப்பிணைப்பி" );
 
$.each(Twinkle.tag.fileList, function(groupName, group) {
// TODO: perhaps add custom tags TO list of checkboxes
form.append({ type: 'header', label: groupName });
form.append({ type: 'checkbox', name: 'tags', list: group });
});
 
if (Twinkle.getPref('customFileTagList').length) {
form.append({ type: 'header', label: 'அனுமதி, மூலச் சிக்கல்கள் தொடர்பான அடையாளப்படுத்தல்கள்' });
form.append({ type: 'checkboxheader', namelabel: 'imageTagsCustom tags', list: Twinkle.tag.file.licenseList } );
form.append({ type: 'checkbox', name: 'tags', list: Twinkle.getPref('customFileTagList') });
 
}
form.append({ type: 'header', label: 'பொதுவகந் தொடர்பான அடையாளப்படுத்தல்கள்' });
form.append({ type: 'checkbox', name: 'imageTags', list: Twinkle.tag.file.commonsList } );
 
form.append({ type: 'header', label: 'துப்புரவு அடையாளப்படுத்தல்கள்' } );
form.append({ type: 'checkbox', name: 'imageTags', list: Twinkle.tag.file.cleanupList } );
 
form.append({ type: 'header', label: 'படிமத் தர அடையாளப்படுத்தல்கள்' } );
form.append({ type: 'checkbox', name: 'imageTags', list: Twinkle.tag.file.qualityList } );
 
form.append({ type: 'header', label: 'பதிலீட்டு அடையாளப்படுத்தல்கள்' });
form.append({ type: 'checkbox', name: 'imageTags', list: Twinkle.tag.file.replacementList } );
break;
 
case 'redirect':
Window.setTitle('Redirect tagging');
Window.setTitle( "வழிமாற்றுத் தொடுப்பிணைப்பி" );
 
var i = 1;
form.append({ type: 'header', label:'எழுத்துப்பிழை, இலக்கணப்பிழை வார்ப்புருக்கள்' });
$.each(Twinkle.tag.redirectList, function(groupName, group) {
form.append({ type: 'checkbox', name: 'redirectTags', list: Twinkle.tag.spellingList });
form.append({ type: 'header', id: 'tagHeader' + i, label: groupName });
var subdiv = form.append({ type: 'div', id: 'tagSubdiv' + i++ });
$.each(group, function(subgroupName, subgroup) {
subdiv.append({ type: 'div', label: [ Morebits.htmlNode('b', subgroupName) ] });
subdiv.append({
type: 'checkbox',
name: 'tags',
list: subgroup.map(function (item) {
return { value: item.tag, label: '{{' + item.tag + '}}: ' + item.description, subgroup: item.subgroup };
})
});
});
});
 
if (Twinkle.getPref('customRedirectTagList').length) {
form.append({ type: 'header', label:'மாற்றுப்பெயர் வார்ப்புருக்கள்' });
form.append({ type: 'checkboxheader', namelabel: 'redirectTagsCustom tags', list: Twinkle.tag.alternativeList });
form.append({ type: 'checkbox', name: 'tags', list: Twinkle.getPref('customRedirectTagList') });
 
}
form.append({ type: 'header', label:'நிருவாக வழிமாற்று வார்ப்புருக்களும் வேறு வார்ப்புருக்களும்' });
form.append({ type: 'checkbox', name: 'redirectTags', list: Twinkle.tag.administrativeList });
break;
 
default:
alert("'Twinkle.tag: unknown mode "' + Twinkle.tag.mode);
break;
}
 
if (document.getElementsByClassName('patrollink').length) {
form.append( { type:'submit' } );
form.append({
type: 'checkbox',
list: [
{
label: 'Mark the page as patrolled/reviewed',
value: 'patrol',
name: 'patrol',
checked: Twinkle.getPref('markTaggedPagesAsPatrolled')
}
]
});
}
form.append({ type: 'submit', className: 'tw-tag-submit' });
 
var result = form.render();
Window.setContent( result );
Window.display();
 
// for quick filter:
if (Twinkle.tag.mode === "article") {
$allCheckboxDivs = $(result).find('[name$=tags]').parent();
$allHeaders = $(result).find('h5, .quickformDescription');
result.quickfilter.focus(); // place cursor in the quick filter field as soon as window is opened
result.quickfilter.autocomplete = 'off'; // disable browser suggestions
result.quickfilter.addEventListener('keypress', function(e) {
if (e.keyCode === 13) { // prevent enter key from accidentally submitting the form
e.preventDefault();
return false;
}
});
 
if (Twinkle.tag.mode === 'article') {
 
Twinkle.tag.alreadyPresentTags = [];
 
if (Twinkle.tag.canRemove) {
// Look for existing maintenance tags in the lead section and put them in array
 
// All tags are HTML table elements that are direct children of .mw-parser-output,
// except when they are within {{multiple issues}}
$('.mw-parser-output').children().each(function parsehtml(i, e) {
 
// break out on encountering the first heading, which means we are no
// longer in the lead section
if (e.tagName === 'H2') {
return false;
}
 
// The ability to remove tags depends on the template's {{ambox}} |name=
// parameter bearing the template's correct name (preferably) or a name that at
// least redirects to the actual name
 
// All tags have their first class name as "box-" + template name
if (e.className.indexOf('box-') === 0) {
if (e.classList[0] === 'box-Multiple_issues') {
$(e).find('.ambox').each(function(idx, e) {
if (e.classList[0].indexOf('box-') === 0) {
var tag = e.classList[0].slice('box-'.length).replace(/_/g, ' ');
Twinkle.tag.alreadyPresentTags.push(tag);
}
});
return true; // continue
}
 
var tag = e.classList[0].slice('box-'.length).replace(/_/g, ' ');
Twinkle.tag.alreadyPresentTags.push(tag);
}
});
 
// {{Uncategorized}} and {{Improve categories}} are usually placed at the end
if ($('.box-Uncategorized').length) {
Twinkle.tag.alreadyPresentTags.push('Uncategorized');
}
if ($('.box-Improve_categories').length) {
Twinkle.tag.alreadyPresentTags.push('Improve categories');
}
 
}
 
// Add status text node after Submit button
var statusNode = document.createElement('small');
statusNode.id = 'tw-tag-status';
Twinkle.tag.status = {
// initial state; defined like this because these need to be available for reference
// in the click event handler
numAdded: 0,
numRemoved: 0
};
$('button.tw-tag-submit').after(statusNode);
 
// fake a change event on the sort dropdown, to initialize the tag list
var evt = document.createEvent("'Event"');
evt.initEvent("'change"', true, true);
result.sortorder.dispatchEvent(evt);
 
} else {
// Redirects and files: Add a link to each template's description page
Morebits.quickForm.getElements(result, 'tags').forEach(generateLinks);
}
};
 
 
Twinkle.tag.checkedTags = [];
// $allCheckboxDivs and $allHeaders are defined globally, rather than in the
// quickfilter event function, to avoid having to recompute them on every keydown
var $allCheckboxDivs, $allHeaders;
 
Twinkle.tag.updateSortOrder = function(e) {
var form = e.target.form;
var sortorder = e.target.value;
Twinkle.tag.checkedTags = form.getChecked('tags');
 
var container = new Morebits.quickForm.element({ type: 'fragment' });
Twinkle.tag.checkedTags = e.target.form.getChecked("articleTags");
if (!Twinkle.tag.checkedTags) {
Twinkle.tag.checkedTags = [];
}
 
var container = new Morebits.quickForm.element({ type: "fragment" });
 
// function to generate a checkbox, with appropriate subgroup if needed
var makeCheckbox = function(tag, description(item) {
var checkboxtag = { value: item.tag, label:description "{{" + tag + "}}: " += item.description };
var checkbox = { value: tag, label: '{{' + tag + '}}: ' + description };
if (Twinkle.tag.checkedTags.indexOf(tag) !== -1) {
checkbox.checked = true;
}
checkbox.subgroup = item.subgroup;
switch (tag) {
return checkbox;
case "cleanup":
};
checkbox.subgroup = {
 
name: 'cleanup',
var makeCheckboxesForAlreadyPresentTags = function() {
type: 'input',
container.append({ type: 'header', id: 'tagHeader0', label: 'Tags already present' });
label: 'துப்புரவு ஏன் தேவை என்பதற்கான காரணம்: ',
var subdiv = container.append({ type: 'div', id: 'tagSubdiv0' });
tooltip: 'கட்டாயமானது.',
var checkboxes = [];
size: 35
var unCheckedTags = e.target.form.getUnchecked('existingTags');
};
Twinkle.tag.alreadyPresentTags.forEach(function(tag) {
break;
casevar "copycheckbox edit":=
checkbox.subgroup = {
name: 'copyEdit',
type: 'input',
label: 'படித்தொகுப்பு ஏன் தேவை என்பதற்கான காரணம்: ',
tooltip: 'எ-டு: முன்னுக்குப்பின் முரணான எழுத்துக்கூட்டல். விருப்பத்தேர்வுக்குரியது.',
size: 35
};
break;
case "copypaste":
checkbox.subgroup = {
name: 'copypaste',
type: 'input',
label: 'மூல முகவரி: ',
tooltip: 'தெரியுமாயின்.',
size: 50
};
break;
case "expert-subject":
checkbox.subgroup = {
name: 'expertSubject',
type: 'input',
label: 'தொடர்புடைய விக்கித் திட்டத்தின் பெயர்: ',
tooltip: 'விருப்பத்தேர்வுக்குரியது. விக்கித் திட்டத்தின் பெயரை உள்ளிடுவது திறவோர் ஒருவருடன் தொடர்புகொள்ள உதவியாக அமையும். "விக்கிப்பீடியா" முன்னொட்டைச் சேர்க்கவேண்டாம்.'
};
break;
case "globalize":
checkbox.subgroup = {
name: 'globalize',
type: 'select',
list: [
{ label: "{{globalize}}: கட்டுரையானது உலகளாவிய பார்வையில் எழுதப்படவில்லை.", value: "globalize" },
{
label: "பகுதிவாரியாக {{globalize}} துணைவார்ப்புருக்கள்",
list: [
{ label: "{{globalize/Australia}}: அவுத்திரேலியப் பார்வையில் கட்டுரை எழுதப்பட்டுள்ளது.", value: "globalize/Australia" },
{ label: "{{globalize/Canada}}: கனடியப் பார்வையில் கட்டுரை எழுதப்பட்டுள்ளது.", value: "globalize/Canada" },
{ label: "{{globalize/China}}: சீனப் பார்வையில் கட்டுரை எழுதப்பட்டுள்ளது.", value: "globalize/China" },
{ label: "{{globalize/Common law}}: பொதுச் சட்ட நாடுகளின் பார்வையில் கட்டுரை எழுதப்பட்டுள்ளது.", value: "globalize/Common law" },
{ label: "{{globalize/Eng}}: ஆங்கிலப் பார்வையில் கட்டுரை எழுதுப்பட்டுள்ளது.", value: "globalize/Eng" },
{ label: "{{globalize/Europe}}: ஐரோப்பியப் பார்வையில் கட்டுரை எழுதப்பட்டுள்ளது.", value: "globalize/Europe" },
{ label: "{{globalize/France}}: பிரான்சியப் பார்வையில் கட்டுரை எழுதப்பட்டுள்ளது.", value: "globalize/France" },
{ label: "{{globalize/Germany}}: இடாய்ச்சுலாந்துப் பார்வையில் கட்டுரை எழுதப்பட்டுள்ளது.", value: "globalize/Germany" },
{ label: "{{globalize/India}}: இந்தியப் பார்வையில் கட்டுரை எழுதப்பட்டுள்ளது.", value: "globalize/India" },
{ label: "{{globalize/Middle East}}: நடுக்கிழக்குப் பார்வையில் கட்டுரை எழுதப்பட்டுள்ளது.", value: "globalize/Middle East" },
{ label: "{{globalize/North America}}: வட அமெரிக்கப் பார்வையில் கட்டுரை எழுதப்பட்டுள்ளது.", value: "globalize/North America" },
{ label: "{{globalize/Northern}}: வட அரைக்கோளப் பார்வையில் கட்டுரை எழுதப்பட்டுள்ளது.", value: "globalize/Northern" },
{ label: "{{globalize/Southern}}: தென்னரைக்கோளப் பார்வையில் கட்டுரை எழுதப்பட்டுள்ளது.", value: "globalize/Southern" },
{ label: "{{globalize/South Africa}}: தென்னாபிரிக்கப் பார்வையில் கட்டுரை எழுதப்பட்டுள்ளது.", value: "globalize/South Africa" },
{ label: "{{globalize/Sri Lanka}}: இலங்கைப் பார்வையில் கட்டுரை எழுதப்பட்டுள்ளது.", value: "globalize/Sri Lanka" },
{ label: "{{globalize/Ta}}: தமிழ்ப் பார்வையில் கட்டுரை எழுதப்பட்டுள்ளது.", value: "globalize/Ta" },
{ label: "{{globalize/UK}}: பிரித்தானியப் பார்வையில் கட்டுரை எழுதப்பட்டுள்ளது.", value: "globalize/UK" },
{ label: "{{globalize/UK and Canada}}: பிரித்தானிய, கனடியப் பார்வைகளில் கட்டுரை எழுதப்பட்டுள்ளது.", value: "globalize/UK and Canada" },
{ label: "{{globalize/US}}: ஐக்கிய அமெரிக்க நாடுகளின் பார்வையில் கட்டுரை எழுதப்பட்டுள்ளது.", value: "globalize/US" },
{ label: "{{globalize/West}}: மேற்கு நாடுகளின் பார்வையில் கட்டுரை எழுதப்பட்டுள்ளது.", value: "globalize/West" }
]
}
]
};
break;
case "merge":
case "merge from":
case "merge to":
var otherTagName = "merge";
switch (tag)
{
casevalue: "merge from":tag,
label: '{{' + tag + '}}' + (Twinkle.tag.article.flatObject[tag] ? ': ' + Twinkle.tag.article.flatObject[tag].description : ''),
otherTagName = "merge to";
checked: unCheckedTags.indexOf(tag) === -1,
break;
casestyle: "merge to"'font-style: italic'
otherTagName = "merge from";
break;
}
checkbox.subgroup = [
{
name: 'mergeTarget',
type: 'input',
label: 'மற்றக் கட்டுரை(கள்): ',
tooltip: 'ஒன்றுக்கு மேற்பட்ட கட்டுரைகளைக் குறிப்பிடும்போது, அவற்றைப் பின்வருமாறு குழாய் வரியுருக்களால் வேறுபடுத்தவும்: முதலாவது கட்டுரை|இரண்டாவது கட்டுரை'
},
{
name: 'mergeTagOther',
type: 'checkbox',
list: [
{
label: 'மற்றைய கட்டுரையில் {{' + otherTagName + '}} வார்ப்புருவைச் சேர்க்கவும்.',
checked: true,
tooltip: 'ஒரு கட்டுரையின் பெயரை உள்ளிட்டிருந்தால் மட்டுமே பயன்படுத்தலாம்.'
}
]
}
];
if (mw.config.get('wgNamespaceNumber') === 0) {
checkbox.subgroup.push({
name: 'mergeReason',
type: 'textarea',
label: 'ஒன்றிணைப்புக்கான காரணம் (இங்குச் சேர்க்கப்படும்: ' +
(tag === "merge to" ? 'மற்றைய கட்டுரையின்' : 'இக்கட்டுரையின்') + ' பேச்சுப் பக்கம்):',
tooltip: 'விருப்பத்தேர்வுக்குரியது. ஆயினும், பரிந்துரைக்கப்படுகின்றது. தேவைப்படாவிடின், வெற்றாக விடவும். ஒரு கட்டுரையின் பெயரை உள்ளிட்டிருந்தால் மட்டுமே பயன்படுத்தலாம்.'
});
}
break;
case "not Tamil":
case "rough translation":
checkbox.subgroup = [
{
name: 'translationLanguage',
type: 'input',
label: 'கட்டுரை எழுதப்பட்ட மொழி: ',
tooltip: 'தெரியுமாயின்.'
}
];
if (tag === "not Tamil") {
checkbox.subgroup.push({
name: 'translationNotify',
type: 'checkbox',
list: [
{
label: 'கட்டுரையை உருவாக்கியவருக்குத் தெரிவிக்கவும்.',
checked: true,
tooltip: "உருவாக்கியவரின் பேச்சுப் பக்கத்தில் {{uw-nottamil}}ஐ இடும்."
}
]
});
}
break;
case "notability":
checkbox.subgroup = {
name: 'notability',
type: 'select',
list: [
{ label: "{{notability}}: கட்டுரையின் உள்ளடக்கம் பொதுவான குறிப்பிடத்தக்கமை வழிகாட்டலுக்கு அமைவாக இல்லை.", value: "none" },
{ label: "{{notability|Academics}}: கல்வியாளர்களுக்கான குறிப்பிடத்தக்கமை வழிகாட்டல்", value: "Academics" },
{ label: "{{notability|Biographies}}: வாழ்க்கை வரலாறுகளுக்கான குறிப்பிடத்தக்கமை வழிகாட்டல்", value: "Biographies" },
{ label: "{{notability|Books}}: நூல்களுக்கான குறிப்பிடத்தக்கமை வழிகாட்டல்", value: "Books" },
{ label: "{{notability|Companies}}: நிறுவனங்களுக்கும் அமைப்புகளுக்குமான குறிப்பிடத்தக்கமை வழிகாட்டல்கள்", value: "Companies" },
{ label: "{{notability|Events}}: நிகழ்வுகளுக்கான குறிப்பிடத்தக்கமை வழிகாட்டல்", value: "Events" },
{ label: "{{notability|Films}}: திரைப்படங்களுக்கான குறிப்பிடத்தக்கமை வழிகாட்டல்", value: "Films" },
{ label: "{{notability|Places}}: இடங்களுக்கான குறிப்பிடத்தக்கமை வழிகாட்டல்", value: "Places" },
{ label: "{{notability|Music}}: இசைக்கான குறிப்பிடத்தக்கமை வழிகாட்டல்", value: "Music" },
{ label: "{{notability|Neologisms}}: புதுச்சொற்றொடர்களுக்கான குறிப்பிடத்தக்கமை வழிகாட்டல்", value: "Neologisms" },
{ label: "{{notability|Numbers}}: எண்களுக்கான குறிப்பிடத்தக்கமை வழிகாட்டல்", value: "Numbers" },
{ label: "{{notability|Products}}: விளைபொருள்களுக்கும் பணிகளுக்குமான குறிப்பிடத்தக்கமை வழிகாட்டல்", value: "Products" },
{ label: "{{notability|Web}}: வலை உள்ளடக்கத்திற்கான குறிப்பிடத்தக்கமை வழிகாட்டல்", value: "Web" }
]
};
 
break;
checkboxes.push(checkbox);
default:
break});
subdiv.append({
}
return type: 'checkbox;',
name: 'existingTags',
list: checkboxes
});
};
 
 
// categorical sort order
if (sortorder === "'cat"') { // categorical sort order
// function to iterate through the tags and create a checkbox for each one
var doCategoryCheckboxes = function(subdiv, arraysubgroup) {
var checkboxes = [];
$.each(arraysubgroup, function(k, tagitem) {
var description =if (Twinkle.tag.articlealreadyPresentTags.indexOf(item.tags[tag];) === -1) {
checkboxes.push(makeCheckbox(tag, descriptionitem));
}
});
subdiv.append({
type: "'checkbox"',
name: "articleTags"'tags',
list: checkboxes
});
};
 
if (Twinkle.tag.alreadyPresentTags.length > 0) {
var i = 0;
makeCheckboxesForAlreadyPresentTags();
}
var i = 1;
// go through each category and sub-category and append lists of checkboxes
$.each(Twinkle.tag.article.tagCategoriestagList, function(titlegroupName, contentgroup) {
container.append({ type: "'header"', id: "'tagHeader"' + i, label: titlegroupName });
var subdiv = container.append({ type: "'div"', id: "'tagSubdiv"' + i++ });
if ($Array.isArray(contentgroup)) {
doCategoryCheckboxes(subdiv, contentgroup);
} else {
$.each(contentgroup, function(subtitlesubgroupName, subcontentsubgroup) {
subdiv.append({ type: "'div"', label: [ Morebits.htmlNode("'b"', subtitlesubgroupName) ] });
doCategoryCheckboxes(subdiv, subcontentsubgroup);
});
}
});
} else { // alphabetical sort order
}
if (Twinkle.tag.alreadyPresentTags.length > 0) {
// alphabetical sort order
makeCheckboxesForAlreadyPresentTags();
else {
container.append({ type: 'header', id: 'tagHeader1', label: 'Available tags' });
}
 
// Avoid repeatedly resorting
Twinkle.tag.article.alphabeticalList = Twinkle.tag.article.alphabeticalList || Object.keys(Twinkle.tag.article.flatObject).sort();
var checkboxes = [];
$.each(Twinkle.tag.article.tags, alphabeticalList.forEach(function(tag, description) {
if (Twinkle.tag.alreadyPresentTags.indexOf(tag) === -1) {
checkboxes.push(makeCheckbox(tag, description));
checkboxes.push(makeCheckbox(Twinkle.tag.article.flatObject[tag]));
}
});
container.append({
type: "'checkbox"',
name: "articleTags"'tags',
list: checkboxes
});
 
// append any custom tags
if (Twinkle.getFriendlyPrefgetPref('customTagList').length) {
container.append({ type: 'header', label: 'வேறுCustom அடையாளப்படுத்தல்கள்tags' });
container.append({ type: 'checkbox', name: 'articleTagstags', list: Twinkle.getFriendlyPref('customTagList') });
list: Twinkle.getPref('customTagList').map(function(el) {
el.checked = Twinkle.tag.checkedTags.indexOf(el.value) !== -1;
return el;
})
});
}
 
var $workarea = $(e.target.form).find("div'#tagWorkArea"');
var rendered = container.render();
$workarea.empty().append(rendered);
 
// for quick filter:
$allCheckboxDivs = $workarea.find('[name=tags], [name=existingTags]').parent();
$allHeaders = $workarea.find('h5, .quickformDescription');
form.quickfilter.value = ''; // clear search, because the search results are not preserved over mode change
form.quickfilter.focus();
 
// style adjustments
$workarea.find("'h5"').css({ 'font-size': '110%' });
$workarea.find("'h5:not(:first-child)"').css({ 'margin-top': '1em' });
$workarea.find("'div"').filter("':has(span.quickformDescription)"').css({ 'margin-top': '0.4em' });
 
Morebits.quickForm.getElements(form, 'existingTags').forEach(generateLinks);
// add a link to each template's description page
$.each(Morebits.quickForm.getElements(e.target.form, "articleTags"'tags'), function.forEach(index, checkboxgenerateLinks) {;
 
var $checkbox = $(checkbox);
// tally tags added/removed, update statusNode text
var link = Morebits.htmlNode("a", ">");
var statusNode = document.getElementById('tw-tag-status');
link.setAttribute("class", "tag-template-link");
$('[name=tags], [name=existingTags]').click(function() {
link.setAttribute("href", mw.util.getUrl("Template:" +
if (this.name === 'tags') {
Morebits.string.toUpperCaseFirstChar(checkbox.values)));
Twinkle.tag.status.numAdded += this.checked ? 1 : -1;
link.setAttribute("target", "_blank");
} else if (this.name === 'existingTags') {
$checkbox.parent().append(["\u00A0", link]);
Twinkle.tag.status.numRemoved += this.checked ? -1 : 1;
}
 
var firstPart = 'Adding ' + Twinkle.tag.status.numAdded + ' tag' + (Twinkle.tag.status.numAdded > 1 ? 's' : '');
var secondPart = 'Removing ' + Twinkle.tag.status.numRemoved + ' tag' + (Twinkle.tag.status.numRemoved > 1 ? 's' : '');
statusNode.textContent =
(Twinkle.tag.status.numAdded ? ' ' + firstPart : '') +
(Twinkle.tag.status.numRemoved ? (Twinkle.tag.status.numAdded ? '; ' : ' ') + secondPart : '');
});
};
 
/**
* Adds a link to each template's description page
* @param {Morebits.quickForm.element} checkbox associated with the template
*/
var generateLinks = function(checkbox) {
var link = Morebits.htmlNode('a', '>');
link.setAttribute('class', 'tag-template-link');
var tagname = checkbox.values;
link.setAttribute('href', mw.util.getUrl(
(tagname.indexOf(':') === -1 ? 'Template:' : '') +
(tagname.indexOf('|') === -1 ? tagname : tagname.slice(0, tagname.indexOf('|')))
));
link.setAttribute('target', '_blank');
$(checkbox).parent().append(['\u00A0', link]);
};
 
// Tags for ARTICLES start here
 
// Tags for ARTICLES start here
Twinkle.tag.article = {};
 
// Shared across {{Rough translation}} and {{Not English}}
// A list of all article tags, in alphabetical order
var translationSubgroups = [
// To ensure tags appear in the default "categorized" view, add them to the tagCategories hash below.
{
name: 'translationLanguage',
parameter: '1',
type: 'input',
label: 'Language of article (if known): ',
tooltip: 'Consider looking at [[WP:LRC]] for help. If listing the article at PNT, please try to avoid leaving this box blank, unless you are completely unsure.'
}
].concat(mw.config.get('wgNamespaceNumber') === 0 ? [
{
type: 'checkbox',
list: [ {
name: 'translationPostAtPNT',
label: 'List this article at Wikipedia:Pages needing translation into English (PNT)',
checked: true
} ]
},
{
name: 'translationComments',
type: 'textarea',
label: 'Additional comments to post at PNT',
tooltip: 'Optional, and only relevant if "List this article ..." above is checked.'
}
] : []);
 
// Subgroups for {{merge}}, {{merge-to}} and {{merge-from}}
Twinkle.tag.article.tags = {
var getMergeSubgroups = function(tag) {
"advert": "ஒரு விளம்பரத்தைப் போல் எழுதப்பட்ட கட்டுரை.",
var otherTagName = 'Merge';
"all plot": "ஏறத்தாழ, கதைச்சுருக்கத்தை மட்டுமே கொண்டுள்ள கட்டுரை.",
switch (tag) {
"autobiography": "கட்டுரை ஒரு தன்வரலாறாகும். நடுநிலையாக எழுதப்படாதிருக்க வாய்ப்புண்டு.",
case 'Merge from':
"BLP sources": "வாழும் மனிதரின் வாழ்க்கை வரலாற்றுக் கட்டுரைக்கு, மெய்யறிதன்மைக்காக மேலதிக மேற்கோள்கள் தேவை.",
otherTagName = 'Merge to';
"BLP unsourced": "எந்தவொரு மேற்கோளும் இல்லா வாழும் மனிதரின் வாழ்க்கை வரலாற்றுக் கட்டுரை.",
break;
"citation style": "தெளிவிற்ற அல்லது பொருத்தமற்ற வரியுட்சான்றுகளைக் கொண்டுள்ள கட்டுரை.",
case 'Merge to':
"cleanup": "துப்புரவு செய்யவேண்டிய கட்டுரை.",
otherTagName = 'Merge from';
"cleanup-reorganize": "தமிழ் விக்கிப்பீடியாவின் வடிவமைப்பு வழிகாட்டல்களுக்கு அமைவாக மீள ஒழுங்குபடுத்தவேண்டிய கட்டுரை.",
break;
"close paraphrasing": "கட்டற்றதாக அமைந்திராத, பதிப்புரிமையுள்ள மூலத்திலிருந்து நெருங்கிய பொழிப்புரையைக் கொண்டுள்ள கட்டுரை.",
// no default
"COI": "கட்டுரையை உருவாக்கியவரோ கூடிய பங்களிப்புகளை வழங்கியவரோ ஆதாய முரணுடையவராக இருக்கலாம்.",
}
"condense": "உள்ளடக்கத்தைப் பிரிக்கும் வகையிலமைந்த பகுதித் தலைப்புகளை மிகவும் கூடவாகக் கொண்டுள்ள கட்டுரை.",
return [
"confusing": "குழப்பமான அல்லது தெளிவற்ற கட்டுரை.",
{
"context": "போதுமான அளவு அறிமுகத்தைக் கொண்டிராத கட்டுரை.",
name: 'mergeTarget',
"copy edit": "இலக்கணம், நடை, தொடர்ச்சி, தொனி, எழுத்துப்பிழைகள் போன்றவற்றுக்காகப் படித்தொகுப்புச் செய்யவேண்டிய கட்டுரை.",
type: 'input',
"copypaste": "ஒரு மூலத்திலிருந்து படியெடுத்து ஒட்டப்பட்டதாகத் தோன்றும் கட்டுரை.",
label: 'Other article(s): ',
"dead end": "பிற கட்டுரைகளுக்கு எந்தவொரு இணைப்பையும் கொண்டிராத கட்டுரை.",
tooltip: 'If specifying multiple articles, separate them with pipe characters: Article one|Article two',
"disputed": "கருத்துத் தவறின்மை கேள்விக்குரியதாக உள்ள கட்டுரை.",
required: true
"essay-like": "தனிப்பட்ட கருத்துத் தொனிக்குமாறு எழுதப்பட்டுள்ள கட்டுரை.",
},
"expand language": "பிறமொழி விக்கிப்பீடியாவிலுள்ள உள்ளடக்கத்தைப் பயன்படுத்தி, விரிவாக்கக்கூடிய கட்டுரை.",
{
"expert-subject": "ஒரு திறவோரின் கவனம் தேவைப்படும் கட்டுரை.",
type: 'checkbox',
"external links": "உள்ளடக்கக் கொள்கைகளுக்கோ வழிகாட்டல்களுக்கோ அமையாத வகையில், வெளியிணைப்புகளைக் கொண்டுள்ள கட்டுரை.",
list: [
"fansite": "ஆர்வலர்தளத்தைப் போலுள்ள கட்டுரை.",
{
"fiction": "தகவலுக்கும் புனைவுக்கும் வேறுபாடு காட்டப்படாத கட்டுரை.",
name: 'mergeTagOther',
"globalize": "உலகளாவிய பார்வையில் எழுதப்படாத கட்டுரை.",
label: 'Tag the other article with a {{' + otherTagName + '}} tag',
"hoax": "உண்மைத்தன்மை கேள்விக்குரியதாக உள்ள கட்டுரை.",
checked: true,
"improve categories": "மேலதிகப் பகுப்புகள் தேவைப்படும் கட்டுரை.",
tooltip: 'Only available if a single article name is entered.'
"incomprehensible": "புரிந்துகொள்ளக் கடினமாக உள்ள கட்டுரை.",
}
"in-universe": "கட்டுரை உள்ளடக்கம் புனைவாக உள்ளது. புனைவல்லாப் பார்வையில் கட்டுரை மீள எழுதப்படவேண்டும்.",
]
"in use": "சிறிய நேரத்திற்குக் கட்டுரையில் பெரிய தொகுப்பு மேற்கொள்ளப்படுகின்றது.",
}
"lead missing": "கட்டுரையில் முன்னுரை எழுதப்படவில்லை. ஒரு முன்னுரை எழுதப்படவேண்டும்.",
].concat(mw.config.get('wgNamespaceNumber') === 0 ? {
"lead rewrite": "வழிகாட்டல்களுக்கமைவாக முன்னுரை மாற்றியெழுதப்படவேண்டிய கட்டுரை.",
name: 'mergeReason',
"lead too long": "கட்டுரையின் முன்னுரை மிகவும் நீளமாக உள்ளது. முன்னுரையைச் சுருக்கவேண்டும்.",
type: 'textarea',
"lead too short": "கட்டுரையின் முன்னுரை மிகவுங் குறுகியதாக உள்ளது. முன்னுரையை விரிவாக்கவேண்டும்.",
label: 'Rationale for merge (will be posted on ' +
"linkrot": "கட்டுரையானது முகவரிகளை மட்டும் மேற்கோள்களாகக் காட்டுகின்றது. இணைப்புடைவு நேரிட வாய்ப்புண்டு.",
(tag === 'Merge to' ? 'the other article\'s' : 'this article\'s') + ' talk page):',
"manual": "கைந்நூல் அல்லது வழிகாட்டி போல் எழுதப்பட்ட கட்டுரை.",
tooltip: 'Optional, but strongly recommended. Leave blank if not wanted. Only available if a single article name is entered.'
"merge": "இன்னொரு கட்டுரையுடன் ஒன்றிணைக்கவேண்டிய கட்டுரை.",
} : []);
"merge from": "இன்னொரு கட்டுரை, இதனுடன் ஒன்றிணைக்கப்படவேண்டும்.",
"merge to": "இன்னொரு கட்டுரையினுள் இது ஒன்றிணைக்கப்படவேண்டும்.",
"metricate": "அளவீடுகளுக்கு, அனைத்துலகமுறையல்லா அலகுகளை மட்டும் பயன்படுத்தும் கட்டுரை.",
"more footnotes": "கட்டுரை சில மேற்கோள்களைக் கொண்டுள்ளது. ஆயினும், போதுமான அளவு உரையுட்சான்றுகள் இல்லை.",
"news release": "செய்தி போலுள்ள கட்டுரை.",
"no footnotes": "கட்டுரை மேற்கோள்களைக் கொண்டுள்ளது. ஆயினும், எந்தவொரு உரையுட்சான்றும் இல்லை.",
"non-free": "பதிப்புரிமையுள்ள உள்ளடக்கங்களை மிகையாகவோ முறையற்ற வகையிலோ பயன்படுத்தியிருக்கக்கூடிய கட்டுரை.",
"notability": "குறிப்பிடத்தக்கமை வழிகாட்டலுக்கு அமைவாக இல்லாத கட்டுரை.",
"not Tamil": "கட்டுரை வேறொரு மொழியில் எழுதப்பட்டுள்ளது. கட்டுரையை மொழிபெயர்க்கவேண்டும்.",
"one source": "ஒரு மூலத்தில் மட்டுமே பெரிய அளவில் தங்கியுள்ள கட்டுரை.",
"original research": "சொந்த ஆய்வு அல்லது உறுதிப்படுத்தப்படாத கருத்துகளைக் கொண்டுள்ள கட்டுரை.",
"orphan": "வேறொரு கட்டுரையிலும் இணைக்கப்படாத கட்டுரை.",
"overcoverage": "குறிப்பிட்ட பகுதி(கள்) மீது, கோடிய பார்வையைக் கொண்டுள்ள கட்டுரை.",
"overlinked": "பொருத்தமற்ற அல்லது இரட்டிப்பு இணைப்புகளைக் கூடுதலாகக் கொண்டுள்ள கட்டுரை.",
"overly detailed": "சிக்கலான உள்ளடக்கத்தை மிகையாகக் கொண்டுள்ள கட்டுரை.",
"peacock": "தகவல்களை வழங்காமல், விளம்பரப்படுத்தும் நோக்கில் அமையும் சொற்களைக் கொண்டிருக்கக்கூடிய கட்டுரை.",
"plot": "மிக நீளமான கதைச் சுருக்கத்தைக் கொண்டுள்ள கட்டுரை.",
"POV": "நடுநிலையான பார்வையில் எழுதப்படாத கட்டுரை.",
"primary sources": "கட்டுரையானது முதனிலை மூலங்களில் கூடுதலாகத் தங்கியுள்ளது. இரண்டாம் நிலை மூலங்கள் சேர்க்கப்படவேண்டும்.",
"prose": "கட்டுரையானது பட்டியல் வடிவிலுள்ளது. உரைநடை வடிவில் சிறப்பாக எழுதப்படலாம்.",
"recentism": "அண்மைய நிகழ்வுகள் சார்பாக எழுதப்பட்ட கட்டுரை.",
"refimprove": "சரிபார்ப்பதற்காக மேலதிக மேற்கோள்களோ மூலங்களோ தேவைப்படும் கட்டுரை.",
"rough translation": "கட்டுரை மோசமாக மொழிபெயர்க்கப்பட்டுள்ளது. துப்புரவும் செய்யப்படவேண்டும்.",
"sections": "பகுதிகளாக உடைக்கவேண்டடிய கட்டுரை.",
"self-published": "தன்வெளியீட்டு மூலங்கள் பொருத்தமற்ற வகையில் மேற்கோள்களாகக் கையாளப்பட்டுள்ள கட்டுரை.",
"technical": "கட்டுரை தொடர்பான அறிவுகுறைந்த வாசகருக்குச் சிக்கலாகத் தோன்றக்கூடிய கட்டுரை.",
"tense": "பொருத்தமற்ற காலத்தில் எழுதப்பட்ட கட்டுரை.",
"third-party": "கட்டுரையானது தொடர்புடைய மூலங்களில் கூடுதலாகத் தங்கியுள்ளது. மூன்றாம் நிலை மூலங்கள் சேர்க்கப்படவேண்டும்.",
"tone": "பொருத்தமற்ற தொனியில் எழுதப்பட்ட கட்டுரை.",
"too few opinions": "குறிப்பிடத்தக்க பார்வைகள் அனைத்தையும் உள்ளடக்காத கட்டுரை.",
"uncategorized": "பகுப்பில்லாத கட்டுரை.",
"under construction": "விரிவாக்கவேலை அல்லது பெருஞ்சீரமைப்பு நடைபெற்றுக்கொண்டிருக்கும் கட்டுரை.",
"underlinked": "மேலதிக விக்கியிணைப்புகள் சேர்க்கப்படவேண்டிய கட்டுரை.",
"undue": "உள்ளடக்கத்தின் சில பார்வைகளுக்கு அளவுக்குமீறிய முகாமை கொடுக்கும் கட்டுரை.",
"unfocused": "கட்டுரையின் கவனஞ்சிதறியுள்ளது. அல்லது கட்டுரை ஒரு தலைப்புக்கு மேலாக எழுதப்பட்டுள்ளது.",
"unreferenced": "எந்தவொரு மேற்கோளும் இல்லாத கட்டுரை.",
"unreliable sources": "நம்பகத்தன்மையற்ற மூலங்களை மேற்கோள்களாகக் கொண்டுள்ள கட்டுரை.",
"update": "இற்றைப்படுத்திய தகவல்கள் சேர்க்கப்படவேண்டிய கட்டுரை.",
"very long": "மிக நீளமான கட்டுரை.",
"weasel": "திசைமாற்றும் சொற்களால் நடுநிலைநோக்கிலிருந்து தவறியுள்ள கட்டுரை."
};
 
// Tags arranged by category; will be used to generate the alphabetical list,
// A list of tags in order of category
// Tagsbut tags should be in alphabetical order within the categories
// excludeMI: true indicate a tag that *does not* work inside {{multiple issues}}
// Add new categories with discretion - the list is long enough as is!
Twinkle.tag.article.tagList = {
 
'Cleanup and maintenance tags': {
Twinkle.tag.article.tagCategories = {
'General cleanup': [
"துப்புரவு, பேணுகை அடையாளப்படுத்தல்கள்": {
{
"பொதுவான துப்புரவு": [
tag: 'Cleanup', description: 'requires cleanup',
"cleanup", // has a subgroup with text input
"copy edit" // has a subgroup: with text input{
name: 'cleanup',
parameter: 'reason',
type: 'input',
label: 'Specific reason why cleanup is needed: ',
tooltip: 'Required.',
size: 35,
required: true
}
}, // has a subgroup with text input
{
tag: 'Cleanup rewrite',
description: "needs to be rewritten entirely to comply with Wikipedia's quality standards"
},
{
tag: 'Copy edit',
description: 'requires copy editing for grammar, style, cohesion, tone, or spelling',
subgroup: {
name: 'copyEdit',
parameter: 'for',
type: 'input',
label: '"This article may require copy editing for..." ',
tooltip: 'e.g. "consistent spelling". Optional.',
size: 35
}
} // has a subgroup with text input
],
'Potentially unwanted content': [
"கூடிய அளவில் தேவையற்ற உள்ளடக்கம்": [
{
"close paraphrasing",
tag: 'Close paraphrasing',
"copypaste", // has a subgroup with text input
description: 'contains close paraphrasing of a non-free copyrighted source',
"external links",
subgroup: {
"non-free"
name: 'closeParaphrasing',
parameter: 'source',
type: 'input',
label: 'Source: ',
tooltip: 'Source that has been closely paraphrased'
}
},
{
tag: 'Copypaste',
description: 'appears to have been copied and pasted from another location',
excludeMI: true,
subgroup: {
name: 'copypaste',
parameter: 'url',
type: 'input',
label: 'Source URL: ',
tooltip: 'If known.',
size: 50
}
}, // has a subgroup with text input
{ tag: 'External links', description: 'external links may not follow content policies or guidelines' },
{ tag: 'Non-free', description: 'may contain excessive or improper use of copyrighted materials' }
],
'Structure, formatting, and lead section': [
"கட்டமைப்பு, வடிவமைப்பு, முன்னுரை": [
{ tag: 'Cleanup reorganize', description: "needs reorganization to comply with Wikipedia's layout guidelines" },
"cleanup-reorganize",
{ tag: 'Lead missing', description: 'no lead section' },
"condense",
{ tag: 'Lead rewrite', description: 'lead section needs to be rewritten to comply with guidelines' },
"lead missing",
{ tag: 'Lead too long', description: 'lead section is too long for the length of the article' },
"lead rewrite",
{ tag: 'Lead too short', description: 'lead section is too short and should be expanded to summarize key points' },
"lead too long",
{ tag: 'Sections', description: 'needs to be divided into sections by topic' },
"lead too short",
{ tag: 'Too many sections', description: 'too many section headers dividing up content, should be condensed' },
"sections",
{ tag: 'Very long', description: 'too long to read and navigate comfortably' }
"very long"
],
'Fiction-related cleanup': [
"புனைவுசார் துப்புரவு": [
{ tag: 'All plot', description: 'almost entirely a plot summary' },
"all plot",
{ tag: 'Fiction', description: 'fails to distinguish between fact and fiction' },
"fiction",
{ tag: 'In-universe', description: 'subject is fictional and needs rewriting to provide a non-fictional perspective' },
"in-universe",
{ tag: 'Long plot', description: 'plot summary is too long or excessively detailed' },
"plot"
{ tag: 'No plot', description: 'needs a plot summary' }
]
},
'General content issues': {
"பொதுவான உள்ளடக்கச் சிக்கல்கள்": {
'Importance and notability': [
"இன்றியமையாமையும் குறிப்பித்தக்கமையும்": [
{ tag: 'Notability', description: 'subject may not meet the general notability guideline',
"notability" // has a subgroup with subcategories
subgroup: {
name: 'notability',
parameter: '1',
type: 'select',
list: [
{ label: "{{notability}}: article's subject may not meet the general notability guideline", value: '' },
{ label: '{{notability|Academics}}: notability guideline for academics', value: 'Academics' },
{ label: '{{notability|Astro}}: notability guideline for astronomical objects', value: 'Astro' },
{ label: '{{notability|Biographies}}: notability guideline for biographies', value: 'Biographies' },
{ label: '{{notability|Books}}: notability guideline for books', value: 'Books' },
{ label: '{{notability|Companies}}: notability guidelines for companies and organizations', value: 'Companies' },
{ label: '{{notability|Events}}: notability guideline for events', value: 'Events' },
{ label: '{{notability|Films}}: notability guideline for films', value: 'Films' },
{ label: '{{notability|Geographic}}: notability guideline for geographic features', value: 'Geographic' },
{ label: '{{notability|Lists}}: notability guideline for stand-alone lists', value: 'Lists' },
{ label: '{{notability|Music}}: notability guideline for music', value: 'Music' },
{ label: '{{notability|Neologisms}}: notability guideline for neologisms', value: 'Neologisms' },
{ label: '{{notability|Numbers}}: notability guideline for numbers', value: 'Numbers' },
{ label: '{{notability|Products}}: notability guideline for products and services', value: 'Products' },
{ label: '{{notability|Sports}}: notability guideline for sports and athletics', value: 'Sports' },
{ label: '{{notability|Television}}: notability guideline for television shows', value: 'Television' },
{ label: '{{notability|Web}}: notability guideline for web content', value: 'Web' }
]
}
}
],
'Style of writing': [
"எழுத்து நடை": [
{ tag: 'Advert', description: 'written like an advertisement' },
"advert",
{ tag: 'Cleanup tense', description: 'does not follow guidelines on use of different tenses.' },
"essay-like",
{ tag: 'Essay-like', description: 'written like a personal reflection, personal essay, or argumentative essay' },
"fansite",
{ tag: 'Fanpov', description: "written from a fan's point of view" },
"manual",
{ tag: 'Like resume', description: 'written like a resume' },
"news release",
{ tag: 'Manual', description: 'written like a manual or guidebook' },
"prose",
{ tag: 'Cleanup-PR', description: 'reads like a press release or news article',
"technical",
subgroup: {
"tense",
type: 'hidden',
"tone"
name: 'cleanupPR1',
parameter: '1',
value: 'article'
}
},
{ tag: 'Over-quotation', description: 'too many or too-lengthy quotations for an encyclopedic entry' },
{ tag: 'Prose', description: 'written in a list format but may read better as prose' },
{ tag: 'Technical', description: 'too technical for most readers to understand' },
{ tag: 'Tone', description: 'tone or style may not reflect the encyclopedic tone used on Wikipedia' }
],
'Sense (or lack thereof)': [
"புரிதல்": [
"{ tag: 'Confusing', description: 'confusing" or unclear' },
"{ tag: 'Incomprehensible', description: 'very hard to understand or incomprehensible"' },
{ tag: 'Unfocused', description: 'lacks focus or is about more than one topic' }
"unfocused"
],
'Information and detail': [
"தகவலும் விவரமும்": [
{ tag: 'Context', description: 'insufficient context for those unfamiliar with the subject' },
"context",
{ tag: 'Expert needed', description: 'needs attention from an expert on the subject',
"expert-subject",
subgroup: [
"metricate",
{
"overly detailed",
name: 'expertNeeded',
"undue"
parameter: '1',
type: 'input',
label: 'Name of relevant WikiProject: ',
tooltip: 'Optionally, enter the name of a WikiProject which might be able to help recruit an expert. Don\'t include the "WikiProject" prefix.'
},
{
name: 'expertNeededReason',
parameter: 'reason',
type: 'input',
label: 'Reason: ',
tooltip: 'Short explanation describing the issue. Either Reason or Talk link is required.'
},
{
name: 'expertNeededTalk',
parameter: 'talk',
type: 'input',
label: 'Talk discussion: ',
tooltip: 'Name of the section of this article\'s talk page where the issue is being discussed. Do not give a link, just the name of the section. Either Reason or Talk link is required.'
}
]
},
{ tag: 'Overly detailed', description: 'excessive amount of intricate detail' },
{ tag: 'Undue weight', description: 'lends undue weight to certain ideas, incidents, or controversies' }
],
'Timeliness': [
"நேரந்தவறாமை": [
{ tag: 'Current', description: 'documents a current event', excludeMI: true }, // Works but not intended for use in MI
"update"
{ tag: 'Update', description: 'needs additional up-to-date information added' }
],
'Neutrality, bias, and factual accuracy': [
"நடுநிலை நோக்கு, கோடல், தகவலின் துல்லியம்": [
{ tag: 'Autobiography', description: 'autobiography and may not be written neutrally' },
"autobiography",
{ tag: 'COI', description: 'creator or major contributor may have a conflict of interest' },
"COI",
{ tag: 'Disputed', description: 'questionable factual accuracy' },
"disputed",
{ tag: 'Hoax', description: 'may partially or completely be a hoax' },
"hoax",
{ tag: 'Globalize', description: 'may not represent a worldwide view of the subject',
"globalize", // has a subgroup with subcategories
subgroup: [
"overcoverage",
"peacock", {
type: 'hidden',
"POV",
name: 'globalize1',
"recentism",
parameter: '1',
"too few opinions",
value: 'article'
"weasel"
}, {
name: 'globalizeRegion',
parameter: '2',
type: 'input',
label: 'Over-represented country or region'
}
]
},
{ tag: 'Over-coverage', description: 'extensive bias or disproportional coverage towards one or more specific regions' },
{ tag: 'Paid contributions', description: 'contains paid contributions, and may therefore require cleanup' },
{ tag: 'Peacock', description: 'contains wording that promotes the subject in a subjective manner without adding information' },
{ tag: 'POV', description: 'does not maintain a neutral point of view' },
{ tag: 'Recentism', description: 'slanted towards recent events' },
{ tag: 'Too few opinions', description: 'may not include all significant viewpoints' },
{ tag: 'Undisclosed paid', description: 'may have been created or edited in return for undisclosed payments' },
{ tag: 'Weasel', description: 'neutrality or verifiability is compromised by the use of weasel words' }
],
'Verifiability and sources': [
"மெய்யறிதன்மையும் மூலங்களும்": [
{ tag: 'BLP sources', description: 'BLP that needs additional sources for verification' },
"BLP sources",
{ tag: 'BLP unsourced', description: 'BLP that has no sources at all (use BLP PROD instead for new articles)' },
"BLP unsourced",
{ tag: 'More citations needed', description: 'needs additional references or sources for verification' },
"one source",
{ tag: 'One source', description: 'relies largely or entirely on a single source' },
"original research",
{ tag: 'Original research', description: 'contains original research' },
"primary sources",
{ tag: 'Primary sources', description: 'relies too much on references to primary sources, and needs secondary sources' },
"refimprove",
{ tag: 'Self-published', description: 'contains excessive or inappropriate references to self-published sources' },
"self-published",
{ tag: 'Sources exist', description: 'notable topic, sources are available that could be added to article' },
"third-party",
{ tag: 'Third-party', description: 'relies too heavily on sources too closely associated with the subject' },
"unreferenced",
{ tag: 'Unreferenced', description: 'does not cite any sources at all' },
"unreliable sources"
{ tag: 'Unreliable sources', description: 'some references may not be reliable' }
]
},
'Specific content issues': {
"உள்ளடக்கச் சிக்கல்கள்": {
"'Language"': [
{ tag: 'Not English', description: 'written in a language other than English and needs translation',
"not Tamil", // has a subgroup with several options
excludeMI: true,
"rough translation", // has a subgroup with several options
subgroup: translationSubgroups.slice(0, 1).concat([{
"expand language"
type: 'checkbox',
list: [
{
name: 'translationNotify',
label: 'Notify article creator',
checked: true,
tooltip: "Places {{uw-notenglish}} on the creator's talk page."
}
]
}]).concat(translationSubgroups.slice(1))
},
{ tag: 'Rough translation', description: 'poor translation from another language', excludeMI: true,
subgroup: translationSubgroups
},
{ tag: 'Expand language', description: 'should be expanded with text translated from a foreign-language article',
excludeMI: true,
subgroup: [{
type: 'hidden',
name: 'expandLangTopic',
parameter: 'topic',
value: '',
required: true // force empty topic param in output
}, {
name: 'expandLanguageLangCode',
parameter: 'langcode',
type: 'input',
label: 'Language code: ',
tooltip: 'Language code of the language from which article is to be expanded from',
required: true
}, {
name: 'expandLanguageArticle',
parameter: 'otherarticle',
type: 'input',
label: 'Name of article: ',
tooltip: 'Name of article to be expanded from, without the interwiki prefix'
}]
}
],
'Links': [
"இணைப்புகள்": [
{ tag: 'Dead end', description: 'article has no links to other articles' },
"dead end",
{ tag: 'Orphan', description: 'linked to from no other articles' },
"orphan",
{ tag: 'Overlinked', description: 'too many duplicate and/or irrelevant links to other articles' },
"overlinked",
{ tag: 'Underlinked', description: 'needs more wikilinks to other articles' }
"underlinked"
],
'Referencing technique': [
"மேற்கோளிடும் நுட்பம்": [
"{ tag: 'Citation style', description: 'unclear or inconsistent citation style"' },
{ tag: 'Cleanup bare URLs', description: 'uses bare URLs for references, which are prone to link rot' },
"linkrot",
{ tag: 'More footnotes', description: 'has some references, but insufficient inline citations' },
"more footnotes",
{ tag: 'No footnotes', description: 'has references, but lacks inline citations' }
"no footnotes"
],
'Categories': [
"பகுப்புகள்": [
{ tag: 'Improve categories', description: 'needs additional or more specific categories', excludeMI: true },
"improve categories",
{ tag: 'Uncategorized', description: 'not added to any categories', excludeMI: true }
"uncategorized"
]
},
'Merging': [
"ஒன்றிணைப்பு": [ // these three have a subgroup with several options
{
"merge",
tag: 'History merge',
"merge from",
description: 'another page should be history merged into this one',
"merge to"
excludeMI: true,
subgroup: [
{
name: 'histmergeOriginalPage',
parameter: 'originalpage',
type: 'input',
label: 'Other article: ',
tooltip: 'Name of the page that should be merged into this one (required).',
required: true
},
{
name: 'histmergeReason',
parameter: 'reason',
type: 'input',
label: 'Reason: ',
tooltip: 'Short explanation describing the reason a history merge is needed. Should probably begin with "because" and end with a period.'
},
{
name: 'histmergeSysopDetails',
parameter: 'details',
type: 'input',
label: 'Extra details: ',
tooltip: 'For complex cases, provide extra instructions for the reviewing administrator.'
}
]
},
{ tag: 'Merge', description: 'should be merged with another given article', excludeMI: true,
subgroup: getMergeSubgroups('Merge') },
{ tag: 'Merge from', description: 'another given article should be merged into this one', excludeMI: true,
subgroup: getMergeSubgroups('Merge from') },
{ tag: 'Merge to', description: 'should be merged into another given article', excludeMI: true,
subgroup: getMergeSubgroups('Merge to') }
],
'Informational': [
"அறிவிப்பு": [
{ tag: 'GOCEinuse', description: 'currently undergoing a major copy edit by the Guild of Copy Editors', excludeMI: true },
"in use",
{ tag: 'In use', description: 'undergoing a major edit for a short while', excludeMI: true },
"under construction"
{ tag: 'Under construction', description: 'in the process of an expansion or major restructuring', excludeMI: true }
]
};
 
// Tags for REDIRECTS start here
// Not by policy, but the list roughly approximates items with >500
// transclusions from Template:R template index
Twinkle.tag.redirectList = {
'Grammar, punctuation, and spelling': {
'Abbreviation': [
{ tag: 'R from acronym', description: 'redirect from an acronym (e.g. POTUS) to its expanded form' },
{ tag: 'R from initialism', description: 'redirect from an initialism (e.g. AGF) to its expanded form' },
{ tag: 'R from MathSciNet abbreviation', description: 'redirect from MathSciNet publication title abbreviation to the unabbreviated title' },
{ tag: 'R from NLM abbreviation', description: 'redirect from a NLM publication title abbreviation to the unabbreviated title' }
],
'Capitalisation': [
{ tag: 'R from CamelCase', description: 'redirect from a CamelCase title' },
{ tag: 'R from other capitalisation', description: 'redirect from a title with another method of capitalisation' },
{ tag: 'R from miscapitalisation', description: 'redirect from a capitalisation error' }
],
'Grammar & punctuation': [
{ tag: 'R from modification', description: 'redirect from a modification of the target\'s title, such as with words rearranged' },
{ tag: 'R from plural', description: 'redirect from a plural word to the singular equivalent' },
{ tag: 'R to plural', description: 'redirect from a singular noun to its plural form' }
],
'Parts of speech': [
{ tag: 'R from verb', description: 'redirect from an English-language verb or verb phrase' },
{ tag: 'R from adjective', description: 'redirect from an adjective (word or phrase that describes a noun)' }
],
'Spelling': [
{ tag: 'R from alternative spelling', description: 'redirect from a title with a different spelling' },
{ tag: 'R from ASCII-only', description: 'redirect from a title in only basic ASCII to the formal title, with differences that are not diacritical marks or ligatures' },
{ tag: 'R from diacritic', description: 'redirect from a page name that has diacritical marks (accents, umlauts, etc.)' },
{ tag: 'R to diacritic', description: 'redirect to the article title with diacritical marks (accents, umlauts, etc.)' },
{ tag: 'R from misspelling', description: 'redirect from a misspelling or typographical error' }
]
},
'Alternative names': {
General: [
{
tag: 'R from alternative language',
description: 'redirect from or to a title in another language',
subgroup: [
{
name: 'altLangFrom',
type: 'input',
label: 'From language (two-letter code): ',
tooltip: 'Enter the two-letter code of the language the redirect name is in; such as en for English, de for German'
},
{
name: 'altLangTo',
type: 'input',
label: 'To language (two-letter code): ',
tooltip: 'Enter the two-letter code of the language the target name is in; such as en for English, de for German'
},
{
name: 'altLangInfo',
type: 'div',
label: $.parseHTML('<p>For a list of language codes, see <a href="/wiki/Wp:Template_messages/Redirect_language_codes">Wikipedia:Template messages/Redirect language codes</a></p>')
}
]
},
{ tag: 'R from alternative name', description: 'redirect from a title that is another name, a pseudonym, a nickname, or a synonym' },
{ tag: 'R from ambiguous sort name', description: 'redirect from an ambiguous sort name to a page or list that disambiguates it' },
{ tag: 'R from former name', description: 'redirect from a former name or working title' },
{ tag: 'R from historic name', description: 'redirect from a name with a significant historic past as a region, city, etc. no longer known by that name' },
{ tag: 'R from incomplete name', description: 'R from incomplete name' },
{ tag: 'R from incorrect name', description: 'redirect from an erroneus name that is unsuitable as a title' },
{ tag: 'R from less specific name', description: 'redirect from a less specific title to a more specific, less general one' },
{ tag: 'R from long name', description: 'redirect from a more complete title' },
{ tag: 'R from more specific name', description: 'redirect from a more specific title to a less specific, more general one' },
{ tag: 'R from short name', description: 'redirect from a title that is a shortened form of a person\'s full name, a book title, or other more complete title' },
{ tag: 'R from sort name', description: 'redirect from the target\'s sort name, such as beginning with their surname rather than given name' },
{ tag: 'R from synonym', description: 'redirect from a semantic synonym of the target page title' }
],
People: [
{ tag: 'R from birth name', description: 'redirect from a person\'s birth name to a more common name' },
{ tag: 'R from given name', description: 'redirect from a person\'s given name' },
{ tag: 'R from name with title', description: 'redirect from a person\'s name preceded or followed by a title to the name with no title or with the title in parentheses' },
{ tag: 'R from person', description: 'redirect from a person or persons to a related article' },
{ tag: 'R from personal name', description: 'redirect from an individual\'s personal name to an article titled with their professional or other better known moniker' },
{ tag: 'R from pseudonym', description: 'redirect from a pseudonym' },
{ tag: 'R from surname', description: 'redirect from a title that is a surname' }
],
Technical: [
{ tag: 'R from drug trade name', description: 'redirect from (or to) the trade name of a drug to (or from) the international nonproprietary name (INN)' },
{ tag: 'R from filename', description: 'redirect from a title that is a filename of the target' },
{ tag: 'R from molecular formula', description: 'redirect from a molecular/chemical formula to its technical or trivial name' },
 
{ tag: 'R from gene symbol', description: 'redirect from a Human Genome Organisation (HUGO) symbol for a gene to an article about the gene' }
Twinkle.tag.spellingList = [
],
{
Organisms: [
label: '{{R from initialism}}: முதலெழுத்துச் சொல்லாக்கத்திலிருந்து (எ-டு: எம். ஜி. ஆர்.) விரிவான வடிவத்திற்கான வழிமாற்று.',
{ tag: 'R to scientific name', description: 'redirect from the common name to the scientific name' },
value: 'R from initialism'
{ tag: 'R from scientific name', description: 'redirect from the scientific name to the common name' },
{ tag: 'R from alternative scientific name', description: 'redirect from an alternative scientific name to the accepted scientific name' },
{ tag: 'R from scientific abbreviation', description: 'redirect from a scientific abbreviation' },
{ tag: 'R to monotypic taxon', description: 'redirect from the only lower-ranking member of a monotypic taxon to its monotypic taxon' },
{ tag: 'R from monotypic taxon', description: 'redirect from a monotypic taxon to its only lower-ranking member' },
{ tag: 'R taxon with possibilities', description: 'redirect from a title related to a living organism that potentially could be expanded into an article' }
],
Geography: [
{ tag: 'R from name and country', description: 'redirect from the specific name to the briefer name' },
{ tag: 'R from more specific geographic name', description: 'redirect from a geographic location that includes extraneous identifiers such as the county or region of a city' }
]
},
'Navigation aids': {
{
'Navigation': [
label: '{{R from acronym}}: அஃகுபெயரிலிருந்து (எ-டு: நேட்டோ) விரிவான வடிவத்திற்கான வழிமாற்று.',
{ tag: 'R to anchor', description: 'redirect from a topic that does not have its own page to an anchored part of a page on the subject' },
value: 'R from acronym'
{
},
tag: 'R avoided double redirect',
{
description: 'redirect from an alternative title for another redirect',
label: '{{R to list entry}}: தனிக்கட்டுரைகளைக் கொண்டிருக்கும் அளவுக்குக் குறிப்பிடத்தக்கமை அற்றவற்றைப் பற்றிய சுருக்கமான விவரங்களைக் கொண்ட பட்டியல் உள்ளீட்டுக்கான வழிமாற்று.',
subgroup: {
value: 'R to list entry'
name: 'doubleRedirectTarget',
},
type: 'input',
{
label: 'Redirect target name',
label: '{{R to section}}: {{R to list entry}}ஐ ஒத்தது. ஆனால், பட்டியலானது பகுதிகளாக ஒழுங்குபடுத்தப்பட்டுள்ளபோது பயன்படுத்தப்படும்.',
tooltip: 'Enter the page this redirect would target if the page wasn\'t also a redirect'
value: 'R to section'
}
},
},
{
{ tag: 'R from file metadata link', description: 'redirect of a wikilink created from EXIF, XMP, or other information (i.e. the "metadata" section on some image description pages)' },
label: '{{R from misspelling}}: எழுத்துப்பிழை அல்லது தட்டச்சுப்பிழையிலிருந்தான வழிமாற்று.',
{ tag: 'R to list entry', description: 'redirect to a list which contains brief descriptions of subjects not notable enough to have separate articles' },
value: 'R from misspelling'
},
{
label: '{{R from alternative spelling}}: மாற்று எழுத்துக்கூட்டலுடனான தலைப்பிலிருந்தான வழிமாற்று.',
value: 'R from alternative spelling'
},
{
label: '{{R from plural}}: பன்மைச்சொல்லிலிருந்து ஒருமைச்சொல்லுக்கான வழிமாற்று.',
value: 'R from plural'
},
{
label: '{{R from related word}}: ஒரு தொடர்புடைய சொல்லிலிருந்தான வழிமாற்று.',
value: 'R from related word'
},
{
label: '{{R with possibilities}}: redirect from a more specific title to a more general, less detailed article, hence something which can and should be expanded',
value: 'R with possibilities'
},
{
label: '{{R from member}}: redirect from a member of a group to a related topic such as the group, organization, or team that he or she belongs to',
value: 'R from member'
},
{
label: '{{R from other capitalisation}}: redirect from a title with another method of capitalisation',
value: 'R from other capitalisation'
}
];
 
{ tag: 'R mentioned in hatnote', description: 'redirect from a title that is mentioned in a hatnote at the redirect target' },
Twinkle.tag.alternativeList = [
{ tag: 'R to section', description: 'similar to {{R to list entry}}, but when list is organized in sections, such as list of characters in a fictional universe' },
{
label { tag: '{{R from alternativeshortcut', name}}description: 'redirect from a titleWikipedia thatshortcut' is another name, a pseudonym, a nickname, or a synonym'},
{ tag: 'R from template shortcut', description: 'redirect from a shortcut page name in any namespace to a page in template namespace' }
value: 'R from alternative name'
 
},
],
{
'Disambiguation': [
label: '{{R from long name}}: redirect from a title that is a complete or more complete name',
{ tag: 'R from ambiguous term', description: 'redirect from an ambiguous page name to a page that disambiguates it. This template should never appear on a page that has "(disambiguation)" in its title, use R to disambiguation page instead' },
value: 'R from long name'
{ tag: 'R to disambiguation page', description: 'redirect to a disambiguation page' },
{ tag: 'R from incomplete disambiguation', description: 'redirect from a page name that is too ambiguous to be the title of an article and should redirect to an appropriate disambiguation page' },
{ tag: 'R from incorrect disambiguation', description: 'redirect from a page name with incorrect disambiguation due to an error or previous editorial misconception' },
{ tag: 'R from other disambiguation', description: 'redirect from a page name with an alternative disambiguation qualifier' },
{ tag: 'R from unnecessary disambiguation', description: 'redirect from a page name that has an unneeded disambiguation qualifier' }
],
'Merge, duplicate & move': [
{ tag: 'R from duplicated article', description: 'redirect to a similar article in order to preserve its edit history' },
{ tag: 'R with history', description: 'redirect from a page containing substantive page history, kept to preserve content and attributions' },
{ tag: 'R from move', description: 'redirect from a page that has been moved/renamed' },
{ tag: 'R from merge', description: 'redirect from a merged page in order to preserve its edit history' }
],
'Namespace': [
{ tag: 'R from remote talk page', description: 'redirect from a talk page in any talk namespace to a corresponding page that is more heavily watched' },
{ tag: 'R to category namespace', description: 'redirect from a page outside the category namespace to a category page' },
{ tag: 'R to help namespace', description: 'redirect from any page inside or outside of help namespace to a page in that namespace' },
{ tag: 'R to main namespace', description: 'redirect from a page outside the main-article namespace to an article in mainspace' },
{ tag: 'R to portal namespace', description: 'redirect from any page inside or outside of portal space to a page in that namespace' },
{ tag: 'R to project namespace', description: 'redirect from any page inside or outside of project (Wikipedia: or WP:) space to any page in the project namespace' },
{ tag: 'R to user namespace', description: 'redirect from a page outside the user namespace to a user page (not to a user talk page)' }
]
},
'Media': {
{
General: [
label: '{{R from surname}}: redirect from a title that is a surname',
{ tag: 'R from book', description: 'redirect from a book title to a more general, relevant article' },
value: 'R from surname'
{ tag: 'R from album', description: 'redirect from an album to a related topic such as the recording artist or a list of albums' },
},
{ tag: 'R from song', description: 'redirect from a song title to a more general, relevant article' },
{
label { tag: '{{R from historictelevision name}}episode', description: 'redirect from another name with a significanttelevision historicepisode pasttitle asto a region,related state, citywork or such,lists butof whichepisodes' is no longer known by that title or name',}
],
value: 'R from historic name'
Fiction: [
},
{ tag: 'R from fictional character', description: 'redirect from a fictional character to a related fictional work or list of characters' },
{
label { tag: '{{R from phrase}}fictional element', description: 'redirect from a phrasefictional element (such as an object or concept) to a morerelated generalfictional relevantwork articleor coveringlist theof topicsimilar elements' },
{ tag: 'R from fictional location', description: 'redirect from a fictional location or setting to a related fictional work or list of places' }
value: 'R from phrase'
},
{
label: '{{R from scientific name}}: redirect from the scientific name to the common name',
value: 'R from scientific name'
},
{
label: '{{R to scientific name}}: redirect from the common name to the scientific name',
value: 'R to scientific name'
},
{
label: '{{R from name and country}}: redirect from the specific name to the briefer name',
value: 'R from name and country'
},
{
label: '{{R from alternative language}}: redirect from an English name to a name in another language, or vice-versa',
value: 'R from alternative language'
},
{
label: '{{R from ASCII}}: redirect from a title in basic ASCII to the formal article title, with differences that are not diacritical marks (accents, umlauts, etc.)',
value: 'R from ASCII'
},
{
label: '{{R to diacritics}}: redirect to the article title with diacritical marks (accents, umlauts, etc.)',
value: 'R to diacritics'
}
];
 
]
Twinkle.tag.administrativeList = [
{
label: '{{R from merge}}: redirect from a merged page in order to preserve its edit history',
value: 'R from merge'
},
'Miscellaneous': {
{
'Related information': [
label: '{{R to disambiguation page}}: redirect to a disambiguation page',
{ tag: 'R to article without mention', description: 'redirect to an article without any mention of the redirected word or phrase' },
value: 'R to disambiguation page'
{ tag: 'R to decade', description: 'redirect from a year to the decade article' },
},
{ tag: 'R from domain name', description: 'redirect from a domain name to an article about a website' },
{
label { tag: '{{R from duplicatedphrase', article}}description: 'redirect tofrom a similarphrase articleto ina ordermore togeneral preserverelevant itsarticle editcovering historythe topic' },
{ tag: 'R from list topic', description: 'redirect from the topic of a list to the equivalent list' },
value: 'R from duplicated article'
{ tag: 'R from member', description: 'redirect from a member of a group to a related topic such as the group or organization' },
},
{ tag: 'R to related topic', description: 'redirect to an article about a similar topic' },
{
label { tag: '{{R tofrom decade}}related word', description: 'redirect from a yearrelated to the decade articleword' },
{ tag: 'R from school', description: 'redirect from a school article that had very little information' },
value: 'R to decade'
{ tag: 'R from subtopic', description: 'redirect from a title that is a subtopic of the target article' },
},
{ tag: 'R to subtopic', description: 'redirect to a subtopic of the redirect\'s title' },
{
label { tag: '{{R from shortcut}}Unicode character', description: 'redirect from a single Unicode character to an article or Wikipedia shortcutproject page that infers meaning for the symbol' },
{ tag: 'R from Unicode code', description: 'redirect from a Unicode code point to an article about the character it represents' }
value: 'R from shortcut'
} ],
'With possibilities': [
{
{ tag: 'R with possibilities', description: 'redirect from a specific title to a more general, less detailed article (something which can and should be expanded)' }
label: '{{R from CamelCase}}: redirect from a CamelCase title',
],
value: 'R from CamelCase'
'ISO codes': [
},
{ tag: 'R from ISO 4 abbreviation', description: 'redirect from an ISO 4 publication title abbreviation to the unabbreviated title' },
{
label { tag: '{{R from EXIF}}ISO 639 code', description: 'redirect offrom a wikilinktitle createdthat fromis JPEGan EXIFISO information639 (i.e.language thecode \"metadata\"to sectionan onarticle someabout imagethe descriptionlanguage' pages)',}
],
value: 'R from EXIF'
'Printworthiness': [
},
{ tag: 'R printworthy', description: 'redirect from a title that would be helpful in a printed or CD/DVD version of Wikipedia' },
{
label { tag: '{{R fromunprintworthy', school}}description: 'redirect from a school articletitle that hadwould veryNOT littlebe informationhelpful in a printed or CD/DVD version of Wikipedia', }
]
value: 'R from school'
}
]};
 
// maintenance tags for FILES start here
 
Twinkle.tag.filefileList = {};
'License and sourcing problem tags': [
 
{ label: '{{Better source requested}}: source info consists of bare image URL/generic base URL only', value: 'Better source requested' },
Twinkle.tag.file.licenseList = [
{ label: '{{BsrNon-free reduce}}: sourcenon-low-resolution infofair consists of bareuse image URL/generic(or basetoo-long URLaudio onlyclip, etc)', value: 'BsrNon-free reduce' },
{ label: '{{NonOrphaned non-free reducerevisions}}: non-low-resolution fair use imagemedia (orwith too-longold audiorevisions clip,that need to be etc)deleted', value: 'NonOrphaned non-free reducerevisions' },
],
{ label: '{{Orphaned non-free revisions}}: fair use media with old revisions that need to be deleted', value: 'subst:orfurrev' }
'Wikimedia Commons-related tags': [
];
{ label: '{{Copy to Commons}}: free media that should be copied to Commons', value: 'Copy to Commons' },
 
{
Twinkle.tag.file.commonsList = [
{ label: '{{CopyDo not move to Commons}}: freefile medianot thatsuitable shouldfor be copiedmoving to Commons', value: 'Copy to Commons' },
{ label: '{{Do not move to Commons}} (PD issue): file is PD in the US but not in country of origin', value: 'Do not move to Commons' },
subgroup: [
{ label: '{{Do not move to Commons}} (other reason)', value: 'Do not move to Commons_reason' },
{
{ label: '{{Keep local}}: request to keep local copy of a Commons file', value: 'Keep local' },
type: 'input',
{ label: '{{Now Commons}}: file has been copied to Commons', value: 'subst:ncd' }
name: 'DoNotMoveToCommons_reason',
];
label: 'Reason: ',
 
tooltip: 'Enter the reason why this image should not be moved to Commons (required). If the file is PD in the US but not in country of origin, enter "US only"',
Twinkle.tag.file.cleanupList = [
required: true
{ label: '{{Artifacts}}: PNG contains residual compression artifacts', value: 'Artifacts' },
},
{ label: '{{Bad font}}: SVG uses fonts not available on the thumbnail server', value: 'Bad font' },
{
{ label: '{{Bad format}}: PDF/DOC/... file should be converted to a more useful format', value: 'Bad format' },
type: 'input',
{ label: '{{Bad GIF}}: GIF that should be PNG, JPEG, or SVG', value: 'Bad GIF' },
name: 'DoNotMoveToCommons_expiry',
{ label: '{{Bad JPEG}}: JPEG that should be PNG or SVG', value: 'Bad JPEG' },
label: 'Expiration year: ',
{ label: '{{Bad trace}}: auto-traced SVG requiring cleanup', value: 'Bad trace' },
tooltip: 'If this file can be moved to Commons beginning in a certain year, you can enter it here (optional).'
{ label: '{{Cleanup image}}: general cleanup', value: 'Cleanup image' },
}
{ label: '{{Cleanup SVG}}: SVG needing code and/or appearance cleanup', value: 'Cleanup SVG' },
{ label: '{{ClearType}}: image (not screenshot) with ClearType anti-aliasing', value: 'ClearType' },
{ label: '{{Imagewatermark}}: image contains visible or invisible watermarking', value: 'Imagewatermark' },
{ label: '{{NoCoins}}: image using coins to indicate scale', value: 'NoCoins' },
{ label: '{{Overcompressed JPEG}}: JPEG with high levels of artifacts', value: 'Overcompressed JPEG' },
{ label: '{{Opaque}}: opaque background should be transparent', value: 'Opaque' },
{ label: '{{Remove border}}: unneeded border, white space, etc.', value: 'Remove border' },
{ label: '{{Rename media}}: file should be renamed according to the criteria at [[WP:FMV]]', value: 'Rename media' },
{ label: '{{Should be PNG}}: GIF or JPEG should be lossless', value: 'Should be PNG' },
{
label: '{{Should be SVG}}: PNG, GIF or JPEG should be vector graphics', value: 'Should be SVG',
subgroup: {
name: 'svgCategory',
type: 'select',
list: [
{ label: '{{Should be SVG|other}}', value: 'other' },
{ label: '{{Should be SVG|alphabet}}: character images, font examples, etc.', value: 'alphabet' },
{ label: '{{Should be SVG|chemical}}: chemical diagrams, etc.', value: 'chemical' },
{ label: '{{Should be SVG|circuit}}: electronic circuit diagrams, etc.', value: 'circuit' },
{ label: '{{Should be SVG|coat of arms}}: coats of arms', value: 'coat of arms' },
{ label: '{{Should be SVG|diagram}}: diagrams that do not fit any other subcategory', value: 'diagram' },
{ label: '{{Should be SVG|emblem}}: emblems, free/libre logos, insignias, etc.', value: 'emblem' },
{ label: '{{Should be SVG|fair use}}: fair-use images, fair-use logos', value: 'fair use' },
{ label: '{{Should be SVG|flag}}: flags', value: 'flag' },
{ label: '{{Should be SVG|graph}}: visual plots of data', value: 'graph' },
{ label: '{{Should be SVG|logo}}: logos', value: 'logo' },
{ label: '{{Should be SVG|map}}: maps', value: 'map' },
{ label: '{{Should be SVG|music}}: musical scales, notes, etc.', value: 'music' },
{ label: '{{Should be SVG|physical}}: "realistic" images of physical objects, people, etc.', value: 'physical' },
{ label: '{{Should be SVG|symbol}}: miscellaneous symbols, icons, etc.', value: 'symbol' }
]
},
{
label: '{{Keep local}}: request to keep local copy of a Commons file',
value: 'Keep local',
subgroup: {
type: 'input',
name: 'keeplocalName',
label: 'Commons image name if different: ',
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',
subgroup: {
type: 'input',
name: 'nowcommonsName',
label: 'Commons image name if different: ',
tooltip: 'Name of the image on Commons (if different from local name), excluding the File: prefix:'
}
}
}],
'Cleanup tags': [
{ label: '{{Should be text}}: image should be represented as text, tables, or math markup', value: 'Should be text' },
{ label: '{{Split mediaArtifacts}}: therePNG arecontains tworesidual differentcompression images in the upload log which need to be splitartifacts', value: 'Split mediaArtifacts' },
{ label: '{{Bad font}}: SVG uses fonts not available on the thumbnail server', value: 'Bad font' },
];
{ label: '{{Bad format}}: PDF/DOC/... file should be converted to a more useful format', value: 'Bad format' },
{ label: '{{Bad GIF}}: GIF that should be PNG, JPEG, or SVG', value: 'Bad GIF' },
{ label: '{{Bad JPEG}}: JPEG that should be PNG or SVG', value: 'Bad JPEG' },
{ label: '{{Bad SVG}}: SVG containing raster grahpics', value: 'Bad SVG' },
{ label: '{{Bad trace}}: auto-traced SVG requiring cleanup', value: 'Bad trace' },
{
label: '{{Cleanup image}}: general cleanup', value: 'Cleanup image',
subgroup: {
type: 'input',
name: 'cleanupimageReason',
label: 'Reason: ',
tooltip: 'Enter the reason for cleanup (required)',
required: true
}
},
{ label: '{{ClearType}}: image (not screenshot) with ClearType anti-aliasing', value: 'ClearType' },
{ label: '{{Imagewatermark}}: image contains visible or invisible watermarking', value: 'Imagewatermark' },
{ label: '{{NoCoins}}: image using coins to indicate scale', value: 'NoCoins' },
{ label: '{{Overcompressed JPEG}}: JPEG with high levels of artifacts', value: 'Overcompressed JPEG' },
{ label: '{{Opaque}}: opaque background should be transparent', value: 'Opaque' },
{ label: '{{Remove border}}: unneeded border, white space, etc.', value: 'Remove border' },
{
label: '{{Rename media}}: file should be renamed according to the criteria at [[WP:FMV]]',
value: 'Rename media',
subgroup: [
{
type: 'input',
name: 'renamemediaNewname',
label: 'New name: ',
tooltip: 'Enter the new name for the image (optional)'
},
{
type: 'input',
name: 'renamemediaReason',
label: 'Reason: ',
tooltip: 'Enter the reason for the rename (optional)'
}
]
},
{ label: '{{Should be PNG}}: GIF or JPEG should be lossless', value: 'Should be PNG' },
{
label: '{{Should be SVG}}: PNG, GIF or JPEG should be vector graphics', value: 'Should be SVG',
subgroup: {
name: 'svgCategory',
type: 'select',
list: [
{ label: '{{Should be SVG|other}}', value: 'other' },
{ label: '{{Should be SVG|alphabet}}: character images, font examples, etc.', value: 'alphabet' },
{ label: '{{Should be SVG|chemical}}: chemical diagrams, etc.', value: 'chemical' },
{ label: '{{Should be SVG|circuit}}: electronic circuit diagrams, etc.', value: 'circuit' },
{ label: '{{Should be SVG|coat of arms}}: coats of arms', value: 'coat of arms' },
{ label: '{{Should be SVG|diagram}}: diagrams that do not fit any other subcategory', value: 'diagram' },
{ label: '{{Should be SVG|emblem}}: emblems, free/libre logos, insignias, etc.', value: 'emblem' },
{ label: '{{Should be SVG|fair use}}: fair-use images, fair-use logos', value: 'fair use' },
{ label: '{{Should be SVG|flag}}: flags', value: 'flag' },
{ label: '{{Should be SVG|graph}}: visual plots of data', value: 'graph' },
{ label: '{{Should be SVG|logo}}: logos', value: 'logo' },
{ label: '{{Should be SVG|map}}: maps', value: 'map' },
{ label: '{{Should be SVG|music}}: musical scales, notes, etc.', value: 'music' },
{ label: '{{Should be SVG|physical}}: "realistic" images of physical objects, people, etc.', value: 'physical' },
{ label: '{{Should be SVG|symbol}}: miscellaneous symbols, icons, etc.', value: 'symbol' }
]
}
},
{ label: '{{Should be text}}: image should be represented as text, tables, or math markup', value: 'Should be text' }
],
'Image quality tags': [
{ label: '{{Image hoax}}: Image may be manipulated or constitute a hoax', value: 'Image hoax' },
{ label: '{{Image-blownout}}', value: 'Image-blownout' },
{ label: '{{Image-out-of-focus}}', value: 'Image-out-of-focus' },
{
label: '{{Image-Poor-Quality}}', value: 'Image-Poor-Quality',
subgroup: {
type: 'input',
name: 'ImagePoorQualityReason',
label: 'Reason: ',
tooltip: 'Enter the reason why this image is so bad (required)',
required: true
}
},
{ label: '{{Image-underexposure}}', value: 'Image-underexposure' },
{
label: '{{Low quality chem}}: disputed chemical structures', value: 'Low quality chem',
subgroup: {
type: 'input',
name: 'lowQualityChemReason',
label: 'Reason: ',
tooltip: 'Enter the reason why the diagram is disputed (required)',
required: true
}
}
],
'Replacement tags': [
{ label: '{{Obsolete}}: improved version available', value: 'Obsolete' },
{ label: '{{PNG version available}}', value: 'PNG version available' },
{ label: '{{Vector version available}}', value: 'Vector version available' }
]
};
Twinkle.tag.fileList['Replacement tags'].forEach(function(el) {
el.subgroup = {
type: 'input',
label: 'Replacement file: ',
tooltip: 'Enter the name of the file which replaces this one (required)',
name: el.value.replace(/ /g, '_') + 'File',
required: true
};
});
 
Twinkle.tag.file.qualityList = [
{ label: '{{Image-blownout}}', value: 'Image-blownout' },
{ label: '{{Image-out-of-focus}}', value: 'Image-out-of-focus' },
{ label: '{{Image-Poor-Quality}}', value: 'Image-Poor-Quality' },
{ label: '{{Image-underexposure}}', value: 'Image-underexposure' },
{ label: '{{Low quality chem}}: disputed chemical structures', value: 'Low quality chem' }
];
 
Twinkle.tag.file.replacementListcallbacks = [{
article: function articleCallback(pageobj) {
{ label: '{{Duplicate}}: exact duplicate of another file, but not yet orphaned', value: 'Duplicate' },
{ label: '{{Obsolete}}: improved version available', value: 'Obsolete' },
{ label: '{{PNG version available}}', value: 'PNG version available' },
{ label: '{{Vector version available}}', value: 'Vector version available' }
];
 
// Remove tags that become superfluous with this action
var pageText = pageobj.getPageText().replace(/\{\{\s*([Uu]serspace draft)\s*(\|(?:\{\{[^{}]*\}\}|[^{}])*)?\}\}\s*/g, '');
var params = pageobj.getCallbackParameters();
 
/**
// Contains those article tags that *do not* work inside {{multiple issues}}.
* Saves the page following the removal of tags if any. The last step.
Twinkle.tag.multipleIssuesExceptions = [
* Called from removeTags()
'copypaste',
*/
'expand language',
var postRemoval = function() {
'improve categories',
if (params.tagsToRemove.length) {
'in use',
// Remove empty {{multiple issues}} if found
'merge',
pageText = pageText.replace(/\{\{(multiple ?issues|article ?issues|mi)\s*\|\s*\}\}\n?/im, '');
'merge from',
// Remove single-element {{multiple issues}} if found
'merge to',
pageText = pageText.replace(/\{\{(?:multiple ?issues|article ?issues|mi)\s*\|\s*(\{\{[^}]+\}\})\s*\}\}/im, '$1');
'not Tamil',
}
'rough translation',
'uncategorized',
'under construction'
];
 
// Build edit summary
var makeSentence = function(array) {
if (array.length < 3) {
return array.join(' and ');
}
var last = array.pop();
return array.join(', ') + ', and ' + last;
};
var makeTemplateLink = function(tag) {
var text = '{{[[';
// if it is a custom tag with a parameter
if (tag.indexOf('|') !== -1) {
tag = tag.slice(0, tag.indexOf('|'));
}
text += tag.indexOf(':') !== -1 ? tag : 'Template:' + tag + '|' + tag;
return text + ']]}}';
};
 
var summaryText;
Twinkle.tag.callbacks = {
var addedTags = params.tags.map(makeTemplateLink);
main: function( pageobj ) {
var removedTags = params.tagsToRemove.map(makeTemplateLink);
var params = pageobj.getCallbackParameters(),
if (addedTags.length) {
tagRe, tagText = '', summaryText = 'Added',
summaryText = 'Added ' + makeSentence(addedTags);
tags = [], groupableTags = [], i, totalTags;
summaryText += removedTags.length ? '; and removed ' + makeSentence(removedTags) : '';
} else {
summaryText = 'Removed ' + makeSentence(removedTags);
}
summaryText += ' tag' + (addedTags.length + removedTags.length > 1 ? 's' : '');
if (params.reason) {
summaryText += ': ' + params.reason;
}
 
// avoid truncated summaries
// Remove tags that become superfluous with this action
if (summaryText.length > 499) {
var pageText = pageobj.getPageText().replace(/\{\{\s*([Nn]ew unreviewed article|[Uu]nreviewed|[Uu]serspace draft)\s*(\|(?:\{\{[^{}]*\}\}|[^{}])*)?\}\}\s*/g, "");
summaryText = summaryText.replace(/\[\[[^|]+\|([^\]]+)\]\]/g, '$1');
}
 
pageobj.setPageText(pageText);
var addTag = function friendlytagAddTag( tagIndex, tagName ) {
pageobj.setEditSummary(summaryText);
var currentTag = "";
if ((mw.config.get('wgNamespaceNumber') === 0 && Twinkle.getPref('watchTaggedVenues').indexOf('articles') !== -1) || (mw.config.get('wgNamespaceNumber') === 118 && Twinkle.getPref('watchTaggedVenues').indexOf('drafts') !== -1)) {
if( tagName === 'uncategorized' || tagName === 'improve categories' ) {
pageobj.setWatchlist(Twinkle.getPref('watchTaggedPages'));
pageText += '\n\n{{' + tagName +
}
'|date={{subst:CURRENTMONTHNAME}} {{subst:CURRENTYEAR}}}}';
pageobj.setMinorEdit(Twinkle.getPref('markTaggedPagesAsMinor'));
} else {
pageobj.setCreateOption('nocreate');
if( tagName === 'globalize' ) {
pageobj.save(function() {
currentTag += '{{' + params.tagParameters.globalize;
// special functions for merge tags
} else {
if (params.mergeReason) {
currentTag += ( Twinkle.tag.mode === 'redirect' ? '\n' : '' ) + '{{' + tagName;
// post the rationale on the talk page (only operates in main namespace)
var talkpage = new Morebits.wiki.page('Talk:' + params.discussArticle, 'Posting rationale on talk page');
talkpage.setNewSectionText(params.mergeReason.trim() + ' ~~~~');
talkpage.setNewSectionTitle(params.talkDiscussionTitleLinked);
talkpage.setChangeTags(Twinkle.changeTags);
talkpage.setWatchlist(Twinkle.getPref('watchMergeDiscussions'));
talkpage.setCreateOption('recreate');
talkpage.newSection();
}
if (params.mergeTagOther) {
 
// tag the target page if requested
if( tagName === 'notability' && params.tagParameters.notability !== 'none' ) {
var otherTagName = 'Merge';
currentTag += '|' + params.tagParameters.notability;
if (params.mergeTag === 'Merge from') {
otherTagName = 'Merge to';
} else if (params.mergeTag === 'Merge to') {
otherTagName = 'Merge from';
}
var newParams = {
tags: [otherTagName],
tagsToRemove: [],
tagsToRemain: [],
mergeTarget: Morebits.pageNameNorm,
discussArticle: params.discussArticle,
talkDiscussionTitle: params.talkDiscussionTitle,
talkDiscussionTitleLinked: params.talkDiscussionTitleLinked
};
var otherpage = new Morebits.wiki.page(params.mergeTarget, 'Tagging other page (' +
params.mergeTarget + ')');
otherpage.setChangeTags(Twinkle.changeTags);
otherpage.setCallbackParameters(newParams);
otherpage.load(Twinkle.tag.callbacks.article);
}
 
// promptpost at WP:PNT for other{{not parameters,English}} basedand on{{rough thetranslation}} tag
if (params.translationPostAtPNT) {
switch( tagName ) {
var pntPage = new Morebits.wiki.page('Wikipedia:Pages needing translation into English',
case 'cleanup':
'Listing article at Wikipedia:Pages needing translation into English');
if (params.tagParameters.cleanup) {
pntPage.setFollowRedirect(true);
currentTag += '|reason=' + params.tagParameters.cleanup;
pntPage.load(function friendlytagCallbacksTranslationListPage(pageobj) {
}
var old_text = pageobj.getPageText();
break;
 
case 'copy edit':
ifvar lang = (params.tagParameters.copyEdit) {translationLanguage;
currentTagvar +=reason '|for=' + params.tagParameters.copyEdittranslationComments;
 
}
var templateText = '{{subst:needtrans|pg=' + Morebits.pageNameNorm + '|Language=' +
break;
(lang || 'uncertain') + '|Comments=' + reason.trim() + '}} ~~~~';
case 'copypaste':
 
if (params.tagParameters.copypaste) {
var text, summary;
currentTag += '|url=' + params.tagParameters.copypaste;
if (params.tags.indexOf('Rough translation') !== -1) {
}
text = old_text + '\n\n' + templateText;
break;
summary = 'Translation cleanup requested on ';
case 'expand language':
currentTag += '|topic=';
var langcode = prompt('Please enter the language code of the other wiki (e.g. "fr", "roa-rup"). \n' +
"This information is required. To skip the {{expand language}} tag, click Cancel.", "");
if (langcode === null || langcode === "") {
Morebits.status.warn("Notice", "{{expand language}} tag skipped by user");
return true; // continue to next tag
} else {
text = old_text.replace(/\n+(==\s?Translated pages that could still use some cleanup\s?==)/,
currentTag += '|langcode=' + langcode;
'\n\n' + templateText + '\n\n$1');
summary = 'Translation' + (lang ? ' from ' + lang : '') + ' requested on ';
}
 
var otherart = prompt('Please enter the name of the article in the other wiki (without interwiki prefix). \n' +
if (text === old_text) {
"This information is optional. To skip the {{expand language}} tag, click Cancel.", "");
pageobj.getStatusElement().error('failed to find target spot for the discussion');
if (otherart === null) {
return;
Morebits.status.warn("Notice", "{{expand language}} tag skipped by user");
return true; // continue to next tag
} else {
currentTag += '|otherarticle=' + otherart;
}
breakpageobj.setPageText(text);
pageobj.setEditSummary(summary + ' [[:' + Morebits.pageNameNorm + ']]');
case 'expert-subject':
pageobj.setChangeTags(Twinkle.changeTags);
if (params.tagParameters.expertSubject) {
pageobj.setCreateOption('recreate');
currentTag += '|1=' + params.tagParameters.expertSubject;
pageobj.save();
});
}
if (params.translationNotify) {
pageobj.lookupCreation(function(innerPageobj) {
var initialContrib = innerPageobj.getCreator();
 
// Disallow warning yourself
if (initialContrib === mw.config.get('wgUserName')) {
innerPageobj.getStatusElement().warn('You (' + initialContrib + ') created this page; skipping user notification');
return;
}
 
break;
var userTalkPage = new Morebits.wiki.page('User talk:' + initialContrib,
case 'news release':
'Notifying initial contributor (' + initialContrib + ')');
currentTag += '|1=article';
userTalkPage.setNewSectionTitle('Your article [[' + Morebits.pageNameNorm + ']]');
break;
userTalkPage.setNewSectionText('{{subst:uw-notenglish|1=' + Morebits.pageNameNorm +
case 'not Tamil':
(params.translationPostAtPNT ? '' : '|nopnt=yes') + '}} ~~~~');
case 'rough translation':
userTalkPage.setEditSummary('Notice: Please use English when contributing to the English Wikipedia.');
if (params.translationLanguage) {
userTalkPage.setChangeTags(Twinkle.changeTags);
currentTag += '|1=' + params.translationLanguage;
userTalkPage.setCreateOption('recreate');
userTalkPage.setFollowRedirect(true, false);
userTalkPage.newSection();
});
}
});
 
if (params.patrol) {
pageobj.triage();
}
};
 
/**
* Removes the existing tags that were deselected (if any)
* Calls postRemoval() when done
*/
var removeTags = function removeTags() {
 
if (params.tagsToRemove.length === 0) {
postRemoval();
return;
}
 
Morebits.status.info('Info', 'Removing deselected tags that were already present');
 
var getRedirectsFor = [];
 
// Remove the tags from the page text, if found in its proper name,
// otherwise moves it to `getRedirectsFor` array earmarking it for
// later removal
params.tagsToRemove.forEach(function removeTag(tag) {
var tag_re = new RegExp('\\{\\{' + Morebits.pageNameRegex(tag) + '\\s*(\\|[^}]+)?\\}\\}\\n?');
 
if (tag_re.test(pageText)) {
pageText = pageText.replace(tag_re, '');
} else {
getRedirectsFor.push('Template:' + tag);
}
});
 
if (!getRedirectsFor.length) {
postRemoval();
return;
}
 
// Remove tags which appear in page text as redirects
var api = new Morebits.wiki.api('Getting template redirects', {
action: 'query',
prop: 'linkshere',
titles: getRedirectsFor.join('|'),
redirects: 1, // follow redirect if the class name turns out to be a redirect page
lhnamespace: '10', // template namespace only
lhshow: 'redirect',
lhlimit: 'max', // 500 is max for normal users, 5000 for bots and sysops
format: 'json'
}, function removeRedirectTag(apiobj) {
var pages = apiobj.getResponse().query.pages.filter(function(p) {
return !p.missing && !!p.linkshere;
});
pages.forEach(function(page) {
var removed = false;
page.linkshere.forEach(function(el) {
var tag = el.title.slice(9);
var tag_re = new RegExp('\\{\\{' + Morebits.pageNameRegex(tag) + '\\s*(\\|[^}]*)?\\}\\}\\n?');
if (tag_re.test(pageText)) {
pageText = pageText.replace(tag_re, '');
removed = true;
return false; // break out of $.each
}
});
if (!removed) {
Morebits.status.warn('Info', 'Failed to find {{' +
page.title.slice(9) + '}} on the page... excluding');
}
 
});
 
postRemoval();
 
});
api.post();
 
};
 
if (!params.tags.length) {
removeTags();
return;
}
 
var tagRe, tagText = '', tags = [], groupableTags = [], groupableExistingTags = [];
// Executes first: addition of selected tags
 
/**
* Updates `tagText` with the syntax of `tagName` template with its parameters
* @param {number} tagIndex
* @param {string} tagName
*/
var addTag = function articleAddTag(tagIndex, tagName) {
var currentTag = '';
if (tagName === 'Uncategorized' || tagName === 'Improve categories') {
pageText += '\n\n{{' + tagName + '|date={{subst:CURRENTMONTHNAME}} {{subst:CURRENTYEAR}}}}';
} else {
currentTag += '{{' + tagName;
// fill in other parameters, based on the tag
 
var subgroupObj = Twinkle.tag.article.flatObject[tagName] &&
Twinkle.tag.article.flatObject[tagName].subgroup;
if (subgroupObj) {
var subgroups = Array.isArray(subgroupObj) ? subgroupObj : [ subgroupObj ];
subgroups.forEach(function(gr) {
if (gr.parameter && (params[gr.name] || gr.required)) {
currentTag += '|' + gr.parameter + '=' + (params[gr.name] || '');
}
});
}
 
switch (tagName) {
case 'Not English':
case 'Rough translation':
if (params.translationPostAtPNT) {
currentTag += '|listed=yes';
}
break;
case 'mergeMerge':
case 'mergeMerge to':
case 'mergeMerge from':
if (params.mergeTarget)mergeTag = {tagName;
// normalize the merge target for now and later
params.mergeTarget = Morebits.string.toUpperCaseFirstChar(params.mergeTarget.replace(/_/g, ' '));
 
currentTag += '|' + params.mergeTarget;
 
// link to the correct section on the talk page, for article space only
if (mw.config.get('wgNamespaceNumber') === 0 && (params.mergeReason || params.discussArticle)) {
if (!params.discussArticle) {
// discussArticle is the article whose talk page will contain the discussion
params.discussArticle = (tagName === "merge'Merge to"' ? params.mergeTarget : mw.config.get('wgTitle'));
// nonDiscussArticle is the article which won't have the discussion
params.nonDiscussArticle = (tagName === "merge'Merge to"' ? mw.config.get('wgTitle') : params.mergeTarget);
var direction = '[[' + params.talkDiscussionTitlenonDiscussArticle + ']]' + (params.mergeTag === 'ProposedMerge' merge? ' with ' : ' into ') + '[[' + params.nonDiscussArticlediscussArticle + ']]';
params.talkDiscussionTitleLinked = 'Proposed merge of ' + direction;
}
params.talkDiscussionTitle = params.talkDiscussionTitleLinked.replace(/\[\[(.*?)\]\]/g, '$1');
currentTag += '|discuss=Talk:' + params.discussArticle + '#' + params.talkDiscussionTitle;
}
currentTag += '|discuss=Talk:' + params.discussArticle + '#' + params.talkDiscussionTitle;
}
break;
}
 
currentTag += (Twinkle.tag.mode === 'redirect') ? '}}' : '|date={{subst:CURRENTMONTHNAME}} {{subst:CURRENTYEAR}}}}\n';
tagText += currentTag;
}
};
 
/**
if ( tagIndex > 0 ) {
* Adds the tags which go outside {{multiple issues}}, either because
if( tagIndex === (totalTags - 1) ) {
* these tags aren't supported in {{multiple issues}} or because
summaryText += ' and';
* {{multiple issues}} is not being added to the page at all
} else if ( tagIndex < (totalTags - 1) ) {
*/
summaryText += ',';
var addUngroupedTags = function() {
}
$.each(tags, addTag);
}
 
// Insert tag after short description or any hatnotes,
summaryText += ' {{[[';
// as well as deletion/protection-related templates
if( tagName === 'globalize' ) {
var wikipage = new Morebits.wikitext.page(pageText);
summaryText += "Template:" + params.tagParameters.globalize + '|' + params.tagParameters.globalize;
var templatesAfter = Twinkle.hatnoteRegex +
} else {
// Protection templates
summaryText += (tagName.indexOf(":") !== -1 ? tagName : ("Template:" + tagName + "|" + tagName));
'pp|pp-.*?|' +
}
// CSD
summaryText += ']]}}';
'db|delete|db-.*?|speedy deletion-.*?|' +
// PROD
'(?:proposed deletion|prod blp)\\/dated(?:\\s*\\|(?:concern|user|timestamp|help).*)+|' +
// not a hatnote, but sometimes under a CSD or AfD
'salt|proposed deletion endorsed';
// AfD is special, as the tag includes html comments before and after the actual template
// trailing whitespace/newline needed since this subst's a newline
var afdRegex = '(?:<!--.*AfD.*\\n\\{\\{(?:Article for deletion\\/dated|AfDM).*\\}\\}\\n<!--.*(?:\\n<!--.*)?AfD.*(?:\\s*\\n))?';
pageText = wikipage.insertAfterTemplates(tagText, templatesAfter, null, afdRegex).getText();
 
removeTags();
};
 
// Separate tags into groupable ones (`groupableTags`) and non-groupable ones (`tags`)
if( Twinkle.tag.mode !== 'redirect' ) {
params.tags.forEach(function(tag) {
// Check for preexisting tags and separate tags into groupable and non-groupable arrays
tagRe = new RegExp('\\{\\{' + tag + '(\\||\\}\\})', 'im');
for( i = 0; i < params.tags.length; i++ ) {
// regex check for preexistence of tag can be skipped if in canRemove mode
tagRe = new RegExp( '(\\{\\{' + params.tags[i] + '(\\||\\}\\})|\\|\\s*' + params.tags[i] + '\\s*=[a-z ]+\\d+)', 'im' );
if (Twinkle.tag.canRemove || !tagRe.exec( pageText ) ) {
if(// condition Twinkle.tag.multipleIssuesExceptions.indexOf(paramsarticle.tags[itag]) ===to -1ensure )that {its not a custom tag
// Custom tags are assumed non-groupable, since we don't know whether MI template supports them
groupableTags = groupableTags.concat( params.tags[i] );
if (Twinkle.tag.article.flatObject[tag] && !Twinkle.tag.article.flatObject[tag].excludeMI) {
} else {
tags = tagsgroupableTags.concatpush( params.tags[i] tag);
} else {
tags.push(tag);
}
} else {
if (tag === 'Merge from' || tag === 'History merge') {
tags.push(tag);
} else {
Morebits.status.warn( 'Info', 'Found {{' + params.tags[i]tag +
'}} on the article already...excluding' );
// don't do anything else with merge tags
if (params.tags[i]'Merge', ==='Merge "merge" || paramsto'].tags[i]indexOf(tag) !=== "merge from"-1) ||{
params.tags[i]mergeTarget == params.mergeReason = "mergeparams.mergeTagOther to")= {null;
params.mergeTarget = params.mergeReason = params.mergeTagOther = false;
}
}
}
});
 
// To-be-retained existing tags that are groupable
var miTest = /\{\{(multiple ?issues|article ?issues|mi)[^}]+\{/im.exec(pageText);
params.tagsToRemain.forEach(function(tag) {
var miOldStyleRegex = /\{\{(multiple ?issues|article ?issues|mi)\s*\|([^{]+)\}\}/im;
// If the tag is unknown to us, we consider it non-groupable
var miOldStyleTest = miOldStyleRegex.exec(pageText);
if (Twinkle.tag.article.flatObject[tag] && !Twinkle.tag.article.flatObject[tag].excludeMI) {
groupableExistingTags.push(tag);
}
});
 
var miTest = /\{\{(multiple ?issues|article ?issues|mi)(?!\s*\|\s*section\s*=)[^}]+\{/im.exec(pageText);
if( ( miTest || miOldStyleTest ) && groupableTags.length > 0 ) {
Morebits.status.info( 'Info', 'Adding supported tags inside existing {{multiple issues}} tag' );
 
if (miTest && groupableTags.sort(length > 0); {
Morebits.status.info('Info', 'Adding supported tags inside existing {{multiple issues}} tag');
tagText = "";
 
tagText = '';
totalTags = groupableTags.length;
$.each(groupableTags, addTag);
 
var miRegex = new RegExp('(\\{\\{\\s*' + miTest[1] + '\\s*(?:\\|(?:\\{\\{[^{}]*\\}\\}|[^{}])*)?)\\}\\}\\s*', 'im');
summaryText += ' tag' + ( groupableTags.length > 1 ? 's' : '' ) + ' (within {{[[Template:multiple issues|multiple issues]]}})';
pageText = pageText.replace(miRegex, '$1' + tagText + '}}\n');
if( tags.length > 0 ) {
summaryTexttagText += ', and';
}
 
addUngroupedTags();
if( miOldStyleTest ) {
// convert tags from old-style to new-style
var split = miOldStyleTest[2].split("|");
$.each(split, function(index, val) {
split[index] = val.replace("=", "|date=").trim();
});
pageText = pageText.replace(miOldStyleRegex, "{{$1|\n{{" + split.join("}}\n{{") + "}}\n" + tagText + "}}\n");
} else {
var miRegex = new RegExp("(\\{\\{\\s*" + miTest[1] + "\\s*(?:\\|(?:\\{\\{[^{}]*\\}\\}|[^{}])*)?)\\}\\}\\s*", "im");
pageText = pageText.replace(miRegex, "$1" + tagText + "}}\n");
}
tagText = "";
} else if( params.group && groupableTags.length >= 3 ) {
Morebits.status.info( 'Info', 'Grouping supported tags inside {{multiple issues}}' );
 
} else if (params.group && !miTest && (groupableExistingTags.length + groupableTags.length) >= 2) {
groupableTags.sort();
tagText +=Morebits.status.info('Info', 'Grouping supported tags inside {{multiple issues|\n}}');
 
tagText += '{{Multiple issues|\n';
totalTags = groupableTags.length;
$.each(groupableTags, addTag);
 
/**
summaryText += ' tags (within {{[[Template:multiple issues|multiple issues]]}})';
* Adds newly added tags to MI
if( tags.length > 0 ) {
*/
summaryText += ', and';
var addNewTagsToMI = function() {
}
$.each(groupableTags, addTag);
tagText += '}}\n';
 
} else {
addUngroupedTags();
tags = tags.concat( groupableTags );
};
 
} else {
 
// Redirect tagging: Check for pre-existing tags
var getRedirectsFor = [];
for( i = 0; i < params.tags.length; i++ ) {
 
tagRe = new RegExp( '(\\{\\{' + params.tags[i] + '(\\||\\}\\}))', 'im' );
// Reposition the tags on the page into {{multiple issues}}, if found with its
if( !tagRe.exec( pageText ) ) {
// proper name, else moves it to `getRedirectsFor` array to be handled later
tags = tags.concat( params.tags[i] );
groupableExistingTags.forEach(function repositionTagIntoMI(tag) {
var tag_re = new RegExp('(\\{\\{' + Morebits.pageNameRegex(tag) + '\\s*(\\|[^}]+)?\\}\\}\\n?)');
if (tag_re.test(pageText)) {
tagText += tag_re.exec(pageText)[1];
pageText = pageText.replace(tag_re, '');
} else {
getRedirectsFor.push('Template:' + tag);
Morebits.status.warn( 'Info', 'Found {{' + params.tags[i] +
'}} on the redirect already...excluding' );
}
});
 
if (!getRedirectsFor.length) {
addNewTagsToMI();
return;
}
}
 
var api = new Morebits.wiki.api('Getting template redirects', {
tags.sort();
action: 'query',
totalTags = tags.length;
prop: 'linkshere',
$.each(tags, addTag);
titles: getRedirectsFor.join('|'),
redirects: 1,
lhnamespace: '10', // template namespace only
lhshow: 'redirect',
lhlimit: 'max', // 500 is max for normal users, 5000 for bots and sysops
format: 'json'
}, function replaceRedirectTag(apiobj) {
var pages = apiobj.getResponse().query.pages.filter(function(p) {
return !p.missing && !!p.linkshere;
});
pages.forEach(function(page) {
var found = false;
page.linkshere.forEach(function(el) {
var tag = el.title.slice(9);
var tag_re = new RegExp('(\\{\\{' + Morebits.pageNameRegex(tag) + '\\s*(\\|[^}]*)?\\}\\}\\n?)');
if (tag_re.test(pageText)) {
tagText += tag_re.exec(pageText)[1];
pageText = pageText.replace(tag_re, '');
found = true;
return false; // break out of $.each
}
});
if (!found) {
Morebits.status.warn('Info', 'Failed to find the existing {{' +
page.title.slice(9) + '}} on the page... skip repositioning');
}
});
addNewTagsToMI();
});
api.post();
 
if( Twinkle.tag.mode === 'redirect' ) {
pageText += tagText;
} else {
tags = tags.concat(groupableTags);
// smartly insert the new tags after any hatnotes. Regex is a bit more
addUngroupedTags();
// complicated than it'd need to be, to allow templates as parameters,
// and to handle whitespace properly.
pageText = pageText.replace(/^\s*(?:((?:\s*\{\{\s*(?:about|correct title|dablink|distinguish|for|other\s?(?:hurricaneuses|people|persons|places|uses(?:of)?)|redirect(?:-acronym)?|see\s?(?:also|wiktionary)|selfref|the)\d*\s*(\|(?:\{\{[^{}]*\}\}|[^{}])*)?\}\})+(?:\s*\n)?)\s*)?/i,
"$1" + tagText);
}
},
summaryText += ( tags.length > 0 ? ' tag' + ( tags.length > 1 ? 's' : '' ) : '' ) +
' to ' + Twinkle.tag.mode;
 
redirect: function redirect(pageobj) {
// avoid truncated summaries
var params = pageobj.getCallbackParameters(),
if (summaryText.length > (254 - Twinkle.getPref('summaryAd').length)) {
pageText = pageobj.getPageText(),
summaryText = summaryText.replace(/\[\[[^\|]+\|([^\]]+)\]\]/g, "$1");
tagRe, tagText = '', summaryText = 'Added',
}
tags = [], i;
 
for (i = 0; i < params.tags.length; i++) {
pageobj.setPageText(pageText);
tagRe = new RegExp('(\\{\\{' + params.tags[i] + '(\\||\\}\\}))', 'im');
pageobj.setEditSummary(summaryText + Twinkle.getPref('summaryAd'));
if (!tagRe.exec(pageText)) {
pageobj.setWatchlist(Twinkle.getFriendlyPref('watchTaggedPages'));
tags.push(params.tags[i]);
pageobj.setMinorEdit(Twinkle.getFriendlyPref('markTaggedPagesAsMinor'));
} else {
pageobj.setCreateOption('nocreate');
Morebits.status.warn('Info', 'Found {{' + params.tags[i] +
pageobj.save(function() {
'}} on the redirect already...excluding');
// special functions for merge tags
if (params.mergeReason) {
// post the rationale on the talk page (only operates in main namespace)
var talkpageText = "\n\n== Proposed merge with [[" + params.nonDiscussArticle + "]] ==\n\n";
talkpageText += params.mergeReason.trim() + " ~~~~";
 
var talkpage = new Morebits.wiki.page("Talk:" + params.discussArticle, "Posting rationale on talk page");
talkpage.setAppendText(talkpageText);
talkpage.setEditSummary('Proposing to merge [[' + params.nonDiscussArticle + ']] ' +
(tags.indexOf("merge") !== -1 ? 'with' : 'into') + ' [[' + params.discussArticle + ']]' +
Twinkle.getPref('summaryAd'));
talkpage.setWatchlist(Twinkle.getFriendlyPref('watchMergeDiscussions'));
talkpage.setCreateOption('recreate');
talkpage.append();
}
}
if (params.mergeTagOther) {
 
// tag the target page if requested
var addTag = function redirectAddTag(tagIndex, tagName) {
var otherTagName = "merge";
tagText += '\n{{' + tagName;
if (tags.indexOf("merge from") !== -1) {
if (tagName === 'R from alternative language') {
otherTagName = "merge to";
} else if (tagsparams.indexOf("merge to") !== -1altLangFrom) {
otherTagNametagText += "merge '|from"=' + params.altLangFrom;
}
varif newParams =(params.altLangTo) {
tagText += '|to=' + params.altLangTo;
tags: [otherTagName],
}
mergeTarget: Morebits.pageNameNorm,
} else if (tagName === 'R avoided double redirect' && params.doubleRedirectTarget) {
discussArticle: params.discussArticle,
talkDiscussionTitle:tagText += '|1=' + params.talkDiscussionTitledoubleRedirectTarget;
};
var otherpage = new Morebits.wiki.page(params.mergeTarget, "Tagging other page (" +
params.mergeTarget + ")");
otherpage.setCallbackParameters(newParams);
otherpage.load(Twinkle.tag.callbacks.main);
}
tagText += '}}';
 
if (tagIndex > 0) {
// post at WP:PNT for {{not English}} and {{rough translation}} tag
if (paramstagIndex === (tags.translationPostAtPNTlength - 1)) {
summaryText += ' and';
var pntPage = new Morebits.wiki.page('Wikipedia:Pages needing translation into English',
} else if (tagIndex < (tags.length - 1)) {
"Listing article at Wikipedia:Pages needing translation into English");
summaryText += ',';
pntPage.setFollowRedirect(true);
}
pntPage.setCallbackParameters({
template: params.tags.indexOf("rough translation") !== -1 ? "duflu" : "needtrans",
lang: params.translationLanguage,
reason: params.translationComments
});
pntPage.load(Twinkle.tag.callbacks.translationListPage);
}
if (params.translationNotify) {
pageobj.lookupCreator(function(innerPageobj) {
var initialContrib = innerPageobj.getCreator();
 
summaryText += ' {{[[:' + (tagName.indexOf(':') !== -1 ? tagName : 'Template:' + tagName + '|' + tagName) + ']]}}';
// Disallow warning yourself
};
if (initialContrib === mw.config.get('wgUserName')) {
innerPageobj.getStatusElement().warn("You (" + initialContrib + ") created this page; skipping user notification");
return;
}
 
if (!tags.length) {
var userTalkPage = new Morebits.wiki.page('User talk:' + initialContrib,
Morebits.status.warn('Info', 'No tags remaining to apply');
'Notifying initial contributor (' + initialContrib + ')');
}
var notifytext = "\n\n== Your article [[" + Morebits.pageNameNorm + "]]==\n" +
 
"{{subst:uw-notenglish|1=" + Morebits.pageNameNorm +
tags.sort();
(params.translationPostAtPNT ? "" : "|nopnt=yes") + "}} ~~~~";
$.each(tags, addTag);
userTalkPage.setAppendText(notifytext);
 
userTalkPage.setEditSummary("Notice: Please use English when contributing to the English Wikipedia." +
// Check for all Rcat shell redirects (from #433)
Twinkle.getPref('summaryAd'));
if (pageText.match(/{{(?:redr|this is a redirect|r(?:edirect)?(?:.?cat.*)?[ _]?sh)/i)) {
userTalkPage.setCreateOption('recreate');
// Regex inspired by [[User:Kephir/gadgets/sagittarius.js]] ([[Special:PermaLink/831402893]])
userTalkPage.setFollowRedirect(true);
var oldTags = pageText.match(/(\s*{{[A-Za-z\s]+\|(?:\s*1=)?)((?:[^|{}]*|{{[^}]*}})+)(}})\s*/i);
userTalkPage.append();
pageText = pageText.replace(oldTags[0], oldTags[1] + tagText + oldTags[2] + oldTags[3]);
} else {
// Fold any pre-existing Rcats into taglist and under Rcatshell
var pageTags = pageText.match(/\s*{{R(?:edirect)? .*?}}/img);
var oldPageTags = '';
if (pageTags) {
pageTags.forEach(function(pageTag) {
var pageRe = new RegExp(pageTag, 'img');
pageText = pageText.replace(pageRe, '');
pageTag = pageTag.trim();
oldPageTags += '\n' + pageTag;
});
}
pageText += '\n{{Redirect category shell|' + tagText + oldPageTags + '\n}}';
});
 
if( params.patrol ) {
pageobj.patrol();
}
},
 
summaryText += (tags.length > 0 ? ' tag' + (tags.length > 1 ? 's' : ' ') : 'rcat shell') + ' to redirect';
translationListPage: function friendlytagCallbacksTranslationListPage(pageobj) {
var old_text = pageobj.getPageText();
var params = pageobj.getCallbackParameters();
var statelem = pageobj.getStatusElement();
 
// avoid truncated summaries
var templateText = "{{subst:" + params.template + "|pg=" + Morebits.pageNameNorm + "|Language=" +
if (summaryText.length > 499) {
(params.lang || "uncertain") + "|Comments=" + params.reason.trim() + "}} ~~~~";
summaryText = summaryText.replace(/\[\[[^|]+\|([^\]]+)\]\]/g, '$1');
}
 
pageobj.setPageText(pageText);
var text, summary;
pageobj.setEditSummary(summaryText);
if (params.template === "duflu") {
if (Twinkle.getPref('watchTaggedVenues').indexOf('redirects') !== -1) {
text = old_text + "\n\n" + templateText;
pageobj.setWatchlist(Twinkle.getPref('watchTaggedPages'));
summary = "Translation cleanup requested on ";
} else {
text = old_text.replace(/\n+(==\s?Translated pages that could still use some cleanup\s?==)/,
"\n\n" + templateText + "\n\n$1");
summary = "Translation" + (params.lang ? (" from " + params.lang) : "") + " requested on ";
}
pageobj.setMinorEdit(Twinkle.getPref('markTaggedPagesAsMinor'));
pageobj.setCreateOption('nocreate');
pageobj.save();
 
if (text === old_textparams.patrol) {
pageobj.triage();
statelem.error('failed to find target spot for the discussion');
return;
}
 
pageobj.setPageText(text);
pageobj.setEditSummary(summary + " [[" + Morebits.pageNameNorm + "]]" + Twinkle.getPref('summaryAd'));
pageobj.setCreateOption('recreate');
pageobj.save();
},
 
var text = pageobj.getPageText();
var params = pageobj.getCallbackParameters();
var summary = "'Adding "';
 
// Add maintenance tags
if (params.tags.length) {
 
var tagtext = ""'', currentTag;
$.each(params.tags, function(k, tag) {
// when other commons-related tags are placed, remove "move to Commons" tag
if (["'Keep local"', "subst:ncd"'Now Commons', "'Do not move to Commons_reason",Commons'].indexOf(tag) "Do!== not-1) move to Commons",{
text = text.replace(/\{\{(mtc|(copy |move )?to ?commons|move to wikimedia commons|copy to wikimedia commons)[^}]*\}\}/gi, '');
"Now Commons"].indexOf(tag) !== -1) {
text = text.replace(/\{\{(mtc|(copy |move )?to ?commons|move to wikimedia commons|copy to wikimedia commons)[^}]*\}\}/gi, "");
}
if (tag === "Vector version available") {
text = text.replace(/\{\{((convert to |convertto|should be |shouldbe|to)?svg|badpng|vectorize)[^}]*\}\}/gi, "");
}
 
currentTag = "{{" + (tag === "Do not move to Commons_reason" ? "Do not move to Commons" : tag);
 
var input;
switch (tag) {
case "subst:ncd"'Now Commons':
currentTag = 'subst:' + currentTag; // subst
/* falls through */
if (params.nowcommonsName !== '') {
case "Keep local":
currentTag += '|1=' + params.nowcommonsName;
input = prompt( "{{" + (tag === "subst:ncd" ? "Now Commons" : tag) +
"}} - Enter the name of the image on Commons (if different from local name), excluding the File: prefix:", "" );
if (input === null) {
return true; // continue
} else if (input !== "") {
currentTag += '|1=' + input;
}
break;
case "Rename'Keep media"local':
if (params.keeplocalName !== '') {
input = prompt( "{{Rename media}} - Enter the new name for the image (optional):", "" );
currentTag += '|1=' + params.keeplocalName;
if (input === null) {
return true; // continue
} else if (input !== "") {
currentTag += "|1=" + input;
}
input = prompt( "{{Rename media}} - Enter the reason for the rename (optional):", "" );
if (input === null) {
return true; // continue
} else if (input !== "") {
currentTag += "|2=" + input;
}
break;
case "Cleanup'Rename image"media':
if (params.renamemediaNewname !== '') {
/* falls through */
currentTag += '|1=' + params.renamemediaNewname;
case "Cleanup SVG":
input = prompt( "{{" + tag + "}} - Enter the reason for cleanup (required). To skip the tag, click Cancel:", "" );
if (input === null) {
return true; // continue
} else if (input !== "") {
currentTag += "|1=" + input;
}
if (params.renamemediaReason !== '') {
break;
currentTag += '|2=' + params.renamemediaReason;
case "Image-Poor-Quality":
input = prompt( "{{Image-Poor-Quality}} - Enter the reason why this image is so bad (required). To skip the tag, click Cancel:", "" );
if (input === null) {
return true; // continue
} else if (input !== "") {
currentTag += "|1=" + input;
}
break;
case "Low'Cleanup quality chem"image':
currentTag += '|1=' + params.cleanupimageReason;
input = prompt( "{{Low quality chem}} - Enter the reason why the diagram is disputed (required). To skip the tag, click Cancel:", "" );
if (input === null) {
return true; // continue
} else if (input !== "") {
currentTag += "|1=" + input;
}
break;
case "PNG version available"'Image-Poor-Quality':
currentTag += '|1=' + params.ImagePoorQualityReason;
break;
case 'Image hoax':
currentTag += '|date={{subst:CURRENTMONTHNAME}} {{subst:CURRENTYEAR}}';
break;
case 'Low quality chem':
currentTag += '|1=' + params.lowQualityChemReason;
break;
case 'Vector version available':
text = text.replace(/\{\{((convert to |convertto|should be |shouldbe|to)?svg|badpng|vectorize)[^}]*\}\}/gi, '');
/* falls through */
case "Vector'PNG version available"':
/* falls through */
case "'Obsolete"':
currentTag += '|1=' + params[tag.replace(/ /g, '_') + 'File'];
/* falls through */
case "Duplicate":
input = prompt( "{{" + tag + "}} - Enter the name of the file which replaces this one (required). To skip the tag, click Cancel:", "" );
if (input === null) {
return true; // continue
} else if (input !== "") {
currentTag += "|1=" + input;
}
break;
case "'Do not move to Commons_reason"Commons':
currentTag += '|reason=' + params.DoNotMoveToCommons_reason;
input = prompt( "{{Do not move to Commons}} - Enter the reason why this image should not be moved to Commons (required). To skip the tag, click Cancel:", "" );
if (input === nullparams.DoNotMoveToCommons_expiry) {
currentTag += '|expiry=' + params.DoNotMoveToCommons_expiry;
return true; // continue
} else if (input !== "") {
currentTag += "|reason=" + input;
}
break;
case "subst:orfurrev"'Orphaned non-free revisions':
currentTag = 'subst:' + currentTag; // subst
//remove {{non-free reduce}} and redirects
// remove {{non-free reduce}} and redirects
text = text.replace(/\{\{\s*(Template\s*:\s*)?(Non-free reduce|FairUseReduce|Fairusereduce|Fair Use Reduce|Fair use reduce|Reduce size|Reduce|Fair-use reduce|Image-toobig|Comic-ovrsize-img|Non-free-reduce|Nfr|Smaller image|Nonfree reduce)\s*(\|(?:\{\{[^{}]*\}\}|[^{}])*)?\}\}\s*/ig, "");
text = text.replace(/\{\{\s*(Template\s*:\s*)?(Non-free reduce|FairUseReduce|Fairusereduce|Fair Use Reduce|Fair use reduce|Reduce size|Reduce|Fair-use reduce|Image-toobig|Comic-ovrsize-img|Non-free-reduce|Nfr|Smaller image|Nonfree reduce)\s*(\|(?:\{\{[^{}]*\}\}|[^{}])*)?\}\}\s*/ig, '');
currentTag += "|date={{subst:date}}";
currentTag += '|date={{subst:date}}';
break;
case "'Copy to Commons"':
currentTag += "'|human="' + mw.config.get("'wgUserName"');
break;
case 'Should be SVG':
currentTag += '|' + params.svgCategory;
break;
default:
}
 
currentTag = '{{' + currentTag + '}}\n';
if (tag === "Should be SVG") {
currentTag += "|" + params.svgSubcategory;
}
 
currentTag += "}}\n";
 
tagtext += currentTag;
summary += "'{{"' + tag + "'}}, "';
 
return true; // continue
});
 
if (!tagtext) {
pageobj.getStatusElement().warn("'User canceled operation; nothing to do"');
return;
}
 
pageobj.setPageText(text);
pageobj.setEditSummary(summary.substring(0, summary.length - 2) + Twinkle.getPref('summaryAd'));
pageobj.setWatchlistsetChangeTags(Twinkle.getFriendlyPref('watchTaggedPages')changeTags);
if (Twinkle.getPref('watchTaggedVenues').indexOf('files') !== -1) {
pageobj.setMinorEdit(Twinkle.getFriendlyPref('markTaggedPagesAsMinor'));
pageobj.setWatchlist(Twinkle.getPref('watchTaggedPages'));
}
pageobj.setMinorEdit(Twinkle.getPref('markTaggedPagesAsMinor'));
pageobj.setCreateOption('nocreate');
pageobj.save();
 
if ( params.patrol ) {
pageobj.patroltriage();
}
}
Twinkle.tag.callback.evaluate = function friendlytagCallbackEvaluate(e) {
var form = e.target;
var params = {}Morebits.quickForm.getInputData(form);
if (form.patrolPage) {
params.patrol = form.patrolPage.checked;
}
 
 
// Validation
 
// Given an array of incompatible tags, check if we have two or more selected
var checkIncompatible = function(conflicts, extra) {
var count = conflicts.reduce(function(sum, tag) {
return sum += params.tags.indexOf(tag) !== -1;
}, 0);
if (count > 1) {
var message = 'Please select only one of: {{' + conflicts.join('}}, {{') + '}}.';
message += extra ? ' ' + extra : '';
alert(message);
return true;
}
};
 
// We could theoretically put them all checkIncompatible calls in a
// forEach loop, but it's probably clearer not to have [[array one],
// [array two]] devoid of context.
switch (Twinkle.tag.mode) {
case 'article':
params.tagstagsToRemove = form.getCheckedgetUnchecked( 'articleTagsexistingTags' ); // not in `input`
params.tagsToRemain = params.existingTags || []; // container not created if none present
params.group = form.group.checked;
 
params.tagParameters = {
if ((params.tags.indexOf('Merge') !== -1) || (params.tags.indexOf('Merge from') !== -1) ||
cleanup: form["articleTags.cleanup"] ? form["articleTags.cleanup"].value : null,
(params.tags.indexOf('Merge to') !== -1)) {
copyEdit: form["articleTags.copyEdit"] ? form["articleTags.copyEdit"].value : null,
if (checkIncompatible(['Merge', 'Merge from', 'Merge to'], 'If several merges are required, use {{Merge}} and separate the article names with pipes (although in this case Twinkle cannot tag the other articles automatically).')) {
copypaste: form["articleTags.copypaste"] ? form["articleTags.copypaste"].value : null,
return;
expertSubject: form["articleTags.expertSubject"] ? form["articleTags.expertSubject"].value : null,
}
globalize: form["articleTags.globalize"] ? form["articleTags.globalize"].value : null,
if ((params.mergeTagOther || params.mergeReason) && params.mergeTarget.indexOf('|') !== -1) {
notability: form["articleTags.notability"] ? form["articleTags.notability"].value : null
alert('Tagging multiple articles in a merge, and starting a discussion for multiple articles, is not supported at the moment. Please turn off "tag other article", and/or clear out the "reason" box, and try again.');
};
return;
// common to {{merge}}, {{merge from}}, {{merge to}}
}
params.mergeTarget = form["articleTags.mergeTarget"] ? form["articleTags.mergeTarget"].value : null;
}
params.mergeReason = form["articleTags.mergeReason"] ? form["articleTags.mergeReason"].value : null;
 
params.mergeTagOther = form["articleTags.mergeTagOther"] ? form["articleTags.mergeTagOther"].checked : false;
//if common to {{not(checkIncompatible(['Not English}}', {{rough'Rough translation}}'])) {
return;
params.translationLanguage = form["articleTags.translationLanguage"] ? form["articleTags.translationLanguage"].value : null;
}
params.translationNotify = form["articleTags.translationNotify"] ? form["articleTags.translationNotify"].checked : null;
params.translationPostAtPNT = form["articleTags.translationPostAtPNT"] ? form["articleTags.translationPostAtPNT"].checked : null;
params.translationComments = form["articleTags.translationComments"] ? form["articleTags.translationComments"].value : null;
break;
 
case 'file':
if (checkIncompatible(['Bad GIF', 'Bad JPEG', 'Bad SVG', 'Bad format'])) {
params.svgSubcategory = form["imageTags.svgCategory"] ? form["imageTags.svgCategory"].value : null;
return;
params.tags = form.getChecked( 'imageTags' );
}
if (checkIncompatible(['Should be PNG', 'Should be SVG', 'Should be text'])) {
return;
}
if (checkIncompatible(['Bad SVG', 'Vector version available'])) {
return;
}
if (checkIncompatible(['Bad JPEG', 'Overcompressed JPEG'])) {
return;
}
if (checkIncompatible(['PNG version available', 'Vector version available'])) {
return;
}
 
// Get extension from either mime-type or title, if not present (e.g., SVGs)
var extension = ((extension = $('.mime-type').text()) && extension.split(/\//)[1]) || mw.Title.newFromText(Morebits.pageNameNorm).getExtension();
if (extension) {
var extensionUpper = extension.toUpperCase();
// What self-respecting file format has *two* extensions?!
if (extensionUpper === 'JPG') {
extension = 'JPEG';
}
 
// Check that selected templates make sense given the file's extension.
 
// Bad GIF|JPEG|SVG
var badIndex; // Keep track of where the offending template is so we can reference it below
if ((extensionUpper !== 'GIF' && ((badIndex = params.tags.indexOf('Bad GIF')) !== -1)) ||
(extensionUpper !== 'JPEG' && ((badIndex = params.tags.indexOf('Bad JPEG')) !== -1)) ||
(extensionUpper !== 'SVG' && ((badIndex = params.tags.indexOf('Bad SVG')) !== -1))) {
var suggestion = 'This appears to be a ' + extension + ' file, ';
if (['GIF', 'JPEG', 'SVG'].indexOf(extensionUpper) !== -1) {
suggestion += 'please use {{Bad ' + extensionUpper + '}} instead.';
} else {
suggestion += 'so {{' + params.tags[badIndex] + '}} is inappropriate.';
}
alert(suggestion);
return;
}
// Should be PNG|SVG
if ((params.tags.toString().indexOf('Should be ') !== -1) && (params.tags.indexOf('Should be ' + extensionUpper) !== -1)) {
alert('This is already a ' + extension + ' file, so {{Should be ' + extensionUpper + '}} is inappropriate.');
return;
}
 
// Overcompressed JPEG
if (params.tags.indexOf('Overcompressed JPEG') !== -1 && extensionUpper !== 'JPEG') {
alert('This appears to be a ' + extension + ' file, so {{Overcompressed JPEG}} probably doesn\'t apply.');
return;
}
// Bad trace and Bad font
if (extensionUpper !== 'SVG') {
if (params.tags.indexOf('Bad trace') !== -1) {
alert('This appears to be a ' + extension + ' file, so {{Bad trace}} probably doesn\'t apply.');
return;
} else if (params.tags.indexOf('Bad font') !== -1) {
alert('This appears to be a ' + extension + ' file, so {{Bad font}} probably doesn\'t apply.');
return;
}
}
}
 
if (params.tags.indexOf('Do not move to Commons') !== -1 && params.DoNotMoveToCommons_expiry &&
(!/^2\d{3}$/.test(params.DoNotMoveToCommons_expiry) || parseInt(params.DoNotMoveToCommons_expiry, 10) <= new Date().getYear() + 1900)) {
alert('Must be a valid future year.');
return;
}
break;
 
case 'redirect':
params.tags = form.getChecked( 'redirectTags' );
break;
 
default:
alert("'Twinkle.tag: unknown mode "' + Twinkle.tag.mode);
break;
}
 
// File/redirect: return if no tags selected
// form validation
// Article: return if no tag is selected and no already present tag is deselected
if( !params.tags.length ) {
if (params.tags.length === 0 && (Twinkle.tag.mode !== 'article' || params.tagsToRemove.length === 0)) {
alert( 'You must select at least one tag!' );
alert('You must select at least one tag!');
return;
}
if( ((params.tags.indexOf("merge") !== -1) + (params.tags.indexOf("merge from") !== -1) +
(params.tags.indexOf("merge to") !== -1)) > 1 ) {
alert( 'Please select only one of {{merge}}, {{merge from}}, and {{merge to}}. If several merges are required, use {{merge}} and separate the article names with pipes (although in this case Twinkle cannot tag the other articles automatically).' );
return;
}
if( (params.tags.indexOf("not Tamil") !== -1) && (params.tags.indexOf("rough translation") !== -1) ) {
alert( 'Please select only one of {{not Tamil}} and {{rough translation}}.' );
return;
}
if( (params.mergeTagOther || params.mergeReason) && params.mergeTarget.indexOf('|') !== -1 ) {
alert( 'Tagging multiple articles in a merge, and starting a discussion for multiple articles, is not supported at the moment. Please turn off "tag other article", and/or clear out the "reason" box, and try again.' );
return;
}
if( params.tags.indexOf('cleanup') !== -1 && params.tagParameters.cleanup.trim && params.tagParameters.cleanup.trim() === "") {
alert( 'You must specify a reason for the {{cleanup}} tag.' );
return;
}
 
Morebits.simpleWindow.setButtonsEnabled( false );
Morebits.status.init( form );
 
Morebits.wiki.actionCompleted.redirect = Morebits.pageNameNorm;
Morebits.wiki.actionCompleted.notice = "'Tagging complete, reloading article in a few seconds"';
if (Twinkle.tag.mode === 'redirect') {
Morebits.wiki.actionCompleted.followRedirect = false;
}
 
var wikipedia_page = new Morebits.wiki.page(Morebits.pageNameNorm, "'Tagging "' + Twinkle.tag.mode);
wikipedia_page.setCallbackParameters(params);
wikipedia_page.setChangeTags(Twinkle.changeTags); // Here to apply to triage
switch (Twinkle.tag.mode) {
wikipedia_page.load(Twinkle.tag.callbacks[Twinkle.tag.mode]);
case 'article':
 
/* falls through */
case 'redirect':
wikipedia_page.load(Twinkle.tag.callbacks.main);
return;
case 'file':
wikipedia_page.load(Twinkle.tag.callbacks.file);
return;
default:
alert("Twinkle.tag: unknown mode " + Twinkle.tag.mode);
break;
}
};
 
Twinkle.addInitCallback(Twinkle.tag, 'tag');
})(jQuery);
// </nowiki>
 
 
//</nowiki>
10,498

தொகுப்புகள்

"https://ta.wikipedia.org/wiki/சிறப்பு:MobileDiff/3108515" இருந்து மீள்விக்கப்பட்டது