aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--includes/actions/UnwatchAction.php3
-rw-r--r--includes/actions/WatchAction.php3
-rw-r--r--includes/api/ApiWatch.php6
-rw-r--r--languages/i18n/en.json2
-rw-r--r--languages/i18n/qqq.json4
5 files changed, 13 insertions, 5 deletions
diff --git a/includes/actions/UnwatchAction.php b/includes/actions/UnwatchAction.php
index f8f1dc1f4404..7f043e467659 100644
--- a/includes/actions/UnwatchAction.php
+++ b/includes/actions/UnwatchAction.php
@@ -50,7 +50,8 @@ class UnwatchAction extends WatchAction {
}
public function onSuccess() {
- $this->getOutput()->addWikiMsg( 'removedwatchtext', $this->getTitle()->getPrefixedText() );
+ $msgKey = $this->getTitle()->isTalkPage() ? 'removedwatchtext-talk' : 'removedwatchtext';
+ $this->getOutput()->addWikiMsg( $msgKey, $this->getTitle()->getPrefixedText() );
}
public function doesWrites() {
diff --git a/includes/actions/WatchAction.php b/includes/actions/WatchAction.php
index 890740fdd5ae..23505c020d11 100644
--- a/includes/actions/WatchAction.php
+++ b/includes/actions/WatchAction.php
@@ -67,7 +67,8 @@ class WatchAction extends FormAction {
}
public function onSuccess() {
- $this->getOutput()->addWikiMsg( 'addedwatchtext', $this->getTitle()->getPrefixedText() );
+ $msgKey = $this->getTitle()->isTalkPage() ? 'addedwatchtext-talk' : 'addedwatchtext';
+ $this->getOutput()->addWikiMsg( $msgKey, $this->getTitle()->getPrefixedText() );
}
/* Static utility methods */
diff --git a/includes/api/ApiWatch.php b/includes/api/ApiWatch.php
index f09fdcb063c9..3a7a082148dc 100644
--- a/includes/api/ApiWatch.php
+++ b/includes/api/ApiWatch.php
@@ -110,14 +110,16 @@ class ApiWatch extends ApiBase {
$status = UnwatchAction::doUnwatch( $title, $user );
$res['unwatched'] = $status->isOK();
if ( $status->isOK() ) {
- $res['message'] = $this->msg( 'removedwatchtext', $title->getPrefixedText() )
+ $msgKey = $title->isTalkPage() ? 'removedwatchtext-talk' : 'removedwatchtext';
+ $res['message'] = $this->msg( $msgKey, $title->getPrefixedText() )
->title( $title )->parseAsBlock();
}
} else {
$status = WatchAction::doWatch( $title, $user );
$res['watched'] = $status->isOK();
if ( $status->isOK() ) {
- $res['message'] = $this->msg( 'addedwatchtext', $title->getPrefixedText() )
+ $msgKey = $title->isTalkPage() ? 'addedwatchtext-talk' : 'addedwatchtext';
+ $res['message'] = $this->msg( $msgKey, $title->getPrefixedText() )
->title( $title )->parseAsBlock();
}
}
diff --git a/languages/i18n/en.json b/languages/i18n/en.json
index bc7d78d7ac51..cddc30e4926c 100644
--- a/languages/i18n/en.json
+++ b/languages/i18n/en.json
@@ -2064,9 +2064,11 @@
"watchnologin": "Not logged in",
"addwatch": "Add to watchlist",
"addedwatchtext": "\"[[:$1]]\" and its discussion page have been added to your [[Special:Watchlist|watchlist]].",
+ "addedwatchtext-talk": "\"[[:$1]]\" and its associated page have been added to your [[Special:Watchlist|watchlist]].",
"addedwatchtext-short": "The page \"$1\" has been added to your watchlist.",
"removewatch": "Remove from watchlist",
"removedwatchtext": "\"[[:$1]]\" and its discussion page have been removed from your [[Special:Watchlist|watchlist]].",
+ "removedwatchtext-talk": "\"[[:$1]]\" and its associated page have been removed from your [[Special:Watchlist|watchlist]].",
"removedwatchtext-short": "The page \"$1\" has been removed from your watchlist.",
"watch": "Watch",
"watchthispage": "Watch this page",
diff --git a/languages/i18n/qqq.json b/languages/i18n/qqq.json
index b55375607ea8..21b639103e74 100644
--- a/languages/i18n/qqq.json
+++ b/languages/i18n/qqq.json
@@ -2245,10 +2245,12 @@
"watchlistanontext": "Shown on Special:Userlogin when user tries to access their watchlist before logging in",
"watchnologin": "Used as error page title.\n\nThe error message for this title is:\n* {{msg-mw|Watchnologintext}}\n{{Identical|Not logged in}}",
"addwatch": "Link to a dialog box, displayed at the end of the list of categories at the foot of each page.\n\nSee also:\n* {{msg-mw|Removewatch}}",
- "addedwatchtext": "Explanation shown when clicking on the {{msg-mw|Watch}} tab. Parameters:\n* $1 - page title\nSee also:\n* {{msg-mw|Addedwatch}}",
+ "addedwatchtext": "Explanation shown when clicking on the {{msg-mw|Watch}} tab in a content namespace page. Parameters:\n* $1 - page title\nSee also:\n* {{msg-mw|Addedwatch}}",
+ "addedwatchtext-talk": "Explanation shown when clicking on the {{msg-mw|Watch}} tab in a talk namespace page. Parameters:\n* $1 - page title\nSee also:\n* {{msg-mw|Addedwatchtext}}",
"addedwatchtext-short": "Explanation shown when watching item from [[Special:UnwatchedPages]].\n\nSee also:\n* {{msg-mw|Removedwatchtext-short}}\n* {{msg-mw|Addedwatchtext}}",
"removewatch": "Link to a dialog box, displayed at the end of the list of categories at the foot of each page.\n\nSee also:\n* {{msg-mw|Addwatch}}",
"removedwatchtext": "After a page has been removed from a user's watchlist by clicking the {{msg-mw|Unwatch}} tab at the top of an article, this message appears just below the title of the article.\n\nParameters:\n* $1 - the title of the article\nSee also:\n* {{msg-mw|Removedwatch}}\n* {{msg-mw|Addedwatchtext}}",
+ "removedwatchtext-talk": "Message shown when clicking on the {{msg-mw|Unwatch}} tab in a talk namespace page.Parameters:\n* $1 - page title\nSee also:\n* {{msg-mw|Removedwatchtext}}",
"removedwatchtext-short": "Explanation shown when unwatching item from [[Special:UnwatchedPages]].\n\nSee also:\n* {{msg-mw|Addedwatchtext-short}}.\n* {{msg-mw|Removedwatchtext}}.",
"watch": "{{doc-actionlink}}\nName of the Watch tab. Should be in the imperative mood.\n\nSee also:\n* {{msg-mw|Watch}}\n* {{msg-mw|Accesskey-ca-watch}}\n* {{msg-mw|Tooltip-ca-watch}}",
"watchthispage": "Used as link text.\n\nSee also:\n* {{msg-mw|Unwatchthispage|link text}}\n* {{msg-mw|Notanarticle|error message}}\n{{Identical|Watch this page}}",