Bsitu has uploaded a new change for review.
https://gerrit.wikimedia.org/r/151537
Change subject: Flow notification item new style
......................................................................
Flow notification item new style
* Remove the snippet as requested
* Truncate topic title to 50 bytes
* Change the wording in notification message
Change-Id: Ic820319639dda869b7bb11809e75f6a2d023e16d
---
M i18n/en.json
M includes/Notifications/Formatter.php
M includes/Notifications/Notifications.php
3 files changed, 4 insertions(+), 18 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Flow
refs/changes/37/151537/1
diff --git a/i18n/en.json b/i18n/en.json
index 484becf..34ec44b 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -212,8 +212,8 @@
"flow-paging-fwd": "Older topics",
"flow-last-modified": "Last modified about $1",
"flow-workflow": "workflow",
- "flow-notification-reply": "$1 {{GENDER:$1|responded}} to <span
class=\"plainlinks\">[$5 $2]</span> on $4.",
- "flow-notification-reply-bundle": "$1 and $5 {{PLURAL:$6|other|others}}
{{GENDER:$1|responded}} to <span class=\"plainlinks\">[$4 $2]</span> on
\"$3\".",
+ "flow-notification-reply": "<span class=\"plainlinks\">[$5 $2]</span><br
/>$1 {{GENDER:$1|responded}} on '''$4'''.",
+ "flow-notification-reply-bundle": "<span class=\"plainlinks\">[$4
$2]</span><br />$1 and $5 {{PLURAL:$6|other|others}} {{GENDER:$1|responded}} on
'''$3'''.",
"flow-notification-edit": "$1 {{GENDER:$1|edited}} a <span
class=\"plainlinks\">[$5 post]</span> in \"$2\" on [[$3|$4]].",
"flow-notification-edit-bundle": "$1 and $5 {{PLURAL:$6|other|others}}
{{GENDER:$1|edited}} a <span class=\"plainlinks\">[$4 post]</span> in \"$2\" on
\"$3\".",
"flow-notification-newtopic": "$1 {{GENDER:$1|created}} a <span
class=\"plainlinks\">[$5 new topic]</span> on [[$2|$3]]: $4.",
diff --git a/includes/Notifications/Formatter.php
b/includes/Notifications/Formatter.php
index 7743d66..a46a2ab 100644
--- a/includes/Notifications/Formatter.php
+++ b/includes/Notifications/Formatter.php
@@ -18,7 +18,8 @@
$extra = $event->getExtra();
if ( $param === 'subject' ) {
if ( isset( $extra['topic-title'] ) &&
$extra['topic-title'] ) {
- $this->processParamEscaped( $message, trim(
$extra['topic-title'] ) );
+ global $wgLang;
+ $this->processParamEscaped( $message,
$wgLang->truncate( trim( $extra['topic-title'] ), 50 ) );
} else {
$message->params( '' );
}
@@ -182,18 +183,5 @@
}
return false;
- }
-
- /**
- * We don't show the text snippet for Flow bundled notification
- * @param \EchoEvent
- * @param \User
- */
- protected function formatCommentText( EchoEvent $event, $user ) {
- if ( $this->bundleData['raw-data-count'] > 1 ) {
- return '';
- } else {
- return parent::formatCommentText( $event, $user );
- }
}
}
diff --git a/includes/Notifications/Notifications.php
b/includes/Notifications/Notifications.php
index 728fb72..0956ea7 100644
--- a/includes/Notifications/Notifications.php
+++ b/includes/Notifications/Notifications.php
@@ -24,7 +24,6 @@
'email-subject-params' => array( 'agent', 'title' ),
'email-body-batch-message' =>
'flow-notification-newtopic-email-batch-body',
'email-body-batch-params' => array( 'agent', 'subject', 'title'
),
- 'payload' => array( 'comment-text' ),
) + $notificationTemplate,
'flow-post-reply' => array(
'primary-link' => array(
@@ -49,7 +48,6 @@
'email-body-batch-params' => array( 'agent', 'subject', 'title'
),
'email-body-batch-bundle-message' =>
'flow-notification-reply-email-batch-bundle-body',
'email-body-batch-bundle-params' => array( 'agent', 'subject',
'title', 'agent-other-display', 'agent-other-count' ),
- 'payload' => array( 'comment-text' ),
) + $notificationTemplate,
'flow-post-edited' => array(
'primary-link' => array(
--
To view, visit https://gerrit.wikimedia.org/r/151537
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic820319639dda869b7bb11809e75f6a2d023e16d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: master
Gerrit-Owner: Bsitu <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits