jenkins-bot has submitted this change and it was merged. (
https://gerrit.wikimedia.org/r/343281 )
Change subject: Add a tracking category when a template loop is detected
......................................................................
Add a tracking category when a template loop is detected
Bug: T160743
Change-Id: Ib888634af281fc2347eaa389db4141782a98c15c
---
M includes/TrackingCategories.php
M includes/parser/Parser.php
M languages/i18n/en.json
M languages/i18n/qqq.json
4 files changed, 6 insertions(+), 0 deletions(-)
Approvals:
Florianschmidtwelzow: Looks good to me, approved
jenkins-bot: Verified
diff --git a/includes/TrackingCategories.php b/includes/TrackingCategories.php
index 825860a..a9ebd76 100644
--- a/includes/TrackingCategories.php
+++ b/includes/TrackingCategories.php
@@ -45,6 +45,7 @@
'expansion-depth-exceeded-category',
'restricted-displaytitle-ignored',
'deprecated-self-close-category',
+ 'template-loop-category',
];
/**
diff --git a/includes/parser/Parser.php b/includes/parser/Parser.php
index 8db1fe3..47d9a62 100644
--- a/includes/parser/Parser.php
+++ b/includes/parser/Parser.php
@@ -3257,6 +3257,7 @@
$text = '<span class="error">'
. wfMessage(
'parser-template-loop-warning', $titleText )->inContentLanguage()->text()
. '</span>';
+ $this->addTrackingCategory(
'template-loop-category' );
wfDebug( __METHOD__ . ": template loop broken
at '$titleText'\n" );
}
}
diff --git a/languages/i18n/en.json b/languages/i18n/en.json
index 2ef4f3a..7584a0a 100644
--- a/languages/i18n/en.json
+++ b/languages/i18n/en.json
@@ -792,6 +792,8 @@
"post-expand-template-argument-warning": "<strong>Warning:</strong>
This page contains at least one template argument that has a too large
expansion size.\nThese arguments have been omitted.",
"post-expand-template-argument-category": "Pages containing omitted
template arguments",
"parser-template-loop-warning": "Template loop detected: [[$1]]",
+ "template-loop-category": "Pages with template loops",
+ "template-loop-category-desc": "The page contains a template loop, ie.
a template which calls itself recursively.",
"parser-template-recursion-depth-warning": "Template recursion depth
limit exceeded ($1)",
"language-converter-depth-warning": "Language converter depth limit
exceeded ($1)",
"node-count-exceeded-category": "Pages where node count is exceeded",
diff --git a/languages/i18n/qqq.json b/languages/i18n/qqq.json
index c3a871f..a67e90f 100644
--- a/languages/i18n/qqq.json
+++ b/languages/i18n/qqq.json
@@ -979,6 +979,8 @@
"post-expand-template-argument-warning": "Used as warning in parser
limitation.\n\nSee also:\n* {{msg-mw|Post-expand-template-argument-category}}",
"post-expand-template-argument-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 omitted
template arguments.\n\nSee also:\n*
{{msg-mw|Post-expand-template-argument-category-desc}}\n*
{{msg-mw|Post-expand-template-argument-warning}}",
"parser-template-loop-warning": "Parameters:\n* $1 - page title",
+ "template-loop-category": "This message is used as a category name for
a [[mw:Special:MyLanguage/Help:Tracking categories|tracking category]] where
pages with template loops will be listed.",
+ "template-loop-category-desc": "Pages with template loops category
description. Shown on [[Special:TrackingCategories]].\n\nSee also:\n*
{{msg-mw|Template-loop-category}}",
"parser-template-recursion-depth-warning": "Parameters:\n* $1 - limit
value of recursion depth",
"language-converter-depth-warning": "Error message shown when a page
uses too deeply nested language conversion syntax. Parameters:\n* $1 - the
value of the depth limit",
"node-count-exceeded-category": "This message is used as a category
name for a [[mw:Help:Tracking categories|tracking category]] where pages are
placed automatically if the node-count of the preprocessor exceeds the
limit.\n\nSee also:\n* {{msg-mw|Node-count-exceeded-warning}}",
--
To view, visit https://gerrit.wikimedia.org/r/343281
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ib888634af281fc2347eaa389db4141782a98c15c
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Matěj Suchánek <[email protected]>
Gerrit-Reviewer: Bartosz Dziewoński <[email protected]>
Gerrit-Reviewer: Florianschmidtwelzow <[email protected]>
Gerrit-Reviewer: Legoktm <[email protected]>
Gerrit-Reviewer: Reedy <[email protected]>
Gerrit-Reviewer: Siebrand <[email protected]>
Gerrit-Reviewer: Tim Starling <[email protected]>
Gerrit-Reviewer: Umherirrender <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits