diff --git a/Echo.i18n.php b/Echo.i18n.php
index 6512b4629..762ee1135 100644
--- a/Echo.i18n.php
+++ b/Echo.i18n.php
@@ -72,7 +72,6 @@ $messages['en'] = array(
'notification-user-rights-flyout' => 'Your user rights were {{GENDER:$1|changed}} by $1. $2. [[Special:ListGroupRights|Learn more]]',
'notification-user-rights-add' => 'You are now a member of {{PLURAL:$2|this group|these groups}}: $1',
'notification-user-rights-remove' => 'You are no longer a member of {{PLURAL:$2|this group|these groups}}: $1',
- 'notification-talkpage-content' => '$1', ## Do not translate unless you deliberately want to change behaviour
'notification-new-user' => "Welcome to {{SITENAME}}, $1! We're glad you're here.",
'notification-reverted2' => 'Your {{PLURAL:$4|edit on [[:$2]] has|edits on [[:$2]] have}} been {{GENDER:$1|reverted}} by [[User:$1|$1]] $3',
'notification-reverted-flyout2' => 'Your {{PLURAL:$4|edit on $2 has|edits on $2 have}} been {{GENDER:$1|reverted}} by $1 $3',
@@ -345,10 +344,6 @@ Parameters:
'notification-user-rights-remove' => 'Message indicating that a user was removed from a user group. Parameters:
* $1 is a comma separated list of user group names
* $2 is the number of user groups, this is used for PLURAL support',
- 'notification-talkpage-content' => 'Message shown as the "content" of a talkpage-related action.
-* $1 is the content of the talk page post.
-
-{{optional}}',
'notification-new-user' => 'Text of the welcome notification. Parameters:
* $1 - the name of the new user
See also:
@@ -3236,14 +3231,14 @@ $1',
'notification-page-linked-email-batch-bundle-body' => '$2 എന്ന താളിലേയ്ക്ക് $3 എന്ന താളിൽ നിന്നും മറ്റ് $4 {{PLURAL:$5|താളിൽ|താളുകളിൽ}} നിന്നും {{GENDER:$1|കണ്ണി ചേർക്കപ്പെട്ടിരിക്കുന്നു}}',
'echo-email-batch-subject-daily' => 'താങ്കൾക്ക് ഇന്ന് {{PLURAL:$2|പുതിയ ഒരറിയിപ്പ്|പുതിയ അറിയിപ്പുകൾ}} ഉണ്ട്',
'echo-email-batch-subject-weekly' => 'താങ്കൾക്ക് ഈ ആഴ്ച {{PLURAL:$2|പുതിയ ഒരറിയിപ്പ്|പുതിയ അറിയിപ്പുകൾ}} ഉണ്ട്',
- 'echo-email-batch-body-daily' => '$1,
+ 'echo-email-batch-body-daily' => '$1,
താങ്കൾക്ക് ഇന്ന് {{SITENAME}} സംരംഭത്തിൽ {{PLURAL:$3|പുതിയ ഒരു അറിയിപ്പ്|പുതിയ അറിയിപ്പുകൾ}} ഉണ്ട്. {{PLURAL:$3|അത്|അവ}} ഇവിടെ കാണുക: {{canonicalurl:{{#special:Notifications}}}}
$4
$5',
- 'echo-email-batch-body-weekly' => '$1,
+ 'echo-email-batch-body-weekly' => '$1,
താങ്കൾക്ക് ഈ ആഴ്ച {{SITENAME}} സംരംഭത്തിൽ {{PLURAL:$3|പുതിയ ഒരു അറിയിപ്പ്|പുതിയ അറിയിപ്പുകൾ}} ഉണ്ട്. {{PLURAL:$3|അത്|അവ}} ഇവിടെ കാണുക: {{canonicalurl:{{#special:Notifications}}}}
diff --git a/Echo.php b/Echo.php
index 5aa4cbcd9..5a877c704 100644
--- a/Echo.php
+++ b/Echo.php
@@ -432,8 +432,6 @@ $wgEchoNotifications = array(
'email-body-params' => array( 'agent', 'title', 'summary', 'subject-link', 'email-footer' ),
'email-body-batch-message' => 'notification-mention-email-batch-body',
'email-body-batch-params' => array( 'agent', 'title' ),
- 'content-message' => 'notification-talkpage-content',
- 'content-params' => array( 'commentText' ),
'icon' => 'chat',
),
'user-rights' => array(
diff --git a/formatters/BasicFormatter.php b/formatters/BasicFormatter.php
index 84ec03dd4..e657de2fe 100644
--- a/formatters/BasicFormatter.php
+++ b/formatters/BasicFormatter.php
@@ -70,7 +70,7 @@ class EchoBasicFormatter extends EchoNotificationFormatter {
// Set up default params if one is missing
$params += $this->getDefaultParams();
-
+
// Title for the flyout
$this->flyoutTitle = array(
'message' => $params['flyout-message'],
@@ -308,11 +308,31 @@ class EchoBasicFormatter extends EchoNotificationFormatter {
case 'summary':
return $this->formatSummary( $event, $user );
break;
+ case 'comment-text':
+ return $this->formatCommentText( $event, $user );
+ break;
default:
return '';
}
}
+ /**
+ * Extract the comment left by a user on a talk page from the event.
+ * @param $event EchoEvent The event to format the comment of
+ * @param $user User The user to format content for
+ * @return string Up to the first 200 characters of the comment
+ */
+ protected function formatCommentText( EchoEvent $event, $user ) {
+ $extra = $event->getExtra();
+ if ( !isset( $extra['content'] ) ) {
+ return '';
+ }
+ $content = EchoDiscussionParser::stripHeader( $extra['content'] );
+ $content = EchoDiscussionParser::stripSignature( $content );
+ $content = EchoDiscussionParser::stripIndents( $content );
+ return EchoDiscussionParser::getTextSnippet( $content, 200 );
+ }
+
/**
* Generate links based on output format and passed properties
* $event EchoEvent
diff --git a/formatters/CommentFormatter.php b/formatters/CommentFormatter.php
index 9dbddd084..2fd7c28bd 100644
--- a/formatters/CommentFormatter.php
+++ b/formatters/CommentFormatter.php
@@ -58,18 +58,6 @@ class EchoCommentFormatter extends EchoEditFormatter {
} else {
$message->params( '' );
}
- } elseif ( $param === 'commentText' ) {
- if ( isset( $extra['content'] ) && $extra['content'] ) {
- $content = $extra['content'];
- $content = EchoDiscussionParser::stripHeader( $content );
- $content = EchoDiscussionParser::stripSignature( $content );
- $content = EchoDiscussionParser::stripIndents( $content );
- $content = EchoDiscussionParser::getTextSnippet( $content, 200 );
-
- $message->params( $content );
- } else {
- $message->params( '' );
- }
} elseif ( $param === 'content-page' ) {
if ( $event->getTitle() ) {
$message->params( $event->getTitle()->getSubjectPage()->getPrefixedText() );