Use local context to get messages
authorAlexandre Emsenhuber <ialex.wiki@gmail.com>
Thu, 29 Mar 2012 08:57:00 +0000 (10:57 +0200)
committerAlexandre Emsenhuber <ialex.wiki@gmail.com>
Thu, 29 Mar 2012 09:10:03 +0000 (11:10 +0200)
Change-Id: I9bad983b6deffa1f79770663010252730d1b1eb5

includes/actions/WatchAction.php

index 63d9b15..e263645 100644 (file)
@@ -31,7 +31,7 @@ class WatchAction extends FormAction {
        }
 
        protected function getDescription() {
-               return wfMsgHtml( 'addwatch' );
+               return $this->msg( 'addwatch' )->escaped();
        }
 
        /**
@@ -136,11 +136,11 @@ class WatchAction extends FormAction {
        }
 
        protected function alterForm( HTMLForm $form ) {
-               $form->setSubmitText( wfMsg( 'confirm-watch-button' ) );
+               $form->setSubmitTextMsg( 'confirm-watch-button' );
        }
 
        protected function preText() {
-               return wfMessage( 'confirm-watch-top' )->parse();
+               return $this->msg( 'confirm-watch-top' )->parse();
        }
 
        public function onSuccess() {
@@ -155,7 +155,7 @@ class UnwatchAction extends WatchAction {
        }
 
        protected function getDescription() {
-               return wfMsg( 'removewatch' );
+               return $this->msg( 'removewatch' )->escaped();
        }
 
        public function onSubmit( $data ) {
@@ -166,11 +166,11 @@ class UnwatchAction extends WatchAction {
        }
 
        protected function alterForm( HTMLForm $form ) {
-               $form->setSubmitText( wfMsg( 'confirm-unwatch-button' ) );
+               $form->setSubmitTextMsg( 'confirm-unwatch-button' );
        }
 
        protected function preText() {
-               return wfMessage( 'confirm-unwatch-top' )->parse();
+               return $this->msg( 'confirm-unwatch-top' )->parse();
        }
 
        public function onSuccess() {