$wgTrackingCategories = array(
'index-category',
'noindex-category',
+ 'duplicate-args-category',
'expensive-parserfunction-category',
'post-expand-template-argument-category',
'post-expand-template-inclusion-category',
// Numbered parameter
$index = $nameNodes->item( 0 )->attributes->getNamedItem( 'index' )->textContent;
$index = $index - $indexOffset;
+ if ( isset( $namedArgs[$index] ) || isset( $numberedArgs[$index] ) ) {
+ $this->parser->addTrackingCategory( 'duplicate-args-category' );
+ }
$numberedArgs[$index] = $value->item( 0 );
unset( $namedArgs[$index] );
} else {
// Named parameter
$name = trim( $this->expand( $nameNodes->item( 0 ), PPFrame::STRIP_COMMENTS ) );
+ if ( isset( $namedArgs[$name] ) || isset( $numberedArgs[$name] ) ) {
+ $this->parser->addTrackingCategory( 'duplicate-args-category' );
+ }
$namedArgs[$name] = $value->item( 0 );
unset( $numberedArgs[$name] );
}
if ( $bits['index'] !== '' ) {
// Numbered parameter
$index = $bits['index'] - $indexOffset;
+ if ( isset( $namedArgs[$index] ) || isset( $numberedArgs[$index] ) ) {
+ $this->parser->addTrackingCategory( 'duplicate-args-category' );
+ }
$numberedArgs[$index] = $bits['value'];
unset( $namedArgs[$index] );
} else {
// Named parameter
$name = trim( $this->expand( $bits['name'], PPFrame::STRIP_COMMENTS ) );
+ if ( isset( $namedArgs[$name] ) || isset( $numberedArgs[$name] ) ) {
+ $this->parser->addTrackingCategory( 'duplicate-args-category' );
+ }
$namedArgs[$name] = $bits['value'];
unset( $numberedArgs[$name] );
}
"content-model-text": "plain text",
"content-model-javascript": "JavaScript",
"content-model-css": "CSS",
+ "duplicate-args-category": "Pages using duplicate arguments in template calls",
+ "duplicate-args-category-desc": "The page contains template calls that use duplicates of arguments, such as <code><nowiki>{{foo|bar=1|bar=2}}</nowiki></code> or <code><nowiki>{{foo|bar|1=baz}}</nowiki></code>.",
"expensive-parserfunction-warning": "<strong>Warning:</strong> This page contains too many expensive parser function calls.\n\nIt should have less than $2 {{PLURAL:$2|call|calls}}, there {{PLURAL:$1|is now $1 call|are now $1 calls}}.",
"expensive-parserfunction-category": "Pages with too many expensive parser function calls",
"post-expand-template-inclusion-warning": "<strong>Warning:</strong> Template include size is too large.\nSome templates will not be included.",
"content-model-text": "Name for the plain text content model, used when decribing what type of content a page contains.\n\nThis message is substituted in:\n*{{msg-mw|Bad-target-model}}\n*{{msg-mw|Content-not-allowed-here}}\n{{Identical|Plain text}}",
"content-model-javascript": "Name for the JavaScript content model, used when decribing what type of content a page contains.\n\nThis message is substituted in:\n*{{msg-mw|Bad-target-model}}\n*{{msg-mw|Content-not-allowed-here}}",
"content-model-css": "Name for the CSS content model, used when decribing what type of content a page contains.\n\nThis message is substituted in:\n*{{msg-mw|Bad-target-model}}\n*{{msg-mw|Content-not-allowed-here}}",
+ "duplicate-args-category": "This message is used as a category name for a [[mw:Special:MyLanguage/Help:Tracking categories|tracking category]] where pages are placed automatically if they contain template calls that use duplicates of arguments, such as <code><nowiki>{{foo|bar=1|bar=2}}</nowiki></code> or <code><nowiki>{{foo|bar|1=baz}}</nowiki></code>.",
+ "duplicate-args-category-desc": "Duplicate arguments category description. Shown on [[Special:TrackingCategories]].\n\nSee also:\n* {{msg-mw|Duplicate-args-category}}",
"expensive-parserfunction-warning": "On some (expensive) [[MetaWikipedia:Help:ParserFunctions|parser functions]] (e.g. <code><nowiki>{{#ifexist:}}</nowiki></code>) there is a limit of how many times it may be used. This is an error message shown when the limit is exceeded.\n\nParameters:\n* $1 - the current number of parser function calls\n* $2 - the allowed number of parser function calls\nSee also [[:mw:Manual:$wgExpensiveParserFunctionLimit|$wgExpensiveParserFunctionLimit in the MediaWiki manual]].\n\nSee also:\n* {{msg-mw|Expensive-parserfunction-category}}",
"expensive-parserfunction-category": "This message is used as a category name for a [[mw:Special:MyLanguage/Help:Tracking categories|tracking category]] where pages are placed automatically if they contain too many calls to expensive parser functions.\n\nSee also:\n* {{msg-mw|Expensive-parserfunction-category-desc}}\n* {{msg-mw|Expensive-parserfunction-warning}}",
"post-expand-template-inclusion-warning": "When templates are expanded, there is a size limit for the number of bytes yielded. Usually that occurs from excessively nested templates, recursive templates, or ones having x-zillion of #if #case or similar contructs in them. When the wikicode parser detects this, it outputs a red warning message to the page.\n\n\nSee also:\n* {{msg-mw|Post-expand-template-inclusion-category}}",