jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/347983 )
Change subject: Add pwrap-bug-workaround linter category ...................................................................... Add pwrap-bug-workaround linter category Change-Id: If1ec022e5bb741f4dc825428b5a689c2f0b0c445 --- M extension.json M i18n/en.json M i18n/qqq.json M includes/CategoryManager.php M includes/LintErrorsPager.php 5 files changed, 16 insertions(+), 0 deletions(-) Approvals: jenkins-bot: Verified Arlolra: Looks good to me, approved diff --git a/extension.json b/extension.json index 16e2ad1..0ce21f0 100644 --- a/extension.json +++ b/extension.json @@ -88,6 +88,10 @@ "misnested-tag": { "severity": "warning", "enabled": true + }, + "pwrap-bug-workaround": { + "severity": "warning", + "enabled": true } }, "LinterSubmitterWhitelist": { diff --git a/i18n/en.json b/i18n/en.json index bed97b6..d00799e 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -17,6 +17,7 @@ "linter-pager-self-closed-tag-details": "Self-closed tag", "linter-pager-deletable-table-tag-details": "Table tag that should be deleted", "linter-pager-misnested-tag-details": "Misnested tag which should be properly nested", + "linter-pager-pwrap-bug-workaround-details": "Paragraph wrapping bug workaround", "linter-category-fostered": "Fostered content", "linter-category-fostered-desc": "These pages have fostered content.", "linter-category-obsolete-tag": "Obsolete HTML tags", @@ -33,6 +34,8 @@ "linter-category-deletable-table-tag-desc": "These pages have table tags that should be deleted.", "linter-category-misnested-tag": "Misnested tags", "linter-category-misnested-tag-desc": "These pages have misnested tags that could be fixed.", + "linter-category-pwrap-bug-workaround": "Paragraph wrapping bug workaround", + "linter-category-pwrap-bug-workaround-desc": "These pages have a paragraph wrapping bug that could be worked around.", "linter-numerrors": "($1 {{PLURAL:$1|error|errors}})", "linker-page-title-edit": "$1 ($2)", "linker-page-edit": "edit", diff --git a/i18n/qqq.json b/i18n/qqq.json index b61d5de..daea3b2 100644 --- a/i18n/qqq.json +++ b/i18n/qqq.json @@ -19,6 +19,7 @@ "linter-pager-self-closed-tag-details": "Table column heading", "linter-pager-deletable-table-tag-details": "Table column heading", "linter-pager-misnested-tag-details": "Table column heading", + "linter-pager-pwrap-bug-workaround-details": "Table column heading", "linter-category-fostered": "Name of lint error category. See [[:mw:Help:Extension:Linter/fostered]]", "linter-category-fostered-desc": "Description of category.", "linter-category-obsolete-tag": "Name of lint error category. See [[:mw:Help:Extension:Linter/obsolete-tag]]", @@ -35,6 +36,8 @@ "linter-category-deletable-table-tag-desc": "Description of category.", "linter-category-misnested-tag": "Name of lint error category. See [[:mw:Help:Extension:Linter/misnested-tag]]", "linter-category-misnested-tag-desc": "Description of category.", + "linter-category-pwrap-bug-workaround": "Name of lint error category. See [[:mw:Help:Extension:Linter/pwrap-bug-workaround]]", + "linter-category-pwrap-bug-workaround-desc": "Description of category.", "linter-numerrors": "Shown after a category link to indicate how many errors are in that category. $1 is the number of errors, and can be used for PLURAL.\n{{Identical|Error}}", "linker-page-title-edit": "Used in a table cell. $1 is a link to the page, $2 is pipe separated links to the edit and history pages, the link text is {{msg-mw|linker-page-edit}} and {{msg-mw|linker-page-history}}", "linker-page-edit": "Link text for edit link in {{msg-mw|linker-page-title-edit}}\n{{Identical|Edit}}", diff --git a/includes/CategoryManager.php b/includes/CategoryManager.php index 2d529dd..b7a7b78 100644 --- a/includes/CategoryManager.php +++ b/includes/CategoryManager.php @@ -43,6 +43,7 @@ 'self-closed-tag' => 6, 'deletable-table-tag' => 7, 'misnested-tag' => 8, + 'pwrap-bug-workaround' => 9, ]; /** diff --git a/includes/LintErrorsPager.php b/includes/LintErrorsPager.php index db762a6..6766799 100644 --- a/includes/LintErrorsPager.php +++ b/includes/LintErrorsPager.php @@ -134,6 +134,11 @@ return Html::element( 'code', [], $in ); }, $lintError->params['items'] ); return $this->getLanguage()->commaList( $list ); + } elseif ( $this->category === 'pwrap-bug-workaround' && + isset( $lintError->params['root'] ) && + isset( $lintError->params['child'] ) ) { + return Html::element( 'code', [], + $lintError->params['root'] . " > " . $lintError->params['child'] ); } return ''; case 'template': -- To view, visit https://gerrit.wikimedia.org/r/347983 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: If1ec022e5bb741f4dc825428b5a689c2f0b0c445 Gerrit-PatchSet: 3 Gerrit-Project: mediawiki/extensions/Linter Gerrit-Branch: master Gerrit-Owner: Subramanya Sastry <ssas...@wikimedia.org> Gerrit-Reviewer: Arlolra <abrea...@wikimedia.org> Gerrit-Reviewer: Legoktm <lego...@member.fsf.org> Gerrit-Reviewer: Siebrand <siebr...@kitano.nl> Gerrit-Reviewer: Subramanya Sastry <ssas...@wikimedia.org> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits