Permalink
Browse files

tag: update articleissues list; remove note to self in image tags list

I have turned the groupHash into an array, because it didn't make sense for it to be a hash.
I also removed a note I left to myself in the description for the {{rename media}} tag...
  • Loading branch information...
atlight committed Jul 29, 2011
1 parent f8ac117 commit 8bd4098157d1215aa8e06d1944597ebcba125fd8
Showing with 134 additions and 108 deletions.
  1. +134 −108 modules/friendlytag.js
View
@@ -121,7 +121,7 @@ Twinkle.tag.maintenanceList = [
value: 'allplot'
},
{
label: '{{catimprove}}: article may require additional categories.',
label: '{{catimprove}}: article may require additional categories',
value: 'catimprove'
},
{
@@ -686,7 +686,7 @@ Twinkle.tag.file.cleanupList = [
{ 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}}: this tag should not be under the "cleanup" heading', value: 'Rename media' },
{ 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',
@@ -740,118 +740,144 @@ Twinkle.tag.file.replacementList = [
];
// Set to true if template can be grouped into {{articleissues}}
Twinkle.tag.groupHash = {
'3O': true,
'advert': true,
'autobiography': true,
'biased': true,
'blpdispute': true,
'BLPrefimprove': true,
'BLPsources': true,
'BLP sources': true,
'BLPunsourced': true,
'BLPunreferenced': true,
'BLPunref': true,
'citations missing': true,
'citationstyle': true,
'citecheck': true,
'cleanup': true,
'COI': true,
'coi': true,
'colloquial': true,
'confusing': true,
'context': true,
'contradict': true,
'copyedit': true,
'citation style': true,
'criticisms': true,
'crystal': true,
'deadend': true,
'disputed': true,
'essay': true,
'essay-like': true,
'examplefarm': true,
'expert': false,
'external links': true,
'fancruft': true,
'fansite': true,
'fiction': true,
'gameguide': true,
'globalize': true,
'grammar': true,
'histinfo': true,
'hoax': true,
'howto': true,
'importance': true,
'inappropriate person': true,
'incomplete': true,
'lead missing': true,
'lead rewrite': true,
'lead too long': true,
'lead too short': true,
'in-universe': true,
'jargon': true,
'laundry': true,
'laundrylists': true,
'likeresume': true,
'long': true,
'newsrelease': true,
'notability': true,
'notable': true,
'NPOV': true,
'npov': true,
'one source': true,
'OR': true,
'or': true,
'original research': true,
'orphan': true,
'out of date': true,
'peacock': true,
'plot': true,
'POV': true,
'pov': true,
'primarysources': true,
'prose': true,
'proseline': true,
'quotefarm': true,
'recentism': true,
'refimprove': true,
'refimproveBLP': true,
'restructure': true,
'review': true,
'rewrite': true,
'roughtranslation': true,
'sections': true,
'self-published': true,
'spam': true,
'story': true,
'synthesis': true,
'technical': true,
'tone': true,
'toolong': true,
'tooshort': true,
'travelguide': true,
'trivia': true,
'unbalanced': true,
'unencyclopedic': true,
'unref': true,
'unreferenced': true,
'unrefBLP': true,
'unreferencedBLP': true,
'update': true,
'verylong': true,
'weasel': true,
'wikify': true
};
// Contains those article tags that can be grouped into {{multiple issues}}.
// This list includes synonyms.
Twinkle.tag.groupHash = [
'advert',
'autobiography',
'BLP IMDb refimprove',
'BLP IMDb-only refimprove',
'BLP sources',
'BLP unsourced',
'BLPrefimprove',
'BLPsources',
'BLPunref',
'BLPunreferenced',
'BLPunsourced',
'citation style',
'citations missing',
'cite check',
'citecheck',
'cleanup',
'cleanup-laundry',
'cleanup-link rot',
'cleanup-reorganize',
'cleanup-rewrite',
'cleanup-spam',
'coi',
'COI',
'colloquial',
'confusing',
'context',
'contradict',
'copy edit',
'copyedit',
'criticism section',
'criticisms',
'crystal',
'dead end',
'deadend',
'disputed',
'do-attempt',
'essay',
'essay-like',
'example farm',
'examplefarm',
'expert',
'external links',
'fancruft',
'fanpov',
'fansite',
'fiction',
'game guide',
'gameguide',
'globalize',
'grammar',
'histinfo',
'hoax',
'howto',
'inappropriate person',
'inappropriate tone',
'incomplete',
'intro length',
'intromissing',
'introrewrite',
'intro-toolong',
'intro-tooshort',
'in-universe',
'jargon',
'laundry',
'laundrylists',
'lead missing',
'lead rewrite',
'lead too long',
'lead too short',
'like resume',
'likeresume',
'linkrot',
'long',
'news release',
'newsrelease',
'notability',
'notable',
'npov',
'one source',
'onesource',
'organize',
'original research',
'orphan',
'out of date',
'over detailed',
'peacock',
'plot',
'pov',
'POV',
'pov-check',
'POV-check',
'primary sources',
'primarysources',
'prose',
'quote farm',
'quotefarm',
'recentism',
'refimprove',
'refimproveBLP',
'reorganisation',
'restructure',
'review',
'rewrite',
'sections',
'self-published',
'spam',
'story',
'synthesis',
'technical',
'tone',
'travel guide',
'travelguide',
'trivia',
'unbalanced',
'unencyclopedic',
'unref',
'unrefBLP',
'unreferenced',
'unreferencedBLP',
'unreliable sources',
'unreliable',
'update',
'very long',
'verylong',
'weasel',
'wikify'
];
Twinkle.tag.callbacks = {
main: function( pageobj ) {
var params = pageobj.getCallbackParameters();
var tagRe, tagText = '', summaryText = 'Added';
var tags = [], groupableTags = [];
//Remove tags that become superfluous with this action
// Remove tags that become superfluous with this action
var pageText = pageobj.getPageText().replace(/\{\{\s*(New unreviewed article|Userspace draft)\s*(\|(?:\{\{[^{}]*\}\}|[^{}])*)?\}\}\s*/ig, "");
var i;
@@ -860,7 +886,7 @@ Twinkle.tag.callbacks = {
for( i = 0; i < params.tags.length; i++ ) {
tagRe = new RegExp( '(\\{\\{' + params.tags[i] + '(\\||\\}\\}))', 'im' );
if( !tagRe.exec( pageText ) ) {
if( Twinkle.tag.groupHash[ params.tags[i] ] &&
if( Twinkle.tag.groupHash.indexOf(params.tags[i]) !== -1 &&
(params.tags[i] !== 'globalize' || params.globalizeSubcategory === 'globalize' ) &&
(params.tags[i] !== 'notability' || params.notabilitySubcategory === 'none' )) {
// don't add to multipleissues for globalize/notability subcats

0 comments on commit 8bd4098

Please sign in to comment.