jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/321434 )

Change subject: Update for API error i18n
......................................................................


Update for API error i18n

See Iae0e2ce3.

Change-Id: I088d34b0fdf4d08286186cd5fcef7db53de1175f
---
M api/ApiFeedLQTThreads.php
M api/ApiThreadAction.php
M i18n/en.json
M i18n/qqq.json
4 files changed, 262 insertions(+), 70 deletions(-)

Approvals:
  Gergő Tisza: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/api/ApiFeedLQTThreads.php b/api/ApiFeedLQTThreads.php
index 37882d0..ce3ad49 100644
--- a/api/ApiFeedLQTThreads.php
+++ b/api/ApiFeedLQTThreads.php
@@ -174,7 +174,11 @@
                foreach ( $talkpages as $page ) {
                        $title = Title::newFromText( $page );
                        if ( !$title ) {
-                               $this->dieUsageMsg( array( 'invalidtitle', 
$page ) );
+                               if ( is_callable( [ $this, 'dieWithError' ] ) ) 
{
+                                       $this->dieWithError( array( 
'apierror-invalidtitle', wfEscapeWikiText( $page ) ) );
+                               } else {
+                                       $this->dieUsageMsg( array( 
'invalidtitle', $page ) );
+                               }
                        }
                        $pageCond = array(
                                'thread_article_namespace' => 
$title->getNamespace(),
diff --git a/api/ApiThreadAction.php b/api/ApiThreadAction.php
index d11f8e5..658200f 100644
--- a/api/ApiThreadAction.php
+++ b/api/ApiThreadAction.php
@@ -4,10 +4,6 @@
        public function execute() {
                $params = $this->extractRequestParams();
 
-               if ( !count( $params['threadaction'] ) ) {
-                       $this->dieUsageMsg( array( 'missingparam', 'action' ) );
-               }
-
                $allowedAllActions = array( 'markread' );
                $actionsAllowedOnNonLqtPage = array( 'markread', 'markunread' );
                $action = $params['threadaction'];
@@ -33,8 +29,14 @@
 
                                        if ( !in_array( $action, 
$actionsAllowedOnNonLqtPage ) && !LqtDispatch::isLqtPage( 
$threadObj->getTitle() ) ) {
                                                $articleTitleDBKey = 
$threadObj->getTitle()->getDBkey();
-                                               $message = wfMessage( 
'lqt-not-a-liquidthreads-page', $articleTitleDBKey )->text();
-                                               $this->dieUsageMsg( $message );
+                                               if ( is_callable( [ $this, 
'dieWithError' ] ) ) {
+                                                       $this->dieWithError(
+                                                               [ 
'lqt-not-a-liquidthreads-page', wfEscapeWikiText( $articleTitleDBKey ) ]
+                                                       );
+                                               } else {
+                                                       $message = wfMessage( 
'lqt-not-a-liquidthreads-page', $articleTitleDBKey )->text();
+                                                       $this->dieUsageMsg( 
$message );
+                                               }
                                        }
                                }
                        }
@@ -116,24 +118,40 @@
 
        public function actionSplit( $threads, $params ) {
                if ( count( $threads ) > 1 ) {
-                       $this->dieUsage( 'You may only split one thread at a 
time',
+                       if ( is_callable( [ $this, 'dieWithError' ] ) ) {
+                               $this->dieWithError( 
'apierror-liquidthreads-onlyone', 'too-many-threads' );
+                       } else {
+                               $this->dieUsage( 'You may only split one thread 
at a time',
                                        'too-many-threads' );
+                       }
                } elseif ( count( $threads ) < 1 ) {
-                       $this->dieUsage( 'You must specify a thread to split',
+                       if ( is_callable( [ $this, 'dieWithError' ] ) ) {
+                               $this->dieWithError( 
'apierror-liquidthreads-threadneeded', 'no-specified-threads' );
+                       } else {
+                               $this->dieUsage( 'You must specify a thread to 
split',
                                        'no-specified-threads' );
+                       }
                }
 
                $thread = array_pop( $threads );
 
                $errors = $thread->title()->getUserPermissionsErrors( 
'lqt-split', $this->getUser() );
                if ( $errors ) {
-                       // We don't care about multiple errors, just report one 
of them
-                       $this->dieUsageMsg( reset( $errors ) );
+                       if ( is_callable( [ $this, 'errorArrayToStatus' ] ) ) {
+                               $this->dieStatus( $this->errorArrayToStatus( 
$errors ) );
+                       } else {
+                               // We don't care about multiple errors, just 
report one of them
+                               $this->dieUsageMsg( reset( $errors ) );
+                       }
                }
 
                if ( $thread->isTopmostThread() ) {
-                       $this->dieUsage( 'This thread is already a top-level 
thread.',
-                               'already-top-level' );
+                       if ( is_callable( [ $this, 'dieWithError' ] ) ) {
+                               $this->dieWithError( 
'apierror-liquidthreads-alreadytop', 'already-top-level' );
+                       } else {
+                               $this->dieUsage( 'This thread is already a 
top-level thread.',
+                                       'already-top-level' );
+                       }
                }
 
                $title = null;
@@ -141,8 +159,12 @@
                if ( empty( $params['subject'] ) ||
                        ! Thread::validateSubject( $params['subject'], $title, 
null, $article ) ) {
 
-                       $this->dieUsage( 'No subject, or an invalid subject, 
was specified',
-                               'no-valid-subject' );
+                       if ( is_callable( [ $this, 'dieWithError' ] ) ) {
+                               $this->dieWithError( 
'apierror-liquidthreads-nosubject', 'no-valid-subject' );
+                       } else {
+                               $this->dieUsage( 'No subject, or an invalid 
subject, was specified',
+                                       'no-valid-subject' );
+                       }
                }
 
                $subject = $params['subject'];
@@ -180,13 +202,21 @@
 
        public function actionMerge( $threads, $params ) {
                if ( count( $threads ) < 1 ) {
-                       $this->dieUsage( 'You must specify a thread to merge',
-                               'no-specified-threads' );
+                       if ( is_callable( [ $this, 'dieWithError' ] ) ) {
+                               $this->dieWithError( 
'apihelp-liquidthreads-threadneeded', 'no-specified-threads' );
+                       } else {
+                               $this->dieUsage( 'You must specify a thread to 
merge',
+                                       'no-specified-threads' );
+                       }
                }
 
                if ( empty( $params['newparent'] ) ) {
-                       $this->dieUsage( 'You must specify a new parent thread 
to merge beneath',
-                               'no-parent-thread' );
+                       if ( is_callable( [ $this, 'dieWithError' ] ) ) {
+                               $this->dieUsage( 
'apierror-liquidthreads-noparent', 'no-parent-thread' );
+                       } else {
+                               $this->dieUsage( 'You must specify a new parent 
thread to merge beneath',
+                                       'no-parent-thread' );
+                       }
                }
 
                $newParent = $params['newparent'];
@@ -200,13 +230,21 @@
 
                $errors = $newParent->title()->getUserPermissionsErrors( 
'lqt-merge', $this->getUser() );
                if ( $errors ) {
-                       // We don't care about multiple errors, just report one 
of them
-                       $this->dieUsageMsg( reset( $errors ) );
+                       if ( is_callable( [ $this, 'errorArrayToStatus' ] ) ) {
+                               $this->dieStatus( $this->errorArrayToStatus( 
$errors ) );
+                       } else {
+                               // We don't care about multiple errors, just 
report one of them
+                               $this->dieUsageMsg( reset( $errors ) );
+                       }
                }
 
                if ( !$newParent ) {
-                       $this->dieUsage( 'The parent thread you specified was 
neither the title ' .
+                       if ( is_callable( [ $this, 'dieWithError' ] ) ) {
+                               $this->dieWithError( 
'apierror-liquidthreads-badparent', 'invalid-parent-thread' );
+                       } else {
+                               $this->dieUsage( 'The parent thread you 
specified was neither the title ' .
                                        'of a thread, nor a thread ID.', 
'invalid-parent-thread' );
+                       }
                }
 
                // Pull a reason, if applicable.
@@ -238,27 +276,43 @@
        public function actionNewThread( $threads, $params ) {
                // Validate talkpage parameters
                if ( !count( $params['talkpage'] ) ) {
-                       $this->dieUsageMsg( array( 'missingparam', 'talkpage' ) 
);
+                       if ( is_callable( [ $this, 'dieWithError' ] ) ) {
+                               $this->dieWithError( array( 
'apierror-missingparam', 'talkpage' ) );
+                       } else {
+                               $this->dieUsageMsg( array( 'missingparam', 
'talkpage' ) );
+                       }
                }
 
                $talkpageTitle = Title::newFromText( $params['talkpage'] );
 
                if ( !$talkpageTitle || !LqtDispatch::isLqtPage( $talkpageTitle 
) ) {
-                       $this->dieUsage( 'The talkpage you specified is 
invalid, or does not ' .
-                               'have discussion threading enabled.', 
'invalid-talkpage' );
+                       if ( is_callable( [ $this, 'dieWithError' ] ) ) {
+                               $this->dieWithError( 
'apierror-liquidthreads-invalidtalkpage', 'invalid-talkpage' );
+                       } else {
+                               $this->dieUsage( 'The talkpage you specified is 
invalid, or does not ' .
+                                       'have discussion threading enabled.', 
'invalid-talkpage' );
+                       }
                }
                $talkpage = new Article( $talkpageTitle, 0 );
 
                // Check if we can post.
                $user = $this->getUser();
                if ( Thread::canUserPost( $user, $talkpage ) !== true ) {
-                       $this->dieUsage( 'You cannot post to the specified 
talkpage, ' .
-                               'because it is protected from new posts', 
'talkpage-protected' );
+                       if ( is_callable( [ $this, 'dieWithError' ] ) ) {
+                               $this->dieWithError( 
'apierror-liquidthreads-talkpageprotected', 'talkpage-protected' );
+                       } else {
+                               $this->dieUsage( 'You cannot post to the 
specified talkpage, ' .
+                                       'because it is protected from new 
posts', 'talkpage-protected' );
+                       }
                }
 
                // Validate subject, generate a title
                if ( empty( $params['subject'] ) ) {
-                       $this->dieUsageMsg( array( 'missingparam', 'subject' ) 
);
+                       if ( is_callable( [ $this, 'dieWithError' ] ) ) {
+                               $this->dieWithError( array( 
'apierror-missingparam', 'subject' ) );
+                       } else {
+                               $this->dieUsageMsg( array( 'missingparam', 
'subject' ) );
+                       }
                }
 
                $subject = $params['subject'];
@@ -266,14 +320,22 @@
                $subjectOk = Thread::validateSubject( $subject, $title, null, 
$talkpage );
 
                if ( !$subjectOk ) {
-                       $this->dieUsage( 'The subject you specified is not 
valid',
-                               'invalid-subject' );
+                       if ( is_callable( [ $this, 'dieWithError' ] ) ) {
+                               $this->dieWithError( 
'apierror-liquidthreads-badsubject', 'invalid-subject' );
+                       } else {
+                               $this->dieUsage( 'The subject you specified is 
not valid',
+                                       'invalid-subject' );
+                       }
                }
                $article = new Article( $title, 0 );
 
                // Check for text
                if ( empty( $params['text'] ) ) {
-                       $this->dieUsage( 'You must include text in your post', 
'no-text' );
+                       if ( is_callable( [ $this, 'dieWithError' ] ) ) {
+                               $this->dieWithError( 
'apierror-liquidthreads-notext', 'no-text' );
+                       } else {
+                               $this->dieUsage( 'You must include text in your 
post', 'no-text' );
+                       }
                }
                $text = $params['text'];
 
@@ -357,11 +419,19 @@
 
        public function actionEdit( $threads, $params ) {
                if ( count( $threads ) > 1 ) {
-                       $this->dieUsage( 'You may only edit one thread at a 
time',
+                       if ( is_callable( [ $this, 'dieWithError' ] ) ) {
+                               $this->dieWithError( 
'apierror-liquidthreads-onlyone', 'too-many-threads' );
+                       } else {
+                               $this->dieUsage( 'You may only edit one thread 
at a time',
                                        'too-many-threads' );
+                       }
                } elseif ( count( $threads ) < 1 ) {
-                       $this->dieUsage( 'You must specify a thread to edit',
+                       if ( is_callable( [ $this, 'dieWithError' ] ) ) {
+                               $this->dieWithError( 
'apierror-liquidthreads-threadneeded', 'no-specified-threads' );
+                       } else {
+                               $this->dieUsage( 'You must specify a thread to 
edit',
                                        'no-specified-threads' );
+                       }
                }
 
                $thread = array_pop( $threads );
@@ -381,13 +451,20 @@
                }
 
                if ( !$subjectOk ) {
-                       $this->dieUsage( 'The subject you specified is not 
valid',
-                               'invalid-subject' );
+                       if ( is_callable( [ $this, 'dieWithError' ] ) ) {
+                               $this->dieWithError( 
'apierror-liquidthreads-badsubject', 'invalid-subject' );
+                       } else {
+                               $this->dieUsage( 'The subject you specified is 
not valid', 'invalid-subject' );
+                       }
                }
 
                // Check for text
                if ( empty( $params['text'] ) ) {
-                       $this->dieUsage( 'You must include text in your post', 
'no-text' );
+                       if ( is_callable( [ $this, 'dieWithError' ] ) ) {
+                               $this->dieWithError( 
'apierror-liquidthreads-notext', 'no-text' );
+                       } else {
+                               $this->dieUsage( 'You must include text in your 
post', 'no-text' );
+                       }
                }
                $text = $params['text'];
 
@@ -471,11 +548,19 @@
        public function actionReply( $threads, $params ) {
                // Validate thread parameter
                if ( count( $threads ) > 1 ) {
-                       $this->dieUsage( 'You may only reply to one thread at a 
time',
+                       if ( is_callable( [ $this, 'dieWithError' ] ) ) {
+                               $this->dieWithError( 
'apierror-liquidthreads-onlyone', 'too-many-threads' );
+                       } else {
+                               $this->dieUsage( 'You may only reply to one 
thread at a time',
                                        'too-many-threads' );
+                       }
                } elseif ( count( $threads ) < 1 ) {
-                       $this->dieUsage( 'You must specify a thread to reply 
to',
+                       if ( is_callable( [ $this, 'dieWithError' ] ) ) {
+                               $this->dieWithError( 
'apierror-liquidthreads-threadneeded', 'no-specified-threads' );
+                       } else {
+                               $this->dieUsage( 'You must specify a thread to 
reply to',
                                        'no-specified-threads' );
+                       }
                }
                $replyTo = array_pop( $threads );
 
@@ -483,14 +568,26 @@
                $user = $this->getUser();
                $perm_result = $replyTo->canUserReply( $user );
                if ( $perm_result !== true ) {
-                       $this->dieUsage( "You cannot reply to this thread, 
because the " .
-                               $perm_result . " is protected from replies.",
-                               $perm_result . '-protected' );
+                       if ( is_callable( [ $this, 'dieWithError' ] ) ) {
+                               // Messages: 
apierror-liquidthreads-noreplies-talkpage,
+                               // apierror-liquidthreads-noreplies-thread
+                               $this->dieWithError(
+                                       
"apierror-liquidthreads-noreplies-{$perm_result}", "{$perm_result}-protected"
+                               );
+                       } else {
+                               $this->dieUsage( "You cannot reply to this 
thread, because the " .
+                                       $perm_result . " is protected from 
replies.",
+                                       $perm_result . '-protected' );
+                       }
                }
 
                // Validate text parameter
                if ( empty( $params['text'] ) ) {
-                       $this->dieUsage( 'You must include text in your post', 
'no-text' );
+                       if ( is_callable( [ $this, 'dieWithError' ] ) ) {
+                               $this->dieWithError( 
'apierror-liquidthreads-notext', 'no-text' );
+                       } else {
+                               $this->dieUsage( 'You must include text in your 
post', 'no-text' );
+                       }
                }
 
                $text = $params['text'];
@@ -621,23 +718,39 @@
        public function actionSetSubject( $threads, $params ) {
                // Validate thread parameter
                if ( count( $threads ) > 1 ) {
-                       $this->dieUsage( 'You may only change the subject of 
one thread at a time',
+                       if ( is_callable( [ $this, 'dieWithError' ] ) ) {
+                               $this->dieWithError( 
'apierror-liquidthreads-onlyone', 'too-many-threads' );
+                       } else {
+                               $this->dieUsage( 'You may only change the 
subject of one thread at a time',
                                        'too-many-threads' );
+                       }
                } elseif ( count( $threads ) < 1 ) {
-                       $this->dieUsage( 'You must specify a thread to change 
the subject of',
+                       if ( is_callable( [ $this, 'dieWithError' ] ) ) {
+                               $this->dieWithError( 
'apierror-liquidthreads-threadneeded', 'no-specified-threads' );
+                       } else {
+                               $this->dieUsage( 'You must specify a thread to 
change the subject of',
                                        'no-specified-threads' );
+                       }
                }
                $thread = array_pop( $threads );
 
                $errors = $thread->title()->getUserPermissionsErrors( 'edit', 
$this->getUser() );
                if ( $errors ) {
-                       // We don't care about multiple errors, just report one 
of them
-                       $this->dieUsageMsg( reset( $errors ) );
+                       if ( is_callable( [ $this, 'errorArrayToStatus' ] ) ) {
+                               $this->dieStatus( $this->errorArrayToStatus( 
$errors ) );
+                       } else {
+                               // We don't care about multiple errors, just 
report one of them
+                               $this->dieUsageMsg( reset( $errors ) );
+                       }
                }
 
                // Validate subject
                if ( empty( $params['subject'] ) ) {
-                       $this->dieUsageMsg( array( 'missingparam', 'subject' ) 
);
+                       if ( is_callable( [ $this, 'dieWithError' ] ) ) {
+                               $this->dieWithError( array( 
'apierror-missingparam', 'subject' ) );
+                       } else {
+                               $this->dieUsageMsg( array( 'missingparam', 
'subject' ) );
+                       }
                }
 
                $talkpage = $thread->article();
@@ -647,8 +760,12 @@
                $subjectOk = Thread::validateSubject( $subject, $title, null, 
$talkpage );
 
                if ( !$subjectOk ) {
-                       $this->dieUsage( 'The subject you specified is not 
valid',
-                               'invalid-subject' );
+                       if ( is_callable( [ $this, 'dieWithError' ] ) ) {
+                               $this->dieWithError( 
'apierror-liquidthreads-badsubject', 'invalid-subject' );
+                       } else {
+                               $this->dieUsage( 'The subject you specified is 
not valid',
+                                       'invalid-subject' );
+                       }
                }
 
                $reason = null;
@@ -678,15 +795,23 @@
        public function actionSetSortkey( $threads, $params ) {
                // First check for threads
                if ( !count( $threads ) ) {
-                       $this->dieUsage( 'You must specify a thread to set the 
sortkey of',
+                       if ( is_callable( [ $this, 'dieWithError' ] ) ) {
+                               $this->dieWithError( 
'apihelp-liquidthreads-threadneeded', 'no-specified-threads' );
+                       } else {
+                               $this->dieUsage( 'You must specify a thread to 
set the sortkey of',
                                        'no-specified-threads' );
+                       }
                }
 
                // Validate timestamp
                if ( empty( $params['sortkey'] ) ) {
-                       $this->dieUsage( 'You must specify a valid timestamp 
for the sortkey ' .
-                               'parameter. It should be in the form 
YYYYMMddhhmmss, a ' .
-                               'unix timestamp or "now".', 'invalid-sortkey' );
+                       if ( is_callable( [ $this, 'dieWithError' ] ) ) {
+                               $this->dieWithError( 
'apierror-liquidthreads-badsortkey', 'invalid-sortkey' );
+                       } else {
+                               $this->dieUsage( 'You must specify a valid 
timestamp for the sortkey ' .
+                                       'parameter. It should be in the form 
YYYYMMddhhmmss, a ' .
+                                       'unix timestamp or "now".', 
'invalid-sortkey' );
+                       }
                }
 
                $ts = $params['sortkey'];
@@ -696,9 +821,13 @@
                $ts = wfTimestamp( TS_MW, $ts );
 
                if ( !$ts ) {
-                       $this->dieUsage( 'You must specify a valid timestamp 
for the sortkey' .
-                               'parameter. It should be in the form 
YYYYMMddhhmmss, a ' .
-                               'unix timestamp or "now".', 'invalid-sortkey' );
+                       if ( is_callable( [ $this, 'dieWithError' ] ) ) {
+                               $this->dieWithError( 
'apierror-liquidthreads-badsortkey', 'invalid-sortkey' );
+                       } else {
+                               $this->dieUsage( 'You must specify a valid 
timestamp for the sortkey' .
+                                       'parameter. It should be in the form 
YYYYMMddhhmmss, a ' .
+                                       'unix timestamp or "now".', 
'invalid-sortkey' );
+                       }
                }
 
                $reason = null;
@@ -711,8 +840,12 @@
 
                $errors = $thread->title()->getUserPermissionsErrors( 'edit', 
$this->getUser() );
                if ( $errors ) {
-                       // We don't care about multiple errors, just report one 
of them
-                       $this->dieUsageMsg( reset( $errors ) );
+                       if ( is_callable( [ $this, 'errorArrayToStatus' ] ) ) {
+                               $this->dieStatus( $this->errorArrayToStatus( 
$errors ) );
+                       } else {
+                               // We don't care about multiple errors, just 
report one of them
+                               $this->dieUsageMsg( reset( $errors ) );
+                       }
                }
 
                $thread->setSortkey( $ts );
@@ -733,19 +866,31 @@
 
        public function actionAddReaction( $threads, $params ) {
                if ( !count( $threads ) ) {
-                       $this->dieUsage( 'You must specify a thread to add a 
reaction for',
+                       if ( is_callable( [ $this, 'dieWithError' ] ) ) {
+                               $this->dieWithError( 
'apihelp-liquidthreads-threadneeded', 'no-specified-threads' );
+                       } else {
+                               $this->dieUsage( 'You must specify a thread to 
add a reaction for',
                                        'no-specified-threads' );
+                       }
                }
 
-               if ( ! $this->getUser()->isAllowed( 'lqt-react' ) ) {
-                       $this->dieUsage( 'You are not allowed to react to 
threads.', 'permission-denied' );
+               if ( is_callable( [ $this, 'checkUserRightsAny' ] ) ) {
+                       $this->checkUserRightsAny( 'lqt-react' );
+               } else {
+                       if ( ! $this->getUser()->isAllowed( 'lqt-react' ) ) {
+                               $this->dieUsage( 'You are not allowed to react 
to threads.', 'permission-denied' );
+                       }
                }
 
                $required = array( 'type', 'value' );
 
                if ( count( array_diff( $required, array_keys( $params ) ) ) ) {
-                       $this->dieUsage( 'You must specify both a type and a 
value for the reaction',
-                                               'missing-parameter' );
+                       if ( is_callable( [ $this, 'dieWithError' ] ) ) {
+                               $this->dieWithError( 
'apierror-liquidthreads-badreaction', 'missing-parameter' );
+                       } else {
+                               $this->dieUsage( 'You must specify both a type 
and a value for the reaction',
+                                       'missing-parameter' );
+                       }
                }
 
                $result = array();
@@ -766,20 +911,32 @@
 
        public function actionDeleteReaction( $threads, $params ) {
                if ( !count( $threads ) ) {
-                       $this->dieUsage( 'You must specify a thread to delete a 
reaction for',
+                       if ( is_callable( [ $this, 'dieWithError' ] ) ) {
+                               $this->dieWithError( 
'apihelp-liquidthreads-threadneeded', 'no-specified-threads' );
+                       } else {
+                               $this->dieUsage( 'You must specify a thread to 
delete a reaction for',
                                        'no-specified-threads' );
+                       }
                }
 
                $user = $this->getUser();
-               if ( ! $user->isAllowed( 'lqt-react' ) ) {
-                       $this->dieUsage( 'You are not allowed to react to 
threads.', 'permission-denied' );
+               if ( is_callable( [ $this, 'checkUserRightsAny' ] ) ) {
+                       $this->checkUserRightsAny( 'lqt-react' );
+               } else {
+                       if ( ! $user->isAllowed( 'lqt-react' ) ) {
+                               $this->dieUsage( 'You are not allowed to react 
to threads.', 'permission-denied' );
+                       }
                }
 
                $required = array( 'type', 'value' );
 
                if ( count( array_diff( $required, array_keys( $params ) ) ) ) {
-                       $this->dieUsage( 'You must specify both a type for the 
reaction',
-                                               'missing-parameter' );
+                       if ( is_callable( [ $this, 'dieWithError' ] ) ) {
+                               $this->dieWithError( 
'apierror-liquidthreads-badreaction', 'missing-parameter' );
+                       } else {
+                               $this->dieUsage( 'You must specify both a type 
and a value for the reaction',
+                                       'missing-parameter' );
+                       }
                }
 
                $result = array();
@@ -868,6 +1025,7 @@
                        ),
                        'talkpage' => null,
                        'threadaction' => array(
+                               ApiBase::PARAM_REQUIRED => true,
                                ApiBase::PARAM_TYPE => array_keys( 
$this->getActions() ),
                        ),
                        'token' => null,
diff --git a/i18n/en.json b/i18n/en.json
index e0b6b93..c59ff9f 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -147,6 +147,7 @@
        "right-lqt-split": "Split threads",
        "right-lqt-merge": "Merge threads",
        "right-lqt-react": "Reply to threads",
+       "action-lqt-react": "reply to threads",
        "lqt-thread-merge": "Merge into another thread",
        "lqt-thread-merge-to": "Merge into this thread",
        "lqt_merge_thread": "Merge thread",
@@ -286,5 +287,19 @@
        "apihelp-threadaction-param-method": "For getting inline edit forms, 
the method to get a form for.",
        "apihelp-threadaction-param-operand": "",
        "apihelp-threadaction-param-captchaword": "Answer to the CAPTCHA.",
-       "apihelp-threadaction-param-captchaid": "CAPTCHA ID from previous 
request."
+       "apihelp-threadaction-param-captchaid": "CAPTCHA ID from previous 
request.",
+       "apierror-liquidthreads-alreadytop": "This thread is already a 
top-level thread.",
+       "apierror-liquidthreads-badparent": "The parent thread you specified 
was neither the title of a thread, nor a thread ID.",
+       "apierror-liquidthreads-badreaction": "You must specify both a type and 
a value for the reaction.",
+       "apierror-liquidthreads-badsortkey": "You must specify a valid 
timestamp for the <var>sortkey</var> parameter. It should be in the form 
YYYYMMddhhmmss, a unix timestamp or <kbd>now</kbd>.",
+       "apierror-liquidthreads-badsubject": "The subject you specified is not 
valid.",
+       "apierror-liquidthreads-invalidtalkpage": "The talkpage you specified 
is invalid, or does not have discussion threading enabled.",
+       "apierror-liquidthreads-noparent": "You must specify a new parent 
thread to merge beneath.",
+       "apierror-liquidthreads-noreplies-talkpage": "You cannot reply to this 
thread, because the talkpage is protected from replies.",
+       "apierror-liquidthreads-noreplies-thread": "You cannot reply to this 
thread, because the thread is protected from replies.",
+       "apierror-liquidthreads-nosubject": "No subject, or an invalid subject, 
was specified.",
+       "apierror-liquidthreads-notext": "You must include text in your post.",
+       "apierror-liquidthreads-onlyone": "You may only operate on one thread 
at a time.",
+       "apierror-liquidthreads-talkpageprotected": "You cannot post to the 
specified talkpage, because it is protected from new posts.",
+       "apierror-liquidthreads-threadneeded": "You must specify a thread to 
operate on."
 }
diff --git a/i18n/qqq.json b/i18n/qqq.json
index fef9d43..76c041b 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -157,6 +157,7 @@
        "right-lqt-split": "{{doc-right|lqt-split}}",
        "right-lqt-merge": "{{doc-right|lqt-merge}}\n{{Identical|Merge 
thread}}",
        "right-lqt-react": "{{doc-right|lqt-react}}",
+       "action-lqt-react": "{{doc-action|lqt-react}}",
        "lqt_merge_thread": 
"{{doc-special|MergeThread|unlisted=1}}\n{{Identical|Merge thread}}",
        "lqt-merge-submit": "{{Identical|Merge}}",
        "lqt-merge-success": "Used as success message. Parameters:\n* $1 - the 
source thread title, with link\n* $2 - the destination thread title, with link",
@@ -265,5 +266,19 @@
        "apihelp-threadaction-param-method": 
"{{doc-apihelp-param|threadaction|method}}",
        "apihelp-threadaction-param-operand": 
"{{notranslate}}\n{{doc-apihelp-param|threadaction|operand}}",
        "apihelp-threadaction-param-captchaword": 
"{{doc-apihelp-param|threadaction|captchaword}}",
-       "apihelp-threadaction-param-captchaid": 
"{{doc-apihelp-param|threadaction|captchaid}}"
+       "apihelp-threadaction-param-captchaid": 
"{{doc-apihelp-param|threadaction|captchaid}}",
+       "apierror-liquidthreads-alreadytop": "{{doc-apierror}}",
+       "apierror-liquidthreads-badparent": "{{doc-apierror}}",
+       "apierror-liquidthreads-badreaction": "{{doc-apierror}}",
+       "apierror-liquidthreads-badsortkey": "{{doc-apierror}}",
+       "apierror-liquidthreads-badsubject": "{{doc-apierror}}",
+       "apierror-liquidthreads-invalidtalkpage": "{{doc-apierror}}",
+       "apierror-liquidthreads-noparent": "{{doc-apierror}}",
+       "apierror-liquidthreads-noreplies-talkpage": "{{doc-apierror}}",
+       "apierror-liquidthreads-noreplies-thread": "{{doc-apierror}}",
+       "apierror-liquidthreads-nosubject": "{{doc-apierror}}",
+       "apierror-liquidthreads-notext": "{{doc-apierror}}",
+       "apierror-liquidthreads-onlyone": "{{doc-apierror}}",
+       "apierror-liquidthreads-talkpageprotected": "{{doc-apierror}}",
+       "apierror-liquidthreads-threadneeded": "{{doc-apierror}}"
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I088d34b0fdf4d08286186cd5fcef7db53de1175f
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/LiquidThreads
Gerrit-Branch: master
Gerrit-Owner: Anomie <bjor...@wikimedia.org>
Gerrit-Reviewer: Anomie <bjor...@wikimedia.org>
Gerrit-Reviewer: Gergő Tisza <gti...@wikimedia.org>
Gerrit-Reviewer: Siebrand <siebr...@kitano.nl>
Gerrit-Reviewer: jenkins-bot <>

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

Reply via email to