Catrope has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/259880

Change subject: Remove link from mention notification header
......................................................................

Remove link from mention notification header

We're trying to get rid of links in notification
messages, and the link was redundant with the primary link
in both cases.

Change-Id: I69e888a355c263b5a8c5ca7a46430746895de44c
---
M i18n/en.json
M i18n/qqq.json
M includes/formatters/MentionPresentationModel.php
3 files changed, 9 insertions(+), 13 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Echo 
refs/changes/80/259880/1

diff --git a/i18n/en.json b/i18n/en.json
index 1054618..12db649 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -79,7 +79,7 @@
        "notification-mention": "[[User:$1|$1]] {{GENDER:$1|mentioned}} 
{{GENDER:$6|you}} on the $5 talk page in \"[[:$3#$2|$4]]\".",
        "notification-header-mention": "$1 {{GENDER:$2|mentioned}} 
{{GENDER:$5|you}} on the $3 talk page in \"$4\".",
        "notification-mention-nosection": "[[User:$1|$1]] 
{{GENDER:$1|mentioned}} {{GENDER:$4|you}} on the [[:$3|$2 talk page]].",
-       "notification-header-mention-nosection": "$1 {{GENDER:$2|mentioned}} 
{{GENDER:$5|you}} on the [[:$4|$3 talk page]].",
+       "notification-header-mention-nosection": "$1 {{GENDER:$2|mentioned}} 
{{GENDER:$5|you}} on the $3 talk page.",
        "notification-user-rights": "Your user rights 
[[Special:Log/rights/$1|were {{GENDER:$1|changed}}]] by [[User:$1|$1]]. $2. 
[[Special:ListGroupRights|Learn more]]",
        "notification-header-user-rights": "Your user rights were 
{{GENDER:$2|changed}} by $1. $3.",
        "notification-user-rights-add": "You are now a member of 
{{PLURAL:$2|this group|these groups}}: $1",
diff --git a/i18n/qqq.json b/i18n/qqq.json
index fe933de..1f1226b 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -98,9 +98,9 @@
        "notification-add-talkpage-topic-yours2": "Parameters:\n* $1 - a 
username, plain text. Can be used for GENDER.\n* $2 - a page section\n* $3 - a 
page title",
        "notification-add-comment-yours2": "Parameters:\n* $1 - a username, 
plain text; can be used for GENDER\n* $2 - discussion name\n* $3 - link to user 
talk page\nSee also:\n* {{msg-mw|Notification-add-comment2}}",
        "notification-mention": "Format for displaying notifications of a 
comment in a specific section including a link to another user's user 
page.\n\nParameters:\n* $1 - the username of the person who edited, plain text. 
Can be used for GENDER\n* $2 - the section title of the discussion\n* $3 - the 
page title of the discussion\n* $4 - the raw section title text\n* $5 - the 
title text without namespace (a page title in any namespace)\n* $6 - name of 
the user viewing the notification, can be used for GENDER",
-       "notification-header-mention": "Header text for a notification when you 
are mentioned by another user.\n* $1 - user's name (not suitable for 
GENDER).\n* $2 - user's name for use in GENDER.\n* $3 - name of the page 
without namespace they were mentioned in.\n* $4 - link to the section they were 
mentioned in.\n* $5 - name of the user viewing the notification, can be used 
for GENDER",
+       "notification-header-mention": "Header text for a notification when you 
are mentioned by another user.\n* $1 - user's name (not suitable for 
GENDER).\n* $2 - user's name for use in GENDER.\n* $3 - name of the page they 
were mentioned in (without namespace).\n* $4 - name of the section they were 
mentioned in.\n* $5 - name of the user viewing the notification, can be used 
for GENDER",
        "notification-mention-nosection": "Format for displaying notifications 
of a comment including a link to another user's user page. Parameters:\n* $1 - 
the username of the person who edited, plain text. Can be used for GENDER\n* $2 
- the title text without namespace (a page title in any namespace)\n* $3 - the 
page title of the discussion\n* $4 - name of the user viewing the notification, 
can be used for GENDER",
-       "notification-header-mention-nosection": "Header text for a 
notification when you are mentioned by another user, but not in a section of a 
page.\n* $1 - user's name (not suitable for GENDER).\n* $2 - user's name for 
use in GENDER.\n* $3 - name of the page without namespace they were mentioned 
in.\n* $4 - full page name, for use in a link.\n* $5 - name of the user viewing 
the notification, can be used for GENDER",
+       "notification-header-mention-nosection": "Header text for a 
notification when you are mentioned by another user, but not in a section of a 
page.\n* $1 - user's name (not suitable for GENDER).\n* $2 - user's name for 
use in GENDER.\n* $3 - name of the page without namespace they were mentioned 
in.\n* $4 - full page name.\n* $5 - name of the user viewing the notification, 
can be used for GENDER",
        "notification-user-rights": "Format for displaying notifications of a 
user right change in notification page.\n\nParameters:\n* $1 - the username of 
the person who made the user right change. Can be used for GENDER support.\n* 
$2 - a semicolon separated list of {{msg-mw|Notification-user-rights-add}}, 
{{msg-mw|Notification-user-rights-remove}}",
        "notification-header-user-rights": "Format for displaying notifications 
of a user right change in notification flyout.  Parameters:\n* $1 - the 
username of the person who made the user right change, formatted for display.  
Cannot be used for GENDER\n* $2 - the raw username of the person who made the 
user rights change, can be used for GENDER support\n* $3 - a semicolon 
separated list of {{msg-mw|notification-user-rights-add}}, 
{{msg-mw|notification-user-rights-remove}}",
        "notification-user-rights-add": "Message indicating that a user was 
added to a user group.  Parameters:\n* $1 - a comma separated list of user 
group names\n* $2 - the number of user groups, this is used for PLURAL 
support\nSee also:\n* {{msg-mw|Notification-user-rights-remove}}",
diff --git a/includes/formatters/MentionPresentationModel.php 
b/includes/formatters/MentionPresentationModel.php
index da65c6a..7bc34d0 100644
--- a/includes/formatters/MentionPresentationModel.php
+++ b/includes/formatters/MentionPresentationModel.php
@@ -54,21 +54,17 @@
                // @fixme this message should not say "xx talk page"
                $msg->params( $this->event->getTitle()->getText() );
                $section = $this->getSection();
-               $sectionTitle = $this->getTitleWithSection();
                if ( $section ) {
-                       $msg->rawParams(
-                               Linker::link(
-                                       $sectionTitle,
-                                       htmlspecialchars( 
EchoDiscussionParser::getTextSnippet(
-                                                       $section,
-                                                       $this->language,
-                                                       30
-                                       ) )
+                       $msg->params(
+                               EchoDiscussionParser::getTextSnippet(
+                                               $section,
+                                               $this->language,
+                                               30
                                )
                        );
                } else {
                        // For the -nosection message
-                       $msg->params( $sectionTitle->getPrefixedText() );
+                       $msg->params( 
$this->event->getTitle()->getPrefixedText() );
                }
                $msg->params( $this->getViewingUserForGender() );
 

-- 
To view, visit https://gerrit.wikimedia.org/r/259880
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I69e888a355c263b5a8c5ca7a46430746895de44c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Echo
Gerrit-Branch: master
Gerrit-Owner: Catrope <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to