jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/344199 )

Change subject: Add link to history on Special:LintErrors
......................................................................


Add link to history on Special:LintErrors

Bug: T160607
Change-Id: Ifd2ef33dd7477722691c8f2e570b7ac1af206135
---
M i18n/en.json
M i18n/qqq.json
M includes/LintErrorsPager.php
3 files changed, 14 insertions(+), 2 deletions(-)

Approvals:
  jenkins-bot: Verified
  Arlolra: Looks good to me, approved



diff --git a/i18n/en.json b/i18n/en.json
index 283dfe0..7f1d800 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -29,6 +29,7 @@
        "linter-numerrors": "($1 {{PLURAL:$1|error|errors}})",
        "linker-page-title-edit": "$1 ($2)",
        "linker-page-edit": "edit",
+       "linker-page-history": "history",
        "linter-heading-errors": "Errors",
        "linter-heading-warnings": "Warnings",
        "pageinfo-linter": "Lint errors",
diff --git a/i18n/qqq.json b/i18n/qqq.json
index d2d9e30..a723533 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -29,8 +29,9 @@
        "linter-category-self-closed-tag": "Name of lint error category. See 
[[:mw:Help:Extension:Linter/self-closed-tag]]",
        "linter-category-self-closed-tag-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 a link to edit that page, the link text is 
{{msg-mw|linker-page-edit}}",
+       "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}} and 
{{msg-mw|linker-page-title-edit-template}}\n{{Identical|Edit}}",
+       "linker-page-history": "Link text for history link in 
{{msg-mw|linker-page-title-edit}}",
        "linter-heading-errors": "Heading on 
[[Special:LintErrors]]\n{{Identical|Error}}",
        "linter-heading-warnings": "Heading on 
[[Special:LintErrors]]\n{{Identical|Warning}}",
        "pageinfo-linter": "Heading on ?action=info for a page if it has lint 
errors",
diff --git a/includes/LintErrorsPager.php b/includes/LintErrorsPager.php
index e4b49f1..e65a8de 100644
--- a/includes/LintErrorsPager.php
+++ b/includes/LintErrorsPager.php
@@ -96,7 +96,17 @@
                                        [ 'action' => 'edit', 'lintid' => 
$lintError->lintId, ]
                                );
 
-                               return $this->msg( 'linker-page-title-edit' 
)->rawParams( $viewLink, $editLink )->escaped();
+                               $historyLink = $this->linkRenderer->makeLink(
+                                       $title,
+                                       $this->msg( 'linker-page-history' 
)->text(),
+                                       [],
+                                       [ 'action' => 'history' ]
+                               );
+
+                               $editHistLinks = 
$this->getLanguage()->pipeList( [ $editLink, $historyLink ] );
+                               return $this->msg( 'linker-page-title-edit' )
+                                       ->rawParams( $viewLink, $editHistLinks )
+                                       ->escaped();
                        case 'details':
                                $hasNameCats = [ 'obsolete-tag', 
'missing-end-tag', 'self-closed-tag' ];
                                if ( in_array( $this->category, $hasNameCats ) 
&& isset( $lintError->params['name'] ) ) {

-- 
To view, visit https://gerrit.wikimedia.org/r/344199
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ifd2ef33dd7477722691c8f2e570b7ac1af206135
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/Linter
Gerrit-Branch: master
Gerrit-Owner: Legoktm <[email protected]>
Gerrit-Reviewer: Arlolra <[email protected]>
Gerrit-Reviewer: Siebrand <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to