From aaf0e1333ff178497566a3aecfe61662196ef169 Mon Sep 17 00:00:00 2001 From: "Amir E. Aharoni" Date: Thu, 22 Nov 2012 23:57:02 +0200 Subject: [PATCH] (bug 42337) Simplify "my talk" link logic in personal tools 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 | 7 ------- languages/messages/MessagesEn.php | 1 - languages/messages/MessagesQqq.php | 4 ---- skins/Vector.php | 16 +--------------- 4 files changed, 1 insertion(+), 27 deletions(-) diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php index 60c3ab8754..77a9de1e82 100644 --- a/includes/DefaultSettings.php +++ b/includes/DefaultSettings.php @@ -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 diff --git a/languages/messages/MessagesEn.php b/languages/messages/MessagesEn.php index 1822237268..338c88e9e1 100644 --- a/languages/messages/MessagesEn.php +++ b/languages/messages/MessagesEn.php @@ -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' => ' and', diff --git a/languages/messages/MessagesQqq.php b/languages/messages/MessagesQqq.php index f80b904885..681a4a00f0 100644 --- a/languages/messages/MessagesQqq.php +++ b/languages/messages/MessagesQqq.php @@ -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', -); diff --git a/skins/Vector.php b/skins/Vector.php index 92eb3ad02f..8d685bdf6c 100644 --- a/skins/Vector.php +++ b/skins/Vector.php @@ -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 { html( 'userlangattributes' ) ?>> getPersonalTools(); - if ( $wgVectorCombineUserTalk && isset( $personalTools['userpage'] ) ) { -?> -
  • -makeListItem( 'userpage', $personalTools['userpage'], array( 'tag' => 'span' ) ); -?> 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'] ); -?> -
  • - $item ) { echo $this->makeListItem( $key, $item ); } -- 2.20.1