X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fapi%2FApiResult.php;h=61a4394e74d338e7c4b369e9917976facde6edd0;hb=2456395c419df4319e74ecafe5f0402558214a3c;hp=6e27fc892044836120186e726f66d71ce46445c9;hpb=48df0714bbfe0d5cf3ced3de9081c02d583d78c3;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/api/ApiResult.php b/includes/api/ApiResult.php index 6e27fc8920..61a4394e74 100644 --- a/includes/api/ApiResult.php +++ b/includes/api/ApiResult.php @@ -413,11 +413,9 @@ class ApiResult implements ApiSerializable { $newsize = $this->size + self::size( $value ); if ( $this->maxSize !== false && $newsize > $this->maxSize ) { - /// @todo Add i18n message when replacing calls to ->setWarning() - $msg = new ApiRawMessage( 'This result was truncated because it would otherwise ' . - 'be larger than the limit of $1 bytes', 'truncatedresult' ); - $msg->numParams( $this->maxSize ); - $this->errorFormatter->addWarning( 'result', $msg ); + $this->errorFormatter->addWarning( + 'result', [ 'apiwarn-truncatedresult', Message::numParam( $this->maxSize ) ] + ); return false; } $this->size = $newsize;