Show whether tags are active on Special:Tags
authorMatmaRex <matma.rex@gmail.com>
Thu, 29 Aug 2013 19:34:39 +0000 (21:34 +0200)
committerBartosz Dziewoński <matma.rex@gmail.com>
Thu, 19 Sep 2013 09:16:34 +0000 (11:16 +0200)
Bug: 18908
Change-Id: I888d3e8e665e50560f481d1ab6acc99f3b8d031a

includes/specials/SpecialTags.php
languages/messages/MessagesEn.php
languages/messages/MessagesQqq.php
maintenance/language/messages.inc

index 80c38d5..7e34e98 100644 (file)
@@ -44,9 +44,13 @@ class SpecialTags extends SpecialPage {
                $html = Xml::tags( 'tr', null, Xml::tags( 'th', null, $this->msg( 'tags-tag' )->parse() ) .
                                Xml::tags( 'th', null, $this->msg( 'tags-display-header' )->parse() ) .
                                Xml::tags( 'th', null, $this->msg( 'tags-description-header' )->parse() ) .
+                               Xml::tags( 'th', null, $this->msg( 'tags-active-header' )->parse() ) .
                                Xml::tags( 'th', null, $this->msg( 'tags-hitcount-header' )->parse() )
                        );
 
+               // Used in #doTagRow()
+               $this->definedTags = array_fill_keys( ChangeTags::listDefinedTags(), true );
+
                foreach ( ChangeTags::tagUsageStatistics() as $tag => $hitcount ) {
                        $html .= $this->doTagRow( $tag, $hitcount );
                }
@@ -76,6 +80,9 @@ class SpecialTags extends SpecialPage {
                }
                $newRow .= Xml::tags( 'td', null, $desc );
 
+               $active = $this->msg( isset( $this->definedTags[$tag] ) ? 'tags-active-yes' : 'tags-active-no' )->escaped();
+               $newRow .= Xml::tags( 'td', null, $active );
+
                $hitcountLabel = $this->msg( 'tags-hitcount' )->numParams( $hitcount )->escaped();
                $hitcountLink = Linker::link( SpecialPage::getTitleFor( 'Recentchanges' ), $hitcountLabel, array(), array( 'tagfilter' => $tag ) );
                // add raw $hitcount for sorting, because tags-hitcount contains numbers and letters
index 5e66259..c50979a 100644 (file)
@@ -4926,7 +4926,10 @@ You should have received [{{SERVER}}{{SCRIPTPATH}}/COPYING a copy of the GNU Gen
 'tags-tag'                => 'Tag name',
 'tags-display-header'     => 'Appearance on change lists',
 'tags-description-header' => 'Full description of meaning',
+'tags-active-header'      => 'Active?',
 'tags-hitcount-header'    => 'Tagged changes',
+'tags-active-yes'         => 'Yes',
+'tags-active-no'          => 'No',
 'tags-edit'               => 'edit',
 'tags-hitcount'           => '$1 {{PLURAL:$1|change|changes}}',
 
index dee27e5..d1d851a 100644 (file)
@@ -10048,7 +10048,10 @@ Parameters:
 'tags-tag' => 'Caption of a column in [[Special:Tags]]. For more information on tags see [[mw:Manual:Tags|MediaWiki]].',
 'tags-display-header' => 'Caption of a column in [[Special:Tags]]. For more information on tags see [[mw:Manual:Tags|MediaWiki]].',
 'tags-description-header' => 'Caption of a column in [[Special:Tags]]. For more information on tags see [[mw:Manual:Tags|MediaWiki]].',
+'tags-active-header' => 'Caption of a column in [[Special:Tags]]. For more information on tags see [[mw:Manual:Tags|MediaWiki]].',
 'tags-hitcount-header' => 'Caption of a column in [[Special:Tags]]. For more information on tags see [[mw:Manual:Tags|MediaWiki]].',
+'tags-active-yes' => 'Table cell contents if given tag is "active".',
+'tags-active-no' => 'Table cell contents if given tag is not "active".',
 'tags-edit' => 'Used on [[Special:Tags]]. Verb. Used as display text on a link to create/edit a description.
 {{Identical|Edit}}',
 'tags-hitcount' => 'Shown in the "{{msg-mw|Tags-hitcount-header}}" column in [[Special:Tags]]. For more information on tags see [[mw:Manual:Tags|MediaWiki]].
index 43be195..b87d35a 100644 (file)
@@ -3771,7 +3771,10 @@ $wgMessageStructure = array(
                'tags-tag',
                'tags-display-header',
                'tags-description-header',
+               'tags-active-header',
                'tags-hitcount-header',
+               'tags-active-yes',
+               'tags-active-no',
                'tags-edit',
                'tags-hitcount',
        ),