(bug 19226) First line renders differently on many UI messages
authorPlatonides <platonides@users.mediawiki.org>
Thu, 14 Jan 2010 17:14:49 +0000 (17:14 +0000)
committerPlatonides <platonides@users.mediawiki.org>
Thu, 14 Jan 2010 17:14:49 +0000 (17:14 +0000)
Added newlines before $1 to wrapWikiMsgs of <div>s

Also fixes r61052 utf-8 screw-up on RELEASE-NOTES.

RELEASE-NOTES
includes/Article.php
includes/EditPage.php
includes/OutputPage.php
includes/specials/SpecialBooksources.php
includes/specials/SpecialConfirmemail.php
includes/specials/SpecialPreferences.php
includes/specials/SpecialRecentchangeslinked.php
includes/upload/UploadBase.php

index 5856d04..8606963 100644 (file)
@@ -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
index 7264b1d..b47a906 100644 (file)
@@ -1215,7 +1215,7 @@ class Article {
                        $id = User::idFromName( $rootPart );
                        $ip = User::isIP( $rootPart );
                        if ( $id == 0 && !$ip ) { # User does not exist
-                               $wgOut->wrapWikiMsg( '<div class="mw-userpage-userdoesnotexist error">$1</div>',
+                               $wgOut->wrapWikiMsg( '<div class="mw-userpage-userdoesnotexist error">\n$1</div>',
                                        array( 'userpage-userdoesnotexist-view', $rootPart ) );
                        }
                }
index caf3f88..bb325b8 100644 (file)
@@ -772,16 +772,16 @@ class EditPage {
                        $id = User::idFromName( $username );
                        $ip = User::isIP( $username );
                        if ( $id == 0 && !$ip ) {
-                               $wgOut->wrapWikiMsg( '<div class="mw-userpage-userdoesnotexist error">$1</div>',
+                               $wgOut->wrapWikiMsg( "<div class=\"mw-userpage-userdoesnotexist error\">\n$1</div>",
                                        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( '<div class="mw-newarticletext">$1</div>', 'newarticletext' );
+                               $wgOut->wrapWikiMsg( "<div class=\"mw-newarticletext\">\n$1</div>", 'newarticletext' );
                        } else {
-                               $wgOut->wrapWikiMsg( '<div class="mw-newarticletextanon">$1</div>', 'newarticletextanon' );
+                               $wgOut->wrapWikiMsg( "<div class=\"mw-newarticletextanon\">\n$1</div>", 'newarticletextanon' );
                        }
                }
                # Give a notice if the user is editing a deleted/moved page...
@@ -1426,15 +1426,15 @@ HTML
                        }
 
                        if ( $this->missingComment ) {
-                               $wgOut->wrapWikiMsg( '<div id="mw-missingcommenttext">$1</div>', 'missingcommenttext' );
+                               $wgOut->wrapWikiMsg( "<div id='mw-missingcommenttext'>\n$1</div>", 'missingcommenttext' );
                        }
 
                        if ( $this->missingSummary && $this->section != 'new' ) {
-                               $wgOut->wrapWikiMsg( '<div id="mw-missingsummary">$1</div>', 'missingsummary' );
+                               $wgOut->wrapWikiMsg( "<div id='mw-missingsummary'>\n$1</div>", 'missingsummary' );
                        }
 
                        if ( $this->missingSummary && $this->section == 'new' ) {
-                               $wgOut->wrapWikiMsg( '<div id="mw-missingcommentheader">$1</div>', 'missingcommentheader' );
+                               $wgOut->wrapWikiMsg( "<div id='mw-missingcommentheader'>\n$1</div>", 'missingcommentheader' );
                        }
 
                        if ( $this->hookError !== '' ) {
@@ -1464,7 +1464,7 @@ HTML
                if ( wfReadOnly() ) {
                        $wgOut->wrapWikiMsg( "<div id=\"mw-read-only-warning\">\n$1\n</div>", array( 'readonlywarning', wfReadOnlyReason() ) );
                } elseif ( $wgUser->isAnon() && $this->formtype != 'preview' ) {
-                       $wgOut->wrapWikiMsg( '<div id="mw-anon-edit-warning">$1</div>', 'anoneditwarning' );
+                       $wgOut->wrapWikiMsg( "<div id=\"mw-anon-edit-warning\">\n$1</div>", '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 = "<div class='mw-cascadeprotectedwarning'>$1\n";
+                       $notice = "<div class='mw-cascadeprotectedwarning'>\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( '<div class="mw-titleprotectedwarning">$1</div>', 'titleprotectedwarning' );
+                       $wgOut->wrapWikiMsg( "<div class=\"mw-titleprotectedwarning\">\n$1</div>", 'titleprotectedwarning' );
                }
 
                if ( $this->kblength === false ) {
index a2b9eae..6b2a97d 100644 (file)
@@ -1451,7 +1451,7 @@ class OutputPage {
                        // Wiki is read only
                        $this->setPageTitle( wfMsg( 'readonly' ) );
                        $reason = wfReadOnlyReason();
-                       $this->wrapWikiMsg( '<div class="mw-readonly-error">$1</div>', array( 'readonlytext', $reason ) );
+                       $this->wrapWikiMsg( '<div class="mw-readonly-error">\n$1</div>', array( 'readonlytext', $reason ) );
                }
 
                // Show source, if supplied
@@ -2045,11 +2045,13 @@ class OutputPage {
         *
         * For example:
         *
-        *    $wgOut->wrapWikiMsg( '<div class="error">$1</div>', 'some-error' );
+        *    $wgOut->wrapWikiMsg( "<div class='error'>\n$1</div>", 'some-error' );
         *
         * Is equivalent to:
         *
-        *    $wgOut->addWikiText( '<div class="error">' . wfMsgNoTrans( 'some-error' ) . '</div>' );
+        *    $wgOut->addWikiText( "<div class='error'>\n" . wfMsgNoTrans( 'some-error' ) . '</div>' );
+        *
+        * The newline after opening div is needed in some wikitext. See bug 19226.
         */
        public function wrapWikiMsg( $wrap /*, ...*/ ) {
                $msgSpecs = func_get_args();
index 54ccd6d..8ee5467 100644 (file)
@@ -35,7 +35,7 @@ class SpecialBookSources extends SpecialPage {
                $wgOut->addHTML( $this->makeForm() );
                if( strlen( $this->isbn ) > 0 ) {
                        if( !self::isValidISBN( $this->isbn ) ) {
-                               $wgOut->wrapWikiMsg( '<div class="error">$1</div>', 'booksources-invalid-isbn' );
+                               $wgOut->wrapWikiMsg( "<div class=\"error\">\n$1</div>", 'booksources-invalid-isbn' );
                        }
                        $this->showList();
                }
index dd3cece..372a574 100644 (file)
@@ -71,7 +71,7 @@ class EmailConfirmation extends UnlistedSpecialPage {
                                $wgOut->addWikiMsg( 'emailauthenticated', $time, $d, $t );
                        }
                        if( $wgUser->isEmailConfirmationPending() ) {
-                               $wgOut->wrapWikiMsg( "<div class=\"error mw-confirmemail-pending\">$1</div>", 'confirmemail_pending' );
+                               $wgOut->wrapWikiMsg( "<div class=\"error mw-confirmemail-pending\">\n$1</div>", 'confirmemail_pending' );
                        }
                        $wgOut->addWikiMsg( 'confirmemail_text' );
                        $form  = Xml::openElement( 'form', array( 'method' => 'post', 'action' => $this->getTitle()->getLocalUrl() ) );
index 6930440..4c8bbb0 100644 (file)
@@ -36,7 +36,7 @@ class SpecialPreferences extends SpecialPage {
                }
                
                if ( $wgRequest->getCheck( 'eauth' ) ) {
-                       $wgOut->wrapWikiMsg( "<div class='error' style='clear: both;'>$1</div>",
+                       $wgOut->wrapWikiMsg( "<div class='error' style='clear: both;'>\n$1</div>",
                                                                        'eauthentsent', $wgUser->getName() );
                }
 
index d84ffa3..49cef5b 100644 (file)
@@ -52,7 +52,7 @@ class SpecialRecentchangeslinked extends SpecialRecentchanges {
                }
                $title = Title::newFromURL( $target );
                if( !$title || $title->getInterwiki() != '' ){
-                       $wgOut->wrapWikiMsg( '<div class="errorbox">$1</div><br clear="both" />', 'allpagesbadtitle' );
+                       $wgOut->wrapWikiMsg( "<div class=\"errorbox\">\n$1</div><br style=\"clear: both\" />", 'allpagesbadtitle' );
                        return false;
                }
                $this->mTargetTitle = $title;
index 105a421..026758f 100644 (file)
@@ -765,7 +765,7 @@ abstract class UploadBase {
 
                if ( !$wgAntivirusSetup[$wgAntivirus] ) {
                        wfDebug( __METHOD__ . ": unknown virus scanner: $wgAntivirus\n" );
-                       $wgOut->wrapWikiMsg( '<div class="error">$1</div>', array( 'virus-badscanner', $wgAntivirus ) );
+                       $wgOut->wrapWikiMsg( "<div class=\"error\">\n$1</div>", array( 'virus-badscanner', $wgAntivirus ) );
                        return wfMsg( 'virus-unknownscanner' ) . " $wgAntivirus";
                }