From d1a162b2134a1f54962942035cb5b032388fc00b Mon Sep 17 00:00:00 2001 From: Robin Pepermans Date: Sun, 4 Sep 2011 21:19:18 +0000 Subject: [PATCH] Correctly parse interface messages as such, so it doesn't get converted according to the content language (like r94395/r94279) --- includes/EditPage.php | 13 ++++++++----- includes/OutputPage.php | 3 ++- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/includes/EditPage.php b/includes/EditPage.php index 90434a47d3..43fe1a4a32 100644 --- a/includes/EditPage.php +++ b/includes/EditPage.php @@ -228,11 +228,13 @@ class EditPage { $undotext = $this->mArticle->getUndoText( $undorev, $oldrev ); if ( $undotext === false ) { # Warn the user that something went wrong - $this->editFormPageTop .= $wgOut->parse( '
' . wfMsgNoTrans( 'undo-failure' ) . '
' ); + $this->editFormPageTop .= $wgOut->parse( '
' . + wfMsgNoTrans( 'undo-failure' ) . '
', true, /* interface */true ); } else { $text = $undotext; # Inform the user of our success and set an automatic edit summary - $this->editFormPageTop .= $wgOut->parse( '
' . wfMsgNoTrans( 'undo-success' ) . '
' ); + $this->editFormPageTop .= $wgOut->parse( '
' . + wfMsgNoTrans( 'undo-success' ) . '
', true, /* interface */true ); $firstrev = $oldrev->getNext(); # If we just undid one rev, use an autosummary if ( $firstrev->mId == $undo ) { @@ -245,7 +247,8 @@ class EditPage { // Failed basic sanity checks. // Older revisions may have been removed since the link // was created, or we may simply have got bogus input. - $this->editFormPageTop .= $wgOut->parse( '
' . wfMsgNoTrans( 'undo-norev' ) . '
' ); + $this->editFormPageTop .= $wgOut->parse( '
' . + wfMsgNoTrans( 'undo-norev' ) . '
'true, /* interface */true ); } } elseif ( $section != '' ) { if ( $section == 'new' ) { @@ -2080,7 +2083,7 @@ HTML // string, which happens when you initially edit // a category page, due to automatic preview-on-open. $parsedNote = $wgOut->parse( "
" . - wfMsg( 'session_fail_preview_html' ) . "
" ); + wfMsg( 'session_fail_preview_html' ) . "", true, /* interface */true ); } wfProfileOut( __METHOD__ ); return $parsedNote; @@ -2154,7 +2157,7 @@ HTML $previewhead = "
\n" . '

' . htmlspecialchars( wfMsg( 'preview' ) ) . "

" . - $wgOut->parse( $note ) . $conflict . "
\n"; + $wgOut->parse( $note, true, /* interface */true ) . $conflict . "\n"; $pageLang = $this->mTitle->getPageLanguage(); $attribs = array( 'lang' => $pageLang->getCode(), 'dir' => $pageLang->getDir(), diff --git a/includes/OutputPage.php b/includes/OutputPage.php index e81ec923b2..b4f56b510b 100644 --- a/includes/OutputPage.php +++ b/includes/OutputPage.php @@ -1459,7 +1459,8 @@ class OutputPage extends ContextSource { * @param $linestart Boolean: is this the start of a line? * @param $interface Boolean: use interface language ($wgLang instead of * $wgContLang) while parsing language sensitive magic - * words like GRAMMAR and PLURAL + * words like GRAMMAR and PLURAL. This also disables + * LanguageConverter. * @param $language Language object: target language object, will override * $interface * @return String: HTML -- 2.20.1