Mooeypoo has uploaded a new change for review.

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

Change subject: Notification title fixes
......................................................................

Notification title fixes

- Make sure to display truncated titles for topics and board names
- Change 'page' to 'topic' in the unwatch topic confirmation

Bug: T132975
Change-Id: I7ad9dd5b4361f8a3914e9138ff1c603acb7aaeaa
---
M i18n/en.json
M includes/Notifications/FlowPresentationModel.php
2 files changed, 4 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Flow 
refs/changes/40/307440/1

diff --git a/i18n/en.json b/i18n/en.json
index 9b11510..65d7c3f 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -19,7 +19,7 @@
        
"notification-dynamic-actions-flow-board-unwatch-confirmation-description": 
"This will not affect individual topics you are watching. You can watch [$2 
this page] anytime.",
        "notification-dynamic-actions-flow-topic-unwatch": "Stop watching this 
topic",
        "notification-dynamic-actions-flow-topic-unwatch-confirmation": "You 
are no longer watching \"$1\"",
-       
"notification-dynamic-actions-flow-topic-unwatch-confirmation-description": 
"You can watch [$2 this page] anytime.",
+       
"notification-dynamic-actions-flow-topic-unwatch-confirmation-description": 
"You can watch [$2 this topic] anytime.",
        "flow-desc": "Workflow management system",
        "flow-talk-taken-over-comment": "/* This page has been converted into a 
Flow discussion board */",
        "log-name-flow": "Flow activity log",
diff --git a/includes/Notifications/FlowPresentationModel.php 
b/includes/Notifications/FlowPresentationModel.php
index 7cf837c..c510f98 100644
--- a/includes/Notifications/FlowPresentationModel.php
+++ b/includes/Notifications/FlowPresentationModel.php
@@ -173,6 +173,7 @@
                $query = array( 'action' => 'unwatch' );
                $link = $this->getWatchActionLink( $title );
                $type = $isTopic ? 'topic' : 'board';
+               $stringPageTitle = $isTopic ? $this->getTopicTitle() : 
$this->getTruncatedTitleText( $title );
 
                if ( $this->isUserTalkPage() || !$this->getUser()->isWatched( 
$title ) ) {
                        return null;
@@ -185,7 +186,7 @@
                                'title' => $this
                                        ->msg( 
'notification-dynamic-actions-flow-' . $type . '-unwatch-confirmation' )
                                        ->params(
-                                               $title->getPrefixedText(),
+                                               $stringPageTitle,
                                                $title->getFullURL()
                                        )
                                        ->parse(),
@@ -194,7 +195,7 @@
                                'description' => $this
                                        ->msg( 
'notification-dynamic-actions-flow-' . $type . 
'-unwatch-confirmation-description' )
                                        ->params(
-                                               $title->getPrefixedText(),
+                                               $stringPageTitle,
                                                $title->getFullURL()
                                        )
                                        ->parse(),

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7ad9dd5b4361f8a3914e9138ff1c603acb7aaeaa
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: master
Gerrit-Owner: Mooeypoo <mor...@gmail.com>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to