Merge "Show whether tags are active on Special:Tags"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Wed, 2 Oct 2013 21:23:18 +0000 (21:23 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Wed, 2 Oct 2013 21:23:18 +0000 (21:23 +0000)
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 5ce4bcc..87f729f 100644 (file)
@@ -4928,7 +4928,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 f351543..e6b5ae3 100644 (file)
@@ -10035,7 +10035,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 991fc1b..65933f3 100644 (file)
@@ -3772,7 +3772,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',
        ),