From 60c0474ca8d9885cf2f430f0f575f8e393f08a71 Mon Sep 17 00:00:00 2001 From: Platonides Date: Thu, 14 Jan 2010 17:14:49 +0000 Subject: [PATCH] (bug 19226) First line renders differently on many UI messages Added newlines before $1 to wrapWikiMsgs of
s Also fixes r61052 utf-8 screw-up on RELEASE-NOTES. --- RELEASE-NOTES | 9 +++++---- includes/Article.php | 2 +- includes/EditPage.php | 18 +++++++++--------- includes/OutputPage.php | 8 +++++--- includes/specials/SpecialBooksources.php | 2 +- includes/specials/SpecialConfirmemail.php | 2 +- includes/specials/SpecialPreferences.php | 2 +- .../specials/SpecialRecentchangeslinked.php | 2 +- includes/upload/UploadBase.php | 2 +- 9 files changed, 25 insertions(+), 22 deletions(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 5856d04a93..8606963d96 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -708,6 +708,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN Improved representation of six quotes (may break existing markup). * (bug 22034) Use wfClientAcceptsGzip() in wfGzipHandler instead of reimplementing it. +* (bug 19226) First line renders differently on many UI messages. == API changes in 1.16 == @@ -813,13 +814,13 @@ changes to languages because of MediaZilla reports. * Add Estonian letters äöõšüž to linktrail (et) * (bug 18776) Native name of Burmese language (my) * (bug 18806) Use correct unicode characters in spelling of native Chuvash - (???????) + (Чӑвашла) * (bug 18864) Updated autonym for Zhuang language * (bug 18308) Updated date formatting in Occitan (oc) -* (bug 19080) Added aâîst??AÂÎST?? to Romanion (ro) linktrail +* (bug 19080) Added ăâîşţșțĂÂÎŞŢȘȚ to Romanion (ro) linktrail * (bug 19286) Correct commafying function in Polish (pl) * (bug 19441) Updated date formatting for Lithuanian -* (bug 19630) Added ÄäÇçGgNnÖöSsÜüÝýŽž to Turkmen (tk) linktrail +* (bug 19630) Added ÄäÇçĞğŇňÖöŞşÜüÝýŽž to Turkmen (tk) linktrail * (bug 19949) New linktrail for Greek (el) * (bug 19809) Korean (North Korea) (ko-kp) (new) * (bug 19968) Fixed "Project talk" namespace name for Maltese (mt) @@ -895,4 +896,4 @@ going to run a public MediaWiki, so you can be notified of security fixes. === IRC help === -There's usually someone online \ No newline at end of file +There's usually someone online in #mediawiki on irc.freenode.net diff --git a/includes/Article.php b/includes/Article.php index 7264b1d3dc..b47a906033 100644 --- a/includes/Article.php +++ b/includes/Article.php @@ -1215,7 +1215,7 @@ class Article { $id = User::idFromName( $rootPart ); $ip = User::isIP( $rootPart ); if ( $id == 0 && !$ip ) { # User does not exist - $wgOut->wrapWikiMsg( '
$1
', + $wgOut->wrapWikiMsg( '
\n$1
', array( 'userpage-userdoesnotexist-view', $rootPart ) ); } } diff --git a/includes/EditPage.php b/includes/EditPage.php index caf3f88900..bb325b8032 100644 --- a/includes/EditPage.php +++ b/includes/EditPage.php @@ -772,16 +772,16 @@ class EditPage { $id = User::idFromName( $username ); $ip = User::isIP( $username ); if ( $id == 0 && !$ip ) { - $wgOut->wrapWikiMsg( '
$1
', + $wgOut->wrapWikiMsg( "
\n$1
", array( 'userpage-userdoesnotexist', $username ) ); } } # Try to add a custom edit intro, or use the standard one if this is not possible. if ( !$this->showCustomIntro() && !$this->mTitle->exists() ) { if ( $wgUser->isLoggedIn() ) { - $wgOut->wrapWikiMsg( '
$1
', 'newarticletext' ); + $wgOut->wrapWikiMsg( "
\n$1
", 'newarticletext' ); } else { - $wgOut->wrapWikiMsg( '
$1
', 'newarticletextanon' ); + $wgOut->wrapWikiMsg( "
\n$1
", 'newarticletextanon' ); } } # Give a notice if the user is editing a deleted/moved page... @@ -1426,15 +1426,15 @@ HTML } if ( $this->missingComment ) { - $wgOut->wrapWikiMsg( '
$1
', 'missingcommenttext' ); + $wgOut->wrapWikiMsg( "
\n$1
", 'missingcommenttext' ); } if ( $this->missingSummary && $this->section != 'new' ) { - $wgOut->wrapWikiMsg( '
$1
', 'missingsummary' ); + $wgOut->wrapWikiMsg( "
\n$1
", 'missingsummary' ); } if ( $this->missingSummary && $this->section == 'new' ) { - $wgOut->wrapWikiMsg( '
$1
', 'missingcommentheader' ); + $wgOut->wrapWikiMsg( "
\n$1
", 'missingcommentheader' ); } if ( $this->hookError !== '' ) { @@ -1464,7 +1464,7 @@ HTML if ( wfReadOnly() ) { $wgOut->wrapWikiMsg( "
\n$1\n
", array( 'readonlywarning', wfReadOnlyReason() ) ); } elseif ( $wgUser->isAnon() && $this->formtype != 'preview' ) { - $wgOut->wrapWikiMsg( '
$1
', 'anoneditwarning' ); + $wgOut->wrapWikiMsg( "
\n$1
", 'anoneditwarning' ); } else { if ( $this->isCssJsSubpage ) { # Check the skin exists @@ -1494,7 +1494,7 @@ HTML if ( $this->mTitle->isCascadeProtected() ) { # Is this page under cascading protection from some source pages? list($cascadeSources, /* $restrictions */) = $this->mTitle->getCascadeProtectionSources(); - $notice = "
$1\n"; + $notice = "
\n$1\n"; $cascadeSourcesCount = count( $cascadeSources ); if ( $cascadeSourcesCount > 0 ) { # Explain, and list the titles responsible @@ -1506,7 +1506,7 @@ HTML $wgOut->wrapWikiMsg( $notice, array( 'cascadeprotectedwarning', $cascadeSourcesCount ) ); } if ( !$this->mTitle->exists() && $this->mTitle->getRestrictions( 'create' ) ) { - $wgOut->wrapWikiMsg( '
$1
', 'titleprotectedwarning' ); + $wgOut->wrapWikiMsg( "
\n$1
", 'titleprotectedwarning' ); } if ( $this->kblength === false ) { diff --git a/includes/OutputPage.php b/includes/OutputPage.php index a2b9eaea96..6b2a97d63c 100644 --- a/includes/OutputPage.php +++ b/includes/OutputPage.php @@ -1451,7 +1451,7 @@ class OutputPage { // Wiki is read only $this->setPageTitle( wfMsg( 'readonly' ) ); $reason = wfReadOnlyReason(); - $this->wrapWikiMsg( '
$1
', array( 'readonlytext', $reason ) ); + $this->wrapWikiMsg( '
\n$1
', array( 'readonlytext', $reason ) ); } // Show source, if supplied @@ -2045,11 +2045,13 @@ class OutputPage { * * For example: * - * $wgOut->wrapWikiMsg( '
$1
', 'some-error' ); + * $wgOut->wrapWikiMsg( "
\n$1
", 'some-error' ); * * Is equivalent to: * - * $wgOut->addWikiText( '
' . wfMsgNoTrans( 'some-error' ) . '
' ); + * $wgOut->addWikiText( "
\n" . wfMsgNoTrans( 'some-error' ) . '
' ); + * + * The newline after opening div is needed in some wikitext. See bug 19226. */ public function wrapWikiMsg( $wrap /*, ...*/ ) { $msgSpecs = func_get_args(); diff --git a/includes/specials/SpecialBooksources.php b/includes/specials/SpecialBooksources.php index 54ccd6d857..8ee5467a31 100644 --- a/includes/specials/SpecialBooksources.php +++ b/includes/specials/SpecialBooksources.php @@ -35,7 +35,7 @@ class SpecialBookSources extends SpecialPage { $wgOut->addHTML( $this->makeForm() ); if( strlen( $this->isbn ) > 0 ) { if( !self::isValidISBN( $this->isbn ) ) { - $wgOut->wrapWikiMsg( '
$1
', 'booksources-invalid-isbn' ); + $wgOut->wrapWikiMsg( "
\n$1
", 'booksources-invalid-isbn' ); } $this->showList(); } diff --git a/includes/specials/SpecialConfirmemail.php b/includes/specials/SpecialConfirmemail.php index dd3cece203..372a574cef 100644 --- a/includes/specials/SpecialConfirmemail.php +++ b/includes/specials/SpecialConfirmemail.php @@ -71,7 +71,7 @@ class EmailConfirmation extends UnlistedSpecialPage { $wgOut->addWikiMsg( 'emailauthenticated', $time, $d, $t ); } if( $wgUser->isEmailConfirmationPending() ) { - $wgOut->wrapWikiMsg( "
$1
", 'confirmemail_pending' ); + $wgOut->wrapWikiMsg( "
\n$1
", 'confirmemail_pending' ); } $wgOut->addWikiMsg( 'confirmemail_text' ); $form = Xml::openElement( 'form', array( 'method' => 'post', 'action' => $this->getTitle()->getLocalUrl() ) ); diff --git a/includes/specials/SpecialPreferences.php b/includes/specials/SpecialPreferences.php index 6930440e76..4c8bbb09cd 100644 --- a/includes/specials/SpecialPreferences.php +++ b/includes/specials/SpecialPreferences.php @@ -36,7 +36,7 @@ class SpecialPreferences extends SpecialPage { } if ( $wgRequest->getCheck( 'eauth' ) ) { - $wgOut->wrapWikiMsg( "
$1
", + $wgOut->wrapWikiMsg( "
\n$1
", 'eauthentsent', $wgUser->getName() ); } diff --git a/includes/specials/SpecialRecentchangeslinked.php b/includes/specials/SpecialRecentchangeslinked.php index d84ffa32b4..49cef5b53a 100644 --- a/includes/specials/SpecialRecentchangeslinked.php +++ b/includes/specials/SpecialRecentchangeslinked.php @@ -52,7 +52,7 @@ class SpecialRecentchangeslinked extends SpecialRecentchanges { } $title = Title::newFromURL( $target ); if( !$title || $title->getInterwiki() != '' ){ - $wgOut->wrapWikiMsg( '
$1

', 'allpagesbadtitle' ); + $wgOut->wrapWikiMsg( "
\n$1

", 'allpagesbadtitle' ); return false; } $this->mTargetTitle = $title; diff --git a/includes/upload/UploadBase.php b/includes/upload/UploadBase.php index 105a421649..026758f45c 100644 --- a/includes/upload/UploadBase.php +++ b/includes/upload/UploadBase.php @@ -765,7 +765,7 @@ abstract class UploadBase { if ( !$wgAntivirusSetup[$wgAntivirus] ) { wfDebug( __METHOD__ . ": unknown virus scanner: $wgAntivirus\n" ); - $wgOut->wrapWikiMsg( '
$1
', array( 'virus-badscanner', $wgAntivirus ) ); + $wgOut->wrapWikiMsg( "
\n$1
", array( 'virus-badscanner', $wgAntivirus ) ); return wfMsg( 'virus-unknownscanner' ) . " $wgAntivirus"; } -- 2.20.1