Show small explanation next to lists of tags
authorMatmaRex <matma.rex@gmail.com>
Wed, 10 Jul 2013 17:13:13 +0000 (19:13 +0200)
committerMatmaRex <matma.rex@gmail.com>
Wed, 10 Jul 2013 17:16:19 +0000 (19:16 +0200)
Lists of tags are shown on recent changes, watchlists, history pages
and diffs. However, it's hard to tell what they are, as they have no
visual indicators and resemble edit summaries (they looks examply the
same sans the italics). Wikimedia wikis have been using various
methods to remedy that (a "Tag:" prefix in every tag message, yellow
background color, etc.).

This basically implements the first one: a link to Special:Tags and
"Tag(s):" text is shown before the list of tags everywhere it's shown.
The text is correctly pluralized depending on the number of tags given
revision has.

Change-Id: If21eaed4171e732daaee32087c3307d70b60d81f

includes/ChangeTags.php
languages/messages/MessagesEn.php
languages/messages/MessagesQqq.php
maintenance/language/messages.inc

index 5478396..32440f5 100644 (file)
@@ -54,7 +54,10 @@ class ChangeTags {
                        );
                        $classes[] = Sanitizer::escapeClass( "mw-tag-$tag" );
                }
-               $markers = wfMessage( 'parentheses' )->rawParams( $wgLang->commaList( $displayTags ) )->text();
+               $markers = wfMessage( 'tag-list-wrapper' )
+                       ->numParams( count( $displayTags ) )
+                       ->rawParams( $wgLang->commaList( $displayTags ) )
+                       ->parse();
                $markers = Xml::tags( 'span', array( 'class' => 'mw-tag-markers' ), $markers );
 
                return array( $markers, $classes );
index d675e17..d747756 100644 (file)
@@ -4893,6 +4893,7 @@ You should have received [{{SERVER}}{{SCRIPTPATH}}/COPYING a copy of the GNU Gen
 'tags-summary'            => '', # do not translate or duplicate this message to other languages
 'tag-filter'              => '[[Special:Tags|Tag]] filter:',
 'tag-filter-submit'       => 'Filter',
+'tag-list-wrapper'        => '([[Special:Tags|{{PLURAL:$1|Tag|Tags}}]]: $2)',
 'tags-title'              => 'Tags',
 'tags-intro'              => 'This page lists the tags that the software may mark an edit with, and their meaning.',
 'tags-tag'                => 'Tag name',
index 7582c6c..a7a612a 100644 (file)
@@ -8789,6 +8789,11 @@ It appears that the word 'valid' describes 'tags', not 'change'. It also appears
 'tag-filter-submit' => 'Caption of the submit button displayed next to the tag filter on lists of changes (e.g. [[Special:Log]], [[Special:Contributions]], [[Special:Newpages]], [[Special:Recentchanges]], [[Special:Recentchangeslinked]], page histories)
 
 {{Identical|Filter}}',
+'tag-list-wrapper' => 'Wrapper for the list of tags shown on recent changes, watchlists, history pages and diffs.
+
+Parameters:
+* $1 - number of distinct tags for given edit
+* $2 - comma-separated list of tags for given edit',
 'tags-title' => 'The title of [[Special:Tags]]',
 'tags-intro' => 'Explanation on top of [[Special:Tags]]. For more information on tags see [[mw:Manual:Tags|MediaWiki]].',
 'tags-tag' => 'Caption of a column in [[Special:Tags]]. For more information on tags see [[mw:Manual:Tags|MediaWiki]].',
index 2cb94cf..9328144 100644 (file)
@@ -3732,6 +3732,7 @@ $wgMessageStructure = array(
                'tags-summary',
                'tag-filter',
                'tag-filter-submit',
+               'tag-list-wrapper',
                'tags-title',
                'tags-intro',
                'tags-tag',