(bug 42337) Simplify "my talk" link logic in personal tools
authorAmir E. Aharoni <amir.aharoni@mail.huji.ac.il>
Thu, 22 Nov 2012 21:57:02 +0000 (23:57 +0200)
committerAmir E. Aharoni <amir.aharoni@mail.huji.ac.il>
Mon, 26 Nov 2012 19:48:24 +0000 (21:48 +0200)
Another attempt at fixing the complexity and the broken RTL display
that change I822a7390 introduced.

This commit is the same as Change I36ec3bec, except that it completely
removes the parentheses that were added to the "talk" link and
the associated mytalk-parenthetical message.

The following is copied from the commit message of Change I36ec3bec:

Change I822a7390 introduced a somewhat complex way to display
the "talk" link in parentheses after the username. It would only
work in Vector, and it broke the display in RTL wikis, because
it hacked into the personal links array.

This change attempts to make it more robust, by keeping the
array intact. This fixes the display in RTL wikis.

This commit also eliminates the global $wgVectorCombineUserTalk,
which is not needed any more.

Change-Id: Ib6076396d7f5bbdd4ba771b21020bdbb8e0c5b2d

includes/DefaultSettings.php
languages/messages/MessagesEn.php
languages/messages/MessagesQqq.php
skins/Vector.php

index 60c3ab8..77a9de1 100644 (file)
@@ -2776,13 +2776,6 @@ $wgFooterIcons = array(
  */
 $wgUseCombinedLoginLink = false;
 
-/**
- *  Appearance of user page and talk page labels in personal tools.
- *  - true = combine links into a single label
- *  - false = keep links in separate labels
- */
-$wgVectorCombineUserTalk = false;
-
 /**
  * Search form look for Vector skin only.
  *  - true = use an icon search button
index 1822237..338c88e 100644 (file)
@@ -775,7 +775,6 @@ XHTML id names.
 'moredotdotdot'        => 'More...',
 'mypage'               => 'Page',
 'mytalk'               => 'Talk',
-'mytalk-parenthetical' => 'talk',
 'anontalk'             => 'Talk for this IP address',
 'navigation'           => 'Navigation',
 'and'                  => '&#32;and',
index f80b904..681a4a0 100644 (file)
@@ -5045,7 +5045,3 @@ $4 is the gender of the target user.',
 * $1 is an unknown warning.',
 'api-error-uploaddisabled' => 'API error message that can be used for client side localisation of API errors.',
 'api-error-verification-error' => 'The word "extension" refers to the part behind the last dot in a file name, that by convention gives a hint about the kind of data format which a files contents are in.',
-
-# Unknown messages
-'mytalk-parenthetical' => 'When user page and talk combined into single label, link title for talk label',
-);
index 92eb3ad..8d685bd 100644 (file)
@@ -367,7 +367,7 @@ class VectorTemplate extends BaseTemplate {
         * @param $elements array
         */
        protected function renderNavigation( $elements ) {
-               global $wgVectorUseSimpleSearch, $wgVectorCombineUserTalk;
+               global $wgVectorUseSimpleSearch;
 
                // If only one element was given, wrap it in an array, allowing more
                // flexible arguments
@@ -452,20 +452,6 @@ class VectorTemplate extends BaseTemplate {
        <ul<?php $this->html( 'userlangattributes' ) ?>>
 <?php
                                        $personalTools = $this->getPersonalTools();
-                                       if ( $wgVectorCombineUserTalk && isset( $personalTools['userpage'] ) ) {
-?>
-               <li>
-<?php
-                                               echo $this->makeListItem( 'userpage', $personalTools['userpage'], array( 'tag' => 'span' ) );
-?> <?php
-                                               $personalTools['mytalk']['links'][0]['text'] = $this->getMsg( 'mytalk-parenthetical' )->text();
-                                               $talkItem = $this->makeListItem( 'mytalk', $personalTools['mytalk'], array( 'tag' => 'span' ) );
-                                               echo $this->getMsg( 'parentheses' )->rawParams( $talkItem )->escaped();
-                                               unset( $personalTools['userpage'], $personalTools['mytalk'] );
-?>
-               </li>
-<?php
-                                       }
                                        foreach ( $personalTools as $key => $item ) {
                                                echo $this->makeListItem( $key, $item );
                                        }