Merge "Move up devunt's name to Developers"
[lhc/web/wiklou.git] / includes / api / ApiWatch.php
index f09fdcb..3a7a082 100644 (file)
@@ -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();
                        }
                }