Merge "Make show/hide link in RC individually localizable"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Thu, 27 Feb 2014 12:50:05 +0000 (12:50 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Thu, 27 Feb 2014 12:50:05 +0000 (12:50 +0000)
includes/specials/SpecialRecentchanges.php
languages/messages/MessagesEn.php
languages/messages/MessagesQqq.php
maintenance/language/messages.inc

index d266e3f..ed29019 100644 (file)
@@ -713,7 +713,6 @@ class SpecialRecentChanges extends ChangesListSpecialPage {
                $dl = $lang->pipeList( $dl );
 
                // show/hide links
-               $showhide = array( $this->msg( 'show' )->text(), $this->msg( 'hide' )->text() );
                $filters = array(
                        'hideminor' => 'rcshowhideminor',
                        'hidebots' => 'rcshowhidebots',
@@ -721,7 +720,16 @@ class SpecialRecentChanges extends ChangesListSpecialPage {
                        'hideliu' => 'rcshowhideliu',
                        'hidepatrolled' => 'rcshowhidepatr',
                        'hidemyself' => 'rcshowhidemine'
-               );
+                 );
+
+               // The following messages are also used as the link text itself:
+               // rcshowhideminor-show, rcshowhideminor-hide,
+               // rcshowhidebots-show, rcshowhideminor-hide,
+               // rcshowhideanons-show, rcshowhideanons-hide,
+               // rcshowhidepatr-show, rcshowhidepatr-hide,
+               // rcshowhidemine-show, rcshowhidemine-hide.
+               $showhide = array( 'show', 'hide' );
+
                foreach ( $this->getCustomFilters() as $key => $params ) {
                        $filters[$key] = $params['msg'];
                }
@@ -732,7 +740,7 @@ class SpecialRecentChanges extends ChangesListSpecialPage {
 
                $links = array();
                foreach ( $filters as $key => $msg ) {
-                       $link = $this->makeOptionsLink( $showhide[1 - $options[$key]],
+                       $link = $this->makeOptionsLink( $this->msg( $msg . '-' . $showhide[1 - $options[$key]] ),
                                array( $key => 1 - $options[$key] ), $nondefaults );
                        $links[] = $this->msg( $msg )->rawParams( $link )->escaped();
                }
index 3fffec2..abc6095 100644 (file)
@@ -2211,11 +2211,23 @@ Your email address is not revealed when other users contact you.',
 'rcnotefrom'                        => "Below are the changes since <strong>$2</strong> (up to <strong>$1</strong> shown).",
 'rclistfrom'                        => 'Show new changes starting from $1',
 'rcshowhideminor'                   => '$1 minor edits',
+'rcshowhideminor-show'              => 'Show',
+'rcshowhideminor-hide'              => 'Hide',
 'rcshowhidebots'                    => '$1 bots',
+'rcshowhidebots-show'               => 'Show',
+'rcshowhidebots-hide'               => 'Hide',
 'rcshowhideliu'                     => '$1 registered users',
+'rcshowhideliu-show'                => 'Show',
+'rcshowhideliu-hide'                => 'Hide',
 'rcshowhideanons'                   => '$1 anonymous users',
+'rcshowhideanons-show'              => 'Show',
+'rcshowhideanons-hide'              => 'Hide',
 'rcshowhidepatr'                    => '$1 patrolled edits',
+'rcshowhidepatr-show'               => 'Show',
+'rcshowhidepatr-hide'               => 'Hide',
 'rcshowhidemine'                    => '$1 my edits',
+'rcshowhidemine-show'               => 'Show',
+'rcshowhidemine-hide'               => 'Hide',
 'rclinks'                           => 'Show last $1 changes in last $2 days<br />$3',
 'diff'                              => 'diff',
 'hist'                              => 'hist',
index 345bcd9..fb563fb 100644 (file)
@@ -3696,21 +3696,93 @@ Parameters:
 
 The corresponding message is {{msg-mw|Rcnotefrom}}.',
 'rcshowhideminor' => 'Option text in [[Special:RecentChanges]]. Parameters:
-* $1 - the "show/hide" command, with the text taken from either {{msg-mw|Show}} or {{msg-mw|Hide}}',
+* $1 - the "show/hide" command, with the text taken from either {{msg-mw|rcshowhideminor-show}} or {{msg-mw|rcshowhideminor-hide}}',
+'rcshowhideminor-show' => '{{doc-actionlink}}
+Option text in [[Special:RecentChanges]] in conjunction with {{msg-mw|rcshowhideminor}}.
+
+See also:
+* {{msg-mw|rcshowhideminor-hide}}
+{{Identical|Show}}',
+'rcshowhideminor-hide' => '{{doc-actionlink}}
+Option text in [[Special:RecentChanges]] in conjunction with {{msg-mw|rcshowhideminor}}.
+
+See also:
+* {{msg-mw|rcshowhideminor-show}}
+{{Identical|Hide}}',
 'rcshowhidebots' => 'Option text in [[Special:RecentChanges]]. Parameters:
-* $1 - the "show/hide" command, with the text taken from either {{msg-mw|Show}} or {{msg-mw|Hide}}
+* $1 - the "show/hide" command, with the text taken from either {{msg-mw|rcshowhidebots-show}} or {{msg-mw|rcshowhidebots-hide}}
 {{Identical|$1 bots}}',
+'rcshowhidebots-show' => '{{doc-actionlink}}
+Option text in [[Special:RecentChanges]] in conjunction with {{msg-mw|rcshowhidebots}}.
+
+See also:
+* {{msg-mw|rcshowhidebots-show}}
+{{Identical|Show}}',
+'rcshowhidebots-hide' => '{{doc-actionlink}}
+Option text in [[Special:RecentChanges]] in conjunction with {{msg-mw|rcshowhidebots}}.
+
+See also:
+* {{msg-mw|rcshowhidebots-hide}}
+{{Identical|Hide}}',
 'rcshowhideliu' => 'Option text in [[Special:RecentChanges]]. Parameters:
 * $1 - any one of the following messages:
-** {{msg-mw|Show}}
-** {{msg-mw|Hide}}',
+** {{msg-mw|rcshowhideliu-show}}
+** {{msg-mw|rcshowhideliu-hide}}',
+'rcshowhideliu-show' => '{{doc-actionlink}}
+Option text in [[Special:RecentChanges]] in conjunction with {{msg-mw|rcshowhideliu}}.
+
+See also:
+* {{msg-mw|rcshowhideliu-hide}}
+{{Identical|Show}}',
+'rcshowhideliu-hide' => '{{doc-actionlink}}
+Option text in [[Special:RecentChanges]] in conjunction with {{msg-mw|rcshowhideliu}}.
+
+See also:
+* {{msg-mw|rcshowhideliu-show}}
+{{Identical|Hide}}',
 'rcshowhideanons' => 'Option text in [[Special:RecentChanges]]. Parameters:
-* $1 - the "show/hide" command, with the text taken from either {{msg-mw|Show}} or {{msg-mw|Hide}}
+* $1 - the "show/hide" command, with the text taken from either {{msg-mw|rcshowhideanons-show}} or {{msg-mw|showhideanons-hide}}
 {{Identical|Anonymous user}}',
+'rcshowhideanons-show' => '{{doc-actionlink}}
+Option text in [[Special:RecentChanges]] in conjunction with {{msg-mw|rcshowhideanons}}.
+
+See also:
+* {{msg-mw|rcshowhideanons-hide}}
+{{Identical|Hide}}',
+'rcshowhideanons-hide' => '{{doc-actionlink}}
+Option text in [[Special:RecentChanges]] in conjunction with {{msg-mw|rcshowhideanons}}.
+
+See also:
+* {{msg-mw|rcshowhideanons-show}}
+{{Identical|hide}}',
 'rcshowhidepatr' => 'Option text in [[Special:RecentChanges]]. Parameters:
-* $1 - the "show/hide" command, with the text taken from either {{msg-mw|Show}} or {{msg-mw|Hide}}',
+* $1 - the "show/hide" command, with the text taken from either {{msg-mw|rcshowhidepatr-show}} or {{msg-mw|rcshowhidepatr-hide}}',
+'rcshowhidepatr-show' => '{{doc-actionlink}}
+Option text in [[Special:RecentChanges]] in conjunction with {{msg-mw|rcshowhidepatr}}.
+
+See also:
+* {{msg-mw|rcshowhidepatr-hide}}
+{{Identical|Show}}',
+'rcshowhidepatr-hide' => '{{doc-actionlink}}
+Option text in [[Special:RecentChanges]] in conjunction with {{msg-mw|rcshowhidepatr}}.
+
+See also:
+* {{msg-mw|rcshowhidepatr-show}}
+{{Identical|Hide}}',
 'rcshowhidemine' => 'Option text in [[Special:RecentChanges]]. Parameters:
-* $1 - the "show/hide" command, with the text taken from either {{msg-mw|Show}} or {{msg-mw|Hide}}',
+* $1 - the "show/hide" command, with the text taken from either {{msg-mw|rcshowhidemine-show}} or {{msg-mw|rcshowhidemine-hide}}',
+'rcshowhidemine-show' => '{{doc-actionlink}}
+Option text in [[Special:RecentChanges]] in conjunction with {{msg-mw|rcshowhidemine}}.
+
+See also:
+* {{msg-mw|rcshowhidemine-hide}}
+{{Identical|show}}',
+'rcshowhidemine-hide' => '{{doc-actionlink}}
+Option text in [[Special:RecentChanges]] in conjunction with {{msg-mw|rcshowhidemine}}.
+
+See also:
+* {{msg-mw|rcshowhidemine-show}}
+{{Identical|hide}}',
 'rclinks' => "Used on [[Special:RecentChanges]].
 * \$1 - a list of different choices with number of pages to be shown.<br />&nbsp;Example: \"''50{{int:pipe-separator}}100{{int:pipe-separator}}250{{int:pipe-separator}}500\".
 * \$2 - a list of clickable links with a number of days for which recent changes are to be displayed.<br />&nbsp;Example: \"''1{{int:pipe-separator}}3{{int:pipe-separator}}7{{int:pipe-separator}}14{{int:pipe-separator}}30''\".
index eab6cf6..d63c8a6 100644 (file)
@@ -1326,11 +1326,23 @@ $wgMessageStructure = array(
                'rcnotefrom',
                'rclistfrom',
                'rcshowhideminor',
+               'rcshowhideminor-show',
+               'rcshowhideminor-hide',
                'rcshowhidebots',
+               'rcshowhidebots-show',
+               'rcshowhidebots-hide',
                'rcshowhideliu',
+               'rcshowhideliu-show',
+               'rcshowhideliu-hide',
                'rcshowhideanons',
+               'rcshowhideanons-show',
+               'rcshowhideanons-hide',
                'rcshowhidepatr',
+               'rcshowhidepatr-show',
+               'rcshowhidepatr-hide',
                'rcshowhidemine',
+               'rcshowhidemine-show',
+               'rcshowhidemine-hide',
                'rclinks',
                'diff',
                'hist',