From 7a76b31bd46bcc1d47e6b3dd06f0bae786164df8 Mon Sep 17 00:00:00 2001 From: "This, that and the other" Date: Sun, 7 Aug 2016 16:12:52 +1000 Subject: [PATCH] Add GENDER support to email and user rights toolbox links Also rephrasing the "User rights management" link to an action-based phrase, using the more correct term "user groups" rather than "user rights". I filed T142322 about the inconsistent use of terminology in regards to Special:UserRights. Bug: T142316 Change-Id: I43c3fbe55e0065eee23294738745aa69d3f05202 --- includes/skins/SkinTemplate.php | 2 ++ languages/i18n/en.json | 2 ++ languages/i18n/qqq.json | 2 ++ 3 files changed, 6 insertions(+) diff --git a/includes/skins/SkinTemplate.php b/includes/skins/SkinTemplate.php index 2351ab84d7..ed7c6dfd39 100644 --- a/includes/skins/SkinTemplate.php +++ b/includes/skins/SkinTemplate.php @@ -1302,6 +1302,7 @@ class SkinTemplate extends Skin { if ( $this->showEmailUser( $user ) ) { $nav_urls['emailuser'] = [ + 'text' => $this->msg( 'tool-link-emailuser', $rootUser )->text(), 'href' => self::makeSpecialUrlSubpage( 'Emailuser', $rootUser ), 'tooltip-params' => [ $rootUser ], ]; @@ -1312,6 +1313,7 @@ class SkinTemplate extends Skin { $sur->setContext( $this->getContext() ); if ( $sur->userCanExecute( $this->getUser() ) ) { $nav_urls['userrights'] = [ + 'text' => $this->msg( 'tool-link-userrights', $this->getUser()->getName() )->text(), 'href' => self::makeSpecialUrlSubpage( 'Userrights', $rootUser ) ]; } diff --git a/languages/i18n/en.json b/languages/i18n/en.json index 67e649148b..b3781c256d 100644 --- a/languages/i18n/en.json +++ b/languages/i18n/en.json @@ -205,6 +205,8 @@ "talk": "Discussion", "views": "Views", "toolbox": "Tools", + "tool-link-userrights": "Change {{GENDER:$1|user}} groups", + "tool-link-emailuser": "Email this {{GENDER:$1|user}}", "userpage": "View user page", "projectpage": "View project page", "imagepage": "View file page", diff --git a/languages/i18n/qqq.json b/languages/i18n/qqq.json index 163b613247..4ec5cec5fa 100644 --- a/languages/i18n/qqq.json +++ b/languages/i18n/qqq.json @@ -389,6 +389,8 @@ "talk": "Used as display name for the tab to all {{msg-mw|Talk}} pages. These pages accompany all content pages and can be used for discussing the content page. Example: [[Talk:Example]].\n\nSee also:\n* {{msg-mw|Talk}}\n* {{msg-mw|Accesskey-ca-talk}}\n* {{msg-mw|Tooltip-ca-talk}}\n{{Identical|Discussion}}", "views": "Subtitle for the list of available views, for the current page. In \"monobook\" skin the list of views are shown as tabs, so this sub-title is not shown. For an example, see [{{canonicalurl:Main_Page|useskin=simple}} Main Page using simple skin].\n\n'''Note:''' This is \"views\" as in \"appearances\"/\"representations\", '''not''' as in \"visits\"/\"accesses\".\n{{Identical|View}}", "toolbox": "The title of the toolbox below the search menu.\n{{Identical|Tool}}", + "tool-link-userrights": "Link to [[Special:UserRights]] (user rights management) in the sidebar toolbox.\n\nParameters:\n* $1 - Name of user who would have their rights changed", + "tool-link-emailuser": "Link to [[Special:EmailUser]] (email user tool) in the sidebar toolbox.\n\nParameters:\n* $1 - Name of user who would receive the email\n\nSee also:\n* {{msg-mw|Emailuser-title-target}}", "userpage": "Used in user talk pages as the text of the link to the user page, with the Cologne Blue skin.", "projectpage": "Used as link text in Talk page of project page with the Cologne Blue skin.", "imagepage": "Used as link text in Talk page of file page.", -- 2.20.1