From 908e387e36185c3e75b65205adbeba47e6bf8042 Mon Sep 17 00:00:00 2001 From: jdlrobson Date: Wed, 27 Mar 2019 13:16:59 -0700 Subject: [PATCH] Separate content from presentation for user tools list Change-Id: Iec2cf0a4a9a0384fa01e2421a0b6f6ee58a3e8d3 --- includes/specials/SpecialContributions.php | 9 +++++++-- languages/i18n/en.json | 1 + languages/i18n/qqq.json | 1 + 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/includes/specials/SpecialContributions.php b/includes/specials/SpecialContributions.php index f60d5f02db..055a6e2609 100644 --- a/includes/specials/SpecialContributions.php +++ b/includes/specials/SpecialContributions.php @@ -313,7 +313,11 @@ class SpecialContributions extends IncludableSpecialPage { $links = ''; if ( $talk ) { $tools = self::getUserLinks( $this, $userObj ); - $links = $this->getLanguage()->pipeList( $tools ); + $links = Html::openElement( 'span', [ 'class' => 'mw-changeslist-links' ] ); + foreach ( $tools as $tool ) { + $links .= Html::rawElement( 'span', [], $tool ) . ' '; + } + $links = trim( $links ) . Html::closeElement( 'span' ); // Show a note if the user is blocked and display the last block log entry. // Do not expose the autoblocks, since that may lead to a leak of accounts' IPs, @@ -354,7 +358,8 @@ class SpecialContributions extends IncludableSpecialPage { } return Html::rawElement( 'div', [ 'class' => 'mw-contributions-user-tools' ], - $this->msg( 'contribsub2' )->rawParams( $user, $links )->params( $userObj->getName() ) + $this->msg( 'contributions-subtitle' )->rawParams( $user )->params( $userObj->getName() ) + . ' ' . $links ); } diff --git a/languages/i18n/en.json b/languages/i18n/en.json index 05bbf3cbfa..c2cd55ccfa 100644 --- a/languages/i18n/en.json +++ b/languages/i18n/en.json @@ -2537,6 +2537,7 @@ "mycontris": "Contributions", "anoncontribs": "Contributions", "contribsub2": "For {{GENDER:$3|$1}} ($2)", + "contributions-subtitle": "For {{GENDER:$3|$1}}", "contributions-userdoesnotexist": "User account \"$1\" is not registered.", "negative-namespace-not-supported": "Namespaces with negative values are not supported.", "nocontribs": "No changes were found matching these criteria.", diff --git a/languages/i18n/qqq.json b/languages/i18n/qqq.json index 7b0533a739..257252af08 100644 --- a/languages/i18n/qqq.json +++ b/languages/i18n/qqq.json @@ -2743,6 +2743,7 @@ "mycontris": "In the personal urls page section - right upper corner.\n\nSee also:\n* {{msg-mw|Mycontris}}\n* {{msg-mw|Accesskey-pt-mycontris}}\n* {{msg-mw|Tooltip-pt-mycontris}}\n{{Identical|Contribution}}", "anoncontribs": "Same as {{msg-mw|mycontris}} but used for non-logged-in users.\n\nSee also:\n* {{msg-mw|Accesskey-pt-anoncontribs}}\n* {{msg-mw|Tooltip-pt-anoncontribs}}\n{{Identical|Contribution}}", "contribsub2": "Contributions for \"user\" (links). Parameters:\n* $1 is an IP address or a username, with a link which points to the user page (if registered user).\n* $2 is list of tool links. The list contains a link which has text {{msg-mw|Sp-contributions-talk}}.\n* $3 is a plain text username used for GENDER.\n{{Identical|For $1}}", + "contributions-subtitle": "Successor to {{msg-mw|contribssub2}}. Contributions for \"user\". Parameters:\n* $1 is an IP address or a username, with a link which points to the user page (if registered user).\n", "contributions-userdoesnotexist": "This message is used in [[Special:Contributions]]. It is used to tell the user that the name he searched for doesn't exist.\n\nParameters:\n* $1 - a username\n{{Identical|Userdoesnotexist}}", "negative-namespace-not-supported": "This message is used in [[Special:Contributions]] to tell users that use namespaces with negative value. It not supported as associated namespace(s) doesn't exist.", "nocontribs": "Used in [[Special:Contributions]] and [[Special:DeletedContributions]].\n\nSee examples: [[Special:Contributions/x]] and [[Special:DeletedContributions/x]].\n\nParameters:\n* $1 - (Unused) the user name", -- 2.20.1