diff --git a/extension.json b/extension.json index d0c659b5..b58b7e60 100644 --- a/extension.json +++ b/extension.json @@ -241,6 +241,11 @@ "enabled": true, "priority": "none", "no-params": true + }, + "duplicate-ids": { + "dbid": 25, + "enabled": true, + "priority": "high" } } }, diff --git a/i18n/en.json b/i18n/en.json index 67e8bd8d..0c99a704 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -11,6 +11,8 @@ "linter-category-large-tables-desc": "These pages have tables that are hard to view on mobile", "linter-category-deletable-table-tag": "Table tag that should be deleted", "linter-category-deletable-table-tag-desc": "These pages have table tags that should be deleted.", + "linter-category-duplicate-ids": "Duplicate Ids", + "linter-category-duplicate-ids-desc": "These pages have elements with duplicate id attributes.", "linter-category-fostered": "Fostered content", "linter-category-fostered-desc": "These pages have fostered content.", "linter-category-fostered-transparent": "Fostered rendering-transparent content", @@ -78,6 +80,7 @@ "linter-pager-category-header": "Category", "linter-pager-deletable-table-tag-details": "Table tag that should be deleted", "linter-pager-details-header": "Additional info", + "linter-pager-duplicate-ids-details": "Duplicate ids", "linter-pager-fostered-details": "Fostered content", "linter-pager-fostered-transparent-details": "Fostered rendering-transparent content", "linter-pager-html5-misnesting-details": "Misnesting (now broken)", diff --git a/i18n/qqq.json b/i18n/qqq.json index b9aaea0f..5d752764 100644 --- a/i18n/qqq.json +++ b/i18n/qqq.json @@ -20,6 +20,8 @@ "linter-category-large-tables-desc": "Description of category\n\nSimilar messages:\n* {{msg-mw|Linter-category-bogus-image-options-desc}}\n* {{msg-mw|Linter-category-fostered-desc}}\netc.", "linter-category-deletable-table-tag": "Name of lint error category. See [[:mw:Help:Lint errors/deletable-table-tag]]", "linter-category-deletable-table-tag-desc": "Description of category\n\nSimilar messages:\n* {{msg-mw|Linter-category-bogus-image-options-desc}}\n* {{msg-mw|Linter-category-fostered-desc}}\netc.", + "linter-category-duplicate-ids": "Name of lint error category. See [[:mw:Help:Lint errors/duplicate-ids]]", + "linter-category-duplicate-ids-desc": "Description of category\n\nSimilar messages:\n* {{msg-mw|Linter-category-deletable-table-tag-desc}}\n* {{msg-mw|Linter-category-fostered-desc}}\netc.", "linter-category-fostered": "Name of lint error category. See [[:mw:Help:Lint errors/fostered]]", "linter-category-fostered-desc": "Description of category. This lint error is explained on [[mw:Special:MyLanguage/Help:Lint errors/fostered]].\n\nSimilar messages:\n* {{msg-mw|Linter-category-bogus-image-options-desc}}\n* {{msg-mw|Linter-category-deletable-table-tag-desc}}\netc.", "linter-category-fostered-transparent": "Name of lint error category. See [[:mw:Help:Lint errors/fostered-transparent]]\n* '''“Rendering-transparent content” means: content that is invisible in output rendering.'''\n* '''“Fostered content” means: content located in a table but misplaced, i.e., not in table cells, table headings, or captions.'''", @@ -87,6 +89,7 @@ "linter-pager-category-header": "Heading of a table column showing the category of a lint error.\n{{identical|Category}}", "linter-pager-deletable-table-tag-details": "Table column heading", "linter-pager-details-header": "Table column heading for the linter error details", + "linter-pager-duplicate-ids-details": "Table column heading", "linter-pager-fostered-details": "Table column heading.", "linter-pager-fostered-transparent-details": "Table column heading.\n* '''“Rendering-transparent content” means: content that is invisible in output rendering.'''\n* '''“Fostered content” means: content located in a table but misplaced, i.e., not in table cells, table headings, or captions.'''", "linter-pager-html5-misnesting-details": "Table column heading.", diff --git a/includes/LintErrorsPager.php b/includes/LintErrorsPager.php index 33b728a0..9f65173d 100644 --- a/includes/LintErrorsPager.php +++ b/includes/LintErrorsPager.php @@ -249,6 +249,8 @@ class LintErrorsPager extends TablePager { return Html::element( 'a', [ 'href' => $title->getLocalUrl(), ], $title ); + } elseif ( $category === 'duplicate-ids' ) { + return Html::element( 'code', [], $lintError->params['id'] ); } return ''; case 'template':