case self::AS_CANNOT_USE_CUSTOM_MODEL:
case self::AS_PARSE_ERROR:
case self::AS_UNICODE_NOT_SUPPORTED:
- $out->wrapWikiTextAsInterface( 'error', $status->getWikiText() );
+ $out->wrapWikiTextAsInterface( 'error',
+ $status->getWikiText( false, false, $this->context->getLanguage() )
+ );
return true;
case self::AS_SUCCESS_NEW_ARTICLE:
// is if an extension hook aborted from inside ArticleSave.
// Render the status object into $this->hookError
// FIXME this sucks, we should just use the Status object throughout
- $this->hookError = '<div class="error">' . "\n" . $status->getWikiText() .
+ $this->hookError = '<div class="error">' . "\n" .
+ $status->getWikiText( false, false, $this->context->getLanguage() ) .
'</div>';
return true;
}
);
if ( !$status->isOK() ) {
- $this->show( $out->parseInlineAsInterface( $status->getWikiText() ) );
+ $this->show( $out->parseInlineAsInterface(
+ $status->getWikiText( false, false, $this->mContext->getLanguage() )
+ ) );
return false;
}
$outputPage->enableClientCache( false );
$outputPage->setRobotPolicy( 'noindex,nofollow' );
- $errortext = $error->getWikiText( false, 'view-pool-error' );
+ $errortext = $error->getWikiText(
+ false, 'view-pool-error', $this->getContext()->getLanguage()
+ );
$outputPage->wrapWikiTextAsInterface( 'errorbox', $errortext );
}
# Connection or timeout error
if ( $error == '' ) {
$outputPage->wrapWikiTextAsInterface(
'error mw-error-cannotdelete',
- $status->getWikiText()
+ $status->getWikiText( false, false, $context->getLanguage() )
);
$deleteLogPage = new LogPage( 'delete' );
$outputPage->addHTML( Xml::element( 'h2', null, $deleteLogPage->getName()->text() ) );
}
if ( $extraMessages ) {
$extraMessages = Status::wrap( $extraMessages );
- $out->addWikiTextAsInterface( $extraMessages->getWikiText() );
+ $out->addWikiTextAsInterface(
+ $extraMessages->getWikiText( false, false, $this->getLanguage() )
+ );
}
$out->addHTML( $injected_html );
return Status::newGood( $this->msg( 'confirmemail_sent' )->text() );
} else {
return Status::newFatal( new RawMessage(
- $status->getWikiText( 'confirmemail_sendfailed' )
+ $status->getWikiText( 'confirmemail_sendfailed', false, $this->getLanguage() )
) );
}
}
protected function failure( $status ) {
$this->getOutput()->setPageTitle( $this->msg( 'actionfailed' ) );
$this->getOutput()->wrapWikiTextAsInterface(
- 'errorbox', $status->getWikiText( 'tags-edit-failure' )
+ 'errorbox', $status->getWikiText( 'tags-edit-failure', false, $this->getLanguage() )
);
$this->showForm();
}
$out = $this->getOutput();
if ( !$source->isGood() ) {
$out->wrapWikiTextAsInterface( 'error',
- $this->msg( 'importfailed', $source->getWikiText() )->plain()
+ $this->msg( 'importfailed', $source->getWikiText( false, false, $this->getLanguage() ) )
+ ->plain()
);
} else {
$importer = new WikiImporter( $source->value, $this->getConfig() );
"<div class=\"error\">\n$1\n</div>",
[
'import-options-wrong',
- $statusRootPage->getWikiText(),
+ $statusRootPage->getWikiText( false, false, $this->getLanguage() ),
count( $statusRootPage->getErrorsArray() )
]
);
# Zero revisions
$out->wrapWikiMsg(
"<div class=\"error\">\n$1\n</div>",
- [ 'importfailed', $result->getWikiText() ]
+ [ 'importfailed', $result->getWikiText( false, false, $this->getLanguage() ) ]
);
} else {
# Success!
$this->getOutput()->setPageTitle( $this->msg( 'actionfailed' ) );
$this->getOutput()->wrapWikiTextAsInterface(
'errorbox',
- $status->getWikiText( $this->typeLabels['failure'] )
+ $status->getWikiText( $this->typeLabels['failure'], false, $this->getLanguage() )
);
$this->showForm();
}
'<div id="mw-error-cannotundelete">' .
$status->getWikiText(
'cannotundelete',
- 'cannotundelete'
+ 'cannotundelete',
+ $this->getLanguage()
) . '</div>'
);
}
'error',
$status->getWikiText(
'undelete-error-short',
- 'undelete-error-long'
+ 'undelete-error-long',
+ $this->getLanguage()
)
);
}
// Fetch the file if required
$status = $this->mUpload->fetchFile();
if ( !$status->isOK() ) {
- $this->showUploadError( $this->getOutput()->parseAsInterface( $status->getWikiText() ) );
+ $this->showUploadError( $this->getOutput()->parseAsInterface(
+ $status->getWikiText( false, false, $this->getLanguage() )
+ ) );
return;
}
$changeTags, $this->getUser() );
if ( !$changeTagsStatus->isOK() ) {
$this->showUploadError( $this->getOutput()->parseAsInterface(
- $changeTagsStatus->getWikiText()
+ $changeTagsStatus->getWikiText( false, false, $this->getLanguage() )
) );
return;
if ( !$status->isGood() ) {
$this->showRecoverableUploadError(
- $this->getOutput()->parseAsInterface( $status->getWikiText() )
+ $this->getOutput()->parseAsInterface(
+ $status->getWikiText( false, false, $this->getLanguage() )
+ )
);
return;
// save settings
if ( !$fetchedStatus->isOK() ) {
- $this->getOutput()->addWikiTextAsInterface( $fetchedStatus->getWikiText() );
+ $this->getOutput()->addWikiTextAsInterface(
+ $fetchedStatus->getWikiText( false, false, $this->getLanguage() )
+ );
return;
}
return;
} else {
// Print an error message and redisplay the form
- $out->wrapWikiTextAsInterface( 'error', $status->getWikiText() );
+ $out->wrapWikiTextAsInterface(
+ 'error', $status->getWikiText( false, false, $this->getLanguage() )
+ );
}
}
}
function editUserGroupsForm( $username ) {
$status = $this->fetchUser( $username, true );
if ( !$status->isOK() ) {
- $this->getOutput()->addWikiTextAsInterface( $status->getWikiText() );
+ $this->getOutput()->addWikiTextAsInterface(
+ $status->getWikiText( false, false, $this->getLanguage() )
+ );
return;
}