Merge "Localisation updates from http://translatewiki.net."
authorRaimond Spekking <raimond.spekking@gmail.com>
Thu, 9 May 2013 20:48:29 +0000 (20:48 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Thu, 9 May 2013 20:48:29 +0000 (20:48 +0000)
15 files changed:
api.php
includes/Exception.php
includes/PHPVersionError.php
includes/api/ApiFormatBase.php
includes/templates/NoLocalSettings.php
maintenance/doMaintenance.php
maintenance/dumpBackup.php
maintenance/importImages.php
maintenance/importTextFile.php
maintenance/language/rebuildLanguage.php
maintenance/purgeOldText.inc
tests/RunSeleniumTests.php
tests/parser/parserTests.txt
tests/parserTests.php
tests/selenium/SeleniumServerManager.php

diff --git a/api.php b/api.php
index b9efe2c..9d7f648 100644 (file)
--- a/api.php
+++ b/api.php
@@ -54,8 +54,8 @@ if ( !$wgRequest->checkUrlExtension() ) {
 // Verify that the API has not been disabled
 if ( !$wgEnableAPI ) {
        header( $_SERVER['SERVER_PROTOCOL'] . ' 500 MediaWiki configuration Error', true, 500 );
-       echo( 'MediaWiki API is not enabled for this site. Add the following line to your LocalSettings.php'
-               . '<pre><b>$wgEnableAPI=true;</b></pre>' );
+       echo 'MediaWiki API is not enabled for this site. Add the following line to your LocalSettings.php'
+               . '<pre><b>$wgEnableAPI=true;</b></pre>';
        die( 1 );
 }
 
index c513ef7..dc1208a 100644 (file)
@@ -668,7 +668,7 @@ class MWExceptionHandler {
                if ( defined( 'STDERR' ) ) {
                        fwrite( STDERR, $message );
                } else {
-                       echo( $message );
+                       echo $message;
                }
        }
 
index e8ecf6d..c9321f0 100644 (file)
@@ -112,6 +112,6 @@ HTML;
                $finalOutput = ( $type == 'load.php' ) ? "/* $message */" : $message;
                header( "$protocol 500 MediaWiki configuration Error" );
        }
-       echo( "$finalOutput\n" );
+       echo "$finalOutput\n";
        die( 1 );
 }
index e8e6acf..b89fb3a 100644 (file)
@@ -170,12 +170,12 @@ abstract class ApiFormatBase extends ApiBase {
 ?>
 <br />
 <small>
-You are looking at the HTML representation of the <?php echo( $this->mFormat ); ?> format.<br />
+You are looking at the HTML representation of the <?php echo $this->mFormat; ?> format.<br />
 HTML is good for debugging, but is unsuitable for application use.<br />
 Specify the format parameter to change the output format.<br />
-To see the non HTML representation of the <?php echo( $this->mFormat ); ?> format, set format=<?php echo( strtolower( $this->mFormat ) ); ?>.<br />
+To see the non HTML representation of the <?php echo $this->mFormat; ?> format, set format=<?php echo strtolower( $this->mFormat ); ?>.<br />
 See the <a href='https://www.mediawiki.org/wiki/API'>complete documentation</a>, or
-<a href='<?php echo( $script ); ?>'>API help</a> for more information.
+<a href='<?php echo $script; ?>'>API help</a> for more information.
 </small>
 <pre style='white-space: pre-wrap;'>
 <?php
index b0ec8b5..8175458 100644 (file)
@@ -79,9 +79,9 @@ if ( !function_exists( 'session_name' ) ) {
                <p>
                <?php
                if ( $installerStarted ) {
-                       echo( "Please <a href=\"" . htmlspecialchars( $path ) . "mw-config/index." . htmlspecialchars( $ext ) . "\"> complete the installation</a> and download LocalSettings.php." );
+                       echo "Please <a href=\"" . htmlspecialchars( $path ) . "mw-config/index." . htmlspecialchars( $ext ) . "\"> complete the installation</a> and download LocalSettings.php.";
                } else {
-                       echo( "Please <a href=\"" . htmlspecialchars( $path ) . "mw-config/index." . htmlspecialchars( $ext ) . "\"> set up the wiki</a> first." );
+                       echo "Please <a href=\"" . htmlspecialchars( $path ) . "mw-config/index." . htmlspecialchars( $ext ) . "\"> set up the wiki</a> first.";
                }
                ?>
                </p>
index 8576b8a..f471d50 100644 (file)
@@ -123,6 +123,6 @@ try {
        $factory->commitMasterChanges();
        $factory->shutdown();
 } catch ( MWException $mwe ) {
-       echo( $mwe->getText() );
+       echo $mwe->getText();
        exit( 1 );
 }
index bd7e464..9254adc 100644 (file)
@@ -44,7 +44,7 @@ if ( isset( $options['pagelist'] ) ) {
        $pages = file( $options['pagelist'] );
        chdir( $olddir );
        if ( $pages === false ) {
-               echo( "Unable to open file {$options['pagelist']}\n" );
+               echo "Unable to open file {$options['pagelist']}\n";
                die( 1 );
        }
        $pages = array_map( 'trim', $pages );
index 7b340cc..2b5d690 100644 (file)
@@ -39,7 +39,7 @@ require_once( __DIR__ . '/commandLine.inc' );
 require_once( __DIR__ . '/importImages.inc' );
 $processed = $added = $ignored = $skipped = $overwritten = $failed = 0;
 
-echo( "Import Images\n\n" );
+echo "Import Images\n\n";
 
 # Need a path
 if ( count( $args ) == 0 ) {
@@ -132,7 +132,7 @@ if ( $count > 0 ) {
                # Validate a title
                $title = Title::makeTitleSafe( NS_FILE, $base );
                if ( !is_object( $title ) ) {
-                       echo( "{$base} could not be imported; a valid title cannot be produced\n" );
+                       echo "{$base} could not be imported; a valid title cannot be produced\n";
                        continue;
                }
 
@@ -148,7 +148,7 @@ if ( $count > 0 ) {
                if ( $checkUserBlock && ( ( $processed % $checkUserBlock ) == 0 ) ) {
                        $user->clearInstanceCache( 'name' ); // reload from DB!
                        if ( $user->isBlocked() ) {
-                               echo( $user->getName() . " was blocked! Aborting.\n" );
+                               echo $user->getName() . " was blocked! Aborting.\n";
                                break;
                        }
                }
@@ -157,10 +157,10 @@ if ( $count > 0 ) {
                $image = wfLocalFile( $title );
                if ( $image->exists() ) {
                        if ( isset( $options['overwrite'] ) ) {
-                               echo( "{$base} exists, overwriting..." );
+                               echo "{$base} exists, overwriting...";
                                $svar = 'overwritten';
                        } else {
-                               echo( "{$base} exists, skipping\n" );
+                               echo "{$base} exists, skipping\n";
                                $skipped++;
                                continue;
                        }
@@ -172,13 +172,13 @@ if ( $count > 0 ) {
                                $dupes = $repo->findBySha1( $sha1 );
 
                                if ( $dupes ) {
-                                       echo( "{$base} already exists as " . $dupes[0]->getName() . ", skipping\n" );
+                                       echo "{$base} already exists as " . $dupes[0]->getName() . ", skipping\n";
                                        $skipped++;
                                        continue;
                                }
                        }
 
-                       echo( "Importing {$base}..." );
+                       echo "Importing {$base}...";
                        $svar = 'added';
                }
 
@@ -199,7 +199,7 @@ if ( $count > 0 ) {
                                $wgUser = User::newFromName( $real_user );
                                if ( $wgUser === false ) {
                                        # user does not exist in target wiki
-                                       echo ( "failed: user '$real_user' does not exist in target wiki." );
+                                       echo "failed: user '$real_user' does not exist in target wiki.";
                                        continue;
                                }
                        }
@@ -210,11 +210,11 @@ if ( $count > 0 ) {
                        if ( $commentExt ) {
                                $f = findAuxFile( $file, $commentExt );
                                if ( !$f ) {
-                                       echo( " No comment file with extension {$commentExt} found for {$file}, using default comment. " );
+                                       echo " No comment file with extension {$commentExt} found for {$file}, using default comment. ";
                                } else {
                                        $commentText = file_get_contents( $f );
                                        if ( !$commentText ) {
-                                               echo( " Failed to load comment file {$f}, using default comment. " );
+                                               echo " Failed to load comment file {$f}, using default comment. ";
                                        }
                                }
                        }
@@ -226,7 +226,7 @@ if ( $count > 0 ) {
 
                # Import the file
                if ( isset( $options['dry'] ) ) {
-                       echo( " publishing {$file} by '" . $wgUser->getName() . "', comment '$commentText'... " );
+                       echo " publishing {$file} by '" . $wgUser->getName() . "', comment '$commentText'... ";
                } else {
                        $props = FSFile::getPropsFromPath( $file );
                        $flags = 0;
@@ -239,9 +239,9 @@ if ( $count > 0 ) {
                        }
                        $archive = $image->publish( $file, $flags, $options );
                        if ( !$archive->isGood() ) {
-                               echo( "failed. (" .
+                               echo "failed. (" .
                                        $archive->getWikiText() .
-                                       ")\n" );
+                                       ")\n";
                                $failed++;
                                continue;
                        }
@@ -253,10 +253,10 @@ if ( $count > 0 ) {
                }
 
                if ( isset( $options['dry'] ) ) {
-                       echo( "done.\n" );
+                       echo "done.\n";
                } elseif ( $image->recordUpload2( $archive->value, $summary, $commentText, $props, $timestamp ) ) {
                        # We're done!
-                       echo( "done.\n" );
+                       echo "done.\n";
 
                        $doProtect = false;
 
@@ -279,7 +279,7 @@ if ( $count > 0 ) {
                                        sleep( 2.0 ); # Why this sleep?
                                        wfWaitForSlaves();
 
-                                       echo( "\nSetting image restrictions ... " );
+                                       echo "\nSetting image restrictions ... ";
 
                                        $cascade = false;
                                        $restrictions = array();
@@ -289,11 +289,11 @@ if ( $count > 0 ) {
 
                                        $page = WikiPage::factory( $title );
                                        $status = $page->doUpdateRestrictions( $restrictions, array(), $cascade, '', $user );
-                                       echo( ( $status->isOK() ? 'done' : 'failed' ) . "\n" );
+                                       echo ( $status->isOK() ? 'done' : 'failed' ) . "\n";
                        }
 
                } else {
-                       echo( "failed. (at recordUpload stage)\n" );
+                       echo "failed. (at recordUpload stage)\n";
                        $svar = 'failed';
                }
 
@@ -310,24 +310,24 @@ if ( $count > 0 ) {
        }
 
        # Print out some statistics
-       echo( "\n" );
+       echo "\n";
        foreach ( array( 'count' => 'Found', 'limit' => 'Limit', 'ignored' => 'Ignored',
                'added' => 'Added', 'skipped' => 'Skipped', 'overwritten' => 'Overwritten',
                'failed' => 'Failed' ) as $var => $desc ) {
                if ( $$var > 0 ) {
-                       echo( "{$desc}: {$$var}\n" );
+                       echo "{$desc}: {$$var}\n";
                }
        }
 
 } else {
-       echo( "No suitable files could be found for import.\n" );
+       echo "No suitable files could be found for import.\n";
 }
 
 exit( 0 );
 
 function showUsage( $reason = false ) {
        if ( $reason ) {
-               echo( $reason . "\n" );
+               echo $reason . "\n";
        }
 
        echo <<<TEXT
index c04989c..0c4f98c 100644 (file)
 $options = array( 'help', 'nooverwrite', 'norc' );
 $optionsWithArgs = array( 'title', 'user', 'comment' );
 require_once( __DIR__ . '/commandLine.inc' );
-echo( "Import Text File\n\n" );
+echo "Import Text File\n\n";
 
 if ( count( $args ) < 1 || isset( $options['help'] ) ) {
        showHelp();
 } else {
 
        $filename = $args[0];
-       echo( "Using {$filename}..." );
+       echo "Using {$filename}...";
        if ( is_file( $filename ) ) {
 
                $title = isset( $options['title'] ) ? $options['title'] : titleFromFilename( $filename );
@@ -40,7 +40,7 @@ if ( count( $args ) < 1 || isset( $options['help'] ) ) {
 
                if ( is_object( $title ) ) {
 
-                       echo( "\nUsing title '" . $title->getPrefixedText() . "'..." );
+                       echo "\nUsing title '" . $title->getPrefixedText() . "'...";
                        if ( !$title->exists() || !isset( $options['nooverwrite'] ) ) {
 
                                $text = file_get_contents( $filename );
@@ -49,31 +49,31 @@ if ( count( $args ) < 1 || isset( $options['help'] ) ) {
 
                                if ( is_object( $user ) ) {
 
-                                       echo( "\nUsing username '" . $user->getName() . "'..." );
+                                       echo "\nUsing username '" . $user->getName() . "'...";
                                        $wgUser =& $user;
                                        $comment = isset( $options['comment'] ) ? $options['comment'] : 'Importing text file';
                                        $flags = 0 | ( isset( $options['norc'] ) ? EDIT_SUPPRESS_RC : 0 );
 
-                                       echo( "\nPerforming edit..." );
+                                       echo "\nPerforming edit...";
                                        $page = WikiPage::factory( $title );
                                        $content = ContentHandler::makeContent( $text, $title );
                                        $page->doEditContent( $content, $comment, $flags, false, $user );
-                                       echo( "done.\n" );
+                                       echo "done.\n";
 
                                } else {
-                                       echo( "invalid username.\n" );
+                                       echo "invalid username.\n";
                                }
 
                        } else {
-                               echo( "page exists.\n" );
+                               echo "page exists.\n";
                        }
 
                } else {
-                       echo( "invalid title.\n" );
+                       echo "invalid title.\n";
                }
 
        } else {
-               echo( "does not exist.\n" );
+               echo "does not exist.\n";
        }
 
 }
index e3fd01a..02c41d2 100644 (file)
@@ -58,11 +58,11 @@ function removeDupes( $oldMsgArray, $dupeMsgSource ) {
        if ( file_exists( $dupeMsgSource ) ) {
                include( $dupeMsgSource );
                if ( !isset( $dupeMessages ) ) {
-                       echo( "There are no duplicated messages in the source file provided." );
+                       echo "There are no duplicated messages in the source file provided.";
                        exit( 1 );
                }
        } else {
-               echo ( "The specified file $dupeMsgSource cannot be found." );
+               echo "The specified file $dupeMsgSource cannot be found.";
                exit( 1 );
        }
        $newMsgArray = $oldMsgArray;
index 111c786..db961d8 100644 (file)
@@ -34,42 +34,42 @@ function PurgeRedundantText( $delete = false ) {
        $tbl_txt = $dbw->tableName( 'text' );
 
        # Get "active" text records from the revisions table
-       echo( "Searching for active text records in revisions table..." );
+       echo "Searching for active text records in revisions table...";
        $res = $dbw->query( "SELECT DISTINCT rev_text_id FROM $tbl_rev" );
        foreach ( $res as $row ) {
                $cur[] = $row->rev_text_id;
        }
-       echo( "done.\n" );
+       echo "done.\n";
 
        # Get "active" text records from the archive table
-       echo( "Searching for active text records in archive table..." );
+       echo "Searching for active text records in archive table...";
        $res = $dbw->query( "SELECT DISTINCT ar_text_id FROM $tbl_arc" );
        $cur = array();
        foreach ( $res as $row ) {
                $cur[] = $row->ar_text_id;
        }
-       echo( "done.\n" );
+       echo "done.\n";
 
        # Get the IDs of all text records not in these sets
-       echo( "Searching for inactive text records..." );
+       echo "Searching for inactive text records...";
        $set = implode( ', ', $cur );
        $res = $dbw->query( "SELECT old_id FROM $tbl_txt WHERE old_id NOT IN ( $set )" );
        $old = array();
        foreach ( $res as $row ) {
                $old[] = $row->old_id;
        }
-       echo( "done.\n" );
+       echo "done.\n";
 
        # Inform the user of what we're going to do
        $count = count( $old );
-       echo( "$count inactive items found.\n" );
+       echo "$count inactive items found.\n";
 
        # Delete as appropriate
        if ( $delete && $count ) {
-               echo( "Deleting..." );
+               echo "Deleting...";
                $set = implode( ', ', $old );
                $dbw->query( "DELETE FROM $tbl_txt WHERE old_id IN ( $set )" );
-               echo( "done.\n" );
+               echo "done.\n";
        }
 
        # Done
index 8896a90..0136a2a 100644 (file)
@@ -99,8 +99,8 @@ class SeleniumTester extends Maintenance {
                                die( "Unable to start the Selenium Server - " .
                                        "terminating RunSeleniumTests\n" );
                        case 'running':
-                               echo "Warning: The Selenium Server is " .
-                                       "already running\n" );
+                               echo "Warning: The Selenium Server is " .
+                                       "already running\n";
                                break;
                }
 
@@ -109,16 +109,16 @@ class SeleniumTester extends Maintenance {
 
        protected function stopServer() {
                if ( !isset( $this->serverManager ) ) {
-                       echo "Warning: Request to stop Selenium Server, but it was " .
+                       echo "Warning: Request to stop Selenium Server, but it was " .
                                "not stared by RunSeleniumTests\n" .
                                "RunSeleniumTests cannot stop a Selenium Server it " .
-                               "did not start\n" );
+                               "did not start\n";
                } else {
                        switch ( $this->serverManager->stop() ) {
                                case 'stopped':
                                        break;
                                case 'failed':
-                                       echo ( "unable to stop the Selenium Server\n" );
+                                       echo "unable to stop the Selenium Server\n";
                        }
                }
                return;
index 71b9e6b..24dbc97 100644 (file)
@@ -2376,8 +2376,25 @@ parsoid
 *#*#;*;;foo :bar
 *#*#;boo :baz
 !! result
-<ul><li><ol><li><ul><li><ol><li><dl><dt><ul><li><dl><dt><dl><dt>foo&nbsp;</dt><dd>bar
-</dd></dl></dt></dl></li></ul></dt><dt>boo&nbsp;</dt><dd>baz</dd></dl></li></ol></li></ul></li></ol></li></ul>
+<ul>
+<li>
+<ol>
+<li>
+<ul>
+<li>
+<ol>
+<li>
+<dl>
+<dt>
+<ul>
+<li>
+<dl>
+<dt>
+<dl>
+<dt>foo<span typeof="mw:Placeholder" data-parsoid='{"src":" "}'>&nbsp;</span></dt>
+<dd data-parsoid='{"stx":"row"}'>bar</dd></dl></dt></dl></li></ul></dt>
+<dt>boo<span typeof="mw:Placeholder" data-parsoid='{"src":" "}'>&nbsp;</span></dt>
+<dd data-parsoid='{"stx":"row"}'>baz</dd></dl></li></ol></li></ul></li></ol></li></ul>
 !! end
 
 
@@ -2406,7 +2423,23 @@ parsoid
 !! input
 *#;*::;; foo : bar (who uses this?)
 !! result
-<ul><li><ol><li><dl><dt><ul><li><dl><dd><dl><dd><dl><dt><dl><dt> foo&nbsp;</dt><dd> bar (who uses this?)</dd></dl></dt></dl></dd></dl></dd></dl></li></ul></dt></dl></li></ol></li></ul>
+<ul>
+<li>
+<ol>
+<li>
+<dl>
+<dt>
+<ul>
+<li>
+<dl>
+<dd>
+<dl>
+<dd>
+<dl>
+<dt>
+<dl>
+<dt> foo<span typeof="mw:Placeholder" data-parsoid='{"src":" "}'>&nbsp;</span></dt>
+<dd data-parsoid='{"stx":"row"}'> bar (who uses this?)</dd></dl></dt></dl></dd></dl></dd></dl></li></ul></dt></dl></li></ol></li></ul>
 !! end
 
 ###
@@ -6177,13 +6210,13 @@ bar <div>baz</div>
 !!test
 Templates: P-wrapping: 1d. Template preceded by comment-only line
 !!options
-parsoid
+parsoid=wt2html,wt2wt
 !!input
 <!-- foo -->
 {{echo|Bar}}
 !!result
 <!-- foo -->
-<p>Bar
+<p typeof="mw:Object/Template">Bar
 </p>
 !!end
 
@@ -6571,24 +6604,24 @@ Templates: Ugly nesting: 1. Quotes opened/closed across templates (echo)
 Templates: Ugly nesting: 2. Quotes opened/closed across templates (echo_with_span)
 (PHP parser generates misnested html)
 !! options
-parsoid
+parsoid=wt2html,wt2wt
 !!input
 {{echo_with_span|''a}}{{echo_with_span|b''c''d}}{{echo_with_span|''e}}
 !!result
-<p><span><i>a</i></span><i><span>b</span></i><span>c</span><i>d</i><span>e</span></p>
+<p><span typeof="mw:Object/Template"><i>a</i></span><i typeof="mw:Object/Template"><span>b</span></i><span>c</span><i>d</i><span>e</span></p>
 !!end
 
 !!test
 Templates: Ugly nesting: 3. Quotes opened/closed across templates (echo_with_div)
 (PHP parser generates misnested html)
 !! options
-parsoid
+parsoid=wt2html,wt2wt
 !!input
 {{echo_with_div|''a}}{{echo_with_div|b''c''d}}{{echo_with_div|''e}}
 !!result
-<div><i>a</i></div>
-<div><i>b</i>c<i>d</i></div>
-<div>e</div>
+<div typeof="mw:Object/Template"><i>a</i></div>
+<div typeof="mw:Object/Template"><i>b</i>c<i>d</i></div>
+<div typeof="mw:Object/Template">e</div>
 !!end
 
 !!test
@@ -6611,10 +6644,10 @@ parsoid
 |bar
 |}
 !!result
-<table  about="#mwt1" typeof="mw:Object/Template ">
-<tbody><tr><td>foo</td></tr></tbody></table><span about="#mwt1">
-bar</span><span about="#mwt1">
-</span>
+<table typeof="mw:Object/Template">
+<tbody>
+<tr>
+<td>foo</td></tr></tbody></table><span>bar</span>
 !!end
 
 !!test
@@ -6822,10 +6855,13 @@ wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
 !!end
 
+# Leading @ in this template definition works around a limitation
+# in parsoid's parserTests which otherwise strips the <span> from the
+# result (confusing it for a template wrapper)
 !! article
 Template:dangerous
 !!text
-<span onmouseover="alert('crap')">Oh no</span>
+@<span onmouseover="alert('crap')">Oh no</span>
 !!endarticle
 
 !!test
@@ -6833,7 +6869,7 @@ Template:dangerous
 !! input
 {{Template:dangerous}}
 !! result
-<p><span>Oh no</span>
+<p>@<span>Oh no</span>
 </p>
 !! end
 
@@ -13636,16 +13672,18 @@ HttP://MediaWiki.Org/
 !!test
 1. SOL-sensitive wikitext tokens as template-args
 !!options
-parsoid
+parsoid=wt2html,wt2wt
 !!input
 {{echo|*a}}
 {{echo|#a}}
 {{echo|:a}}
 !!result
-<p>*a
-#a
-:a
-</p>
+<span about="#mwt1" typeof="mw:Object/Template">
+</span><ul about="#mwt1"><li>a</li></ul>
+<span about="#mwt2" typeof="mw:Object/Template">
+</span><ol about="#mwt2"><li>a</li></ol>
+<span about="#mwt3" typeof="mw:Object/Template">
+</span><dl about="#mwt3"><dd>a</dd></dl>
 !!end
 
 #### The following section of tests are primarily to test
@@ -13681,11 +13719,13 @@ parsoid
 
 =foo''a''<nowiki>=</nowiki>
 !! result
-<p>=foo=
-</p><p> =foo= 
-</p><p><!--cmt-->=foo=
-</p><p>=foo<i>a</i>=
-</p>
+<p><span typeof="mw:Nowiki">=foo=</span></p>
+
+<p><span typeof="mw:Nowiki"> =foo= </span>
+<!--cmt-->
+<span typeof="mw:Nowiki">=foo=</span></p>
+
+<p>=foo<i>a</i><span typeof="mw:Nowiki">=</span></p>
 !!end
 
 !! test
@@ -13700,12 +13740,12 @@ parsoid
 =====<nowiki>=foo=</nowiki>=====
 ======<nowiki>=foo=</nowiki>======
 !! result
-<h1>=foo=</h1>
-<h2>=foo=</h2>
-<h3>=foo=</h3>
-<h4>=foo=</h4>
-<h5>=foo=</h5>
-<h6>=foo=</h6>
+<h1><span typeof="mw:Nowiki">=foo=</span></h1>
+<h2><span typeof="mw:Nowiki">=foo=</span></h2>
+<h3><span typeof="mw:Nowiki">=foo=</span></h3>
+<h4><span typeof="mw:Nowiki">=foo=</span></h4>
+<h5><span typeof="mw:Nowiki">=foo=</span></h5>
+<h6><span typeof="mw:Nowiki">=foo=</span></h6>
 !!end
 
 !! test
@@ -13732,7 +13772,7 @@ parsoid
 !! input
 =='''bold'''<nowiki>foo=</nowiki>=
 !! result
-<h1>=<b>bold</b>foo=</h1>
+<h1>=<b>bold</b><span typeof="mw:Nowiki">foo=</span></h1>
 !!end
 
 !! test
@@ -13756,8 +13796,7 @@ parsoid
 <h2>=foo</h2>
 <h2>foo=</h2>
 <h1><i>=</i>foo=</h1>
-<h1>=</h1>
-
+<h1><span typeof="mw:Nowiki">=</span></h1>
 !!end
 
 !! test
@@ -13803,9 +13842,8 @@ parsoid
 <!--cmt--><nowiki>=h1=</nowiki>
 <!--cmt--><nowiki> =h1= </nowiki>
 !! result
-<p><!--cmt-->=h1=
-<!--cmt--> =h1= 
-</p>
+<p><!--cmt--><span typeof="mw:Nowiki">=h1=</span>
+<!--cmt--><span typeof="mw:Nowiki"> =h1= </span></p>
 !!end
 
 #### --------------- Lists ---------------
@@ -13922,7 +13960,7 @@ parsoid
 </li></ul>
 <ul><li><i>foo</i>*bar
 </li></ul>
-<ul><li><a href="Foo" rel="mw:WikiLink">Foo</a>: bar
+<ul><li><a rel="mw:WikiLink" href="Foo">Foo</a>: bar
 </li></ul>
 !!end
 
@@ -13963,8 +14001,7 @@ parsoid
 !! input
 <!--cmt--><nowiki>*foo</nowiki>
 !! result
-<p><!--cmt-->*foo
-</p>
+<p><!--cmt--><span typeof="mw:Nowiki">*foo</span></p>
 !!end
 
 !! test
@@ -13991,7 +14028,7 @@ parsoid
 ----=foo=
 ----*foo
 !! result
-<hr>----
+<hr><span typeof="mw:Nowiki">----</span>
 <hr>=foo=
 <hr>*foo
 !! end
@@ -14062,10 +14099,8 @@ parsoid
 |<nowiki>foo|bar</nowiki>
 |}
 !! result
-<table><tbody>
-<tr><td>foo|bar
-</td></tr></tbody></table>
-
+<table><tbody><tr>
+<td><span typeof="mw:Nowiki">foo|bar</span></td></tr></tbody></table>
 !! end
 
 !! test
@@ -14078,11 +14113,9 @@ parsoid
 |''it''<nowiki>foo||bar</nowiki>
 |}
 !! result
-<table><tbody>
-<tr><td>foo||bar
-</td><td><i>it</i>foo||bar
-</td></tr></tbody></table>
-
+<table><tbody><tr>
+<td><span typeof="mw:Nowiki">foo||bar</span></td>
+<td><i>it</i><span typeof="mw:Nowiki">foo||bar</span></td></tr></tbody></table>
 !! end
 
 !! test
@@ -14094,8 +14127,7 @@ parsoid
 |foo!!bar
 |}
 !! result
-<table><tbody>
-<tr><td>foo!!bar
+<table><tbody><tr><td>foo!!bar
 </td></tr></tbody></table>
 
 !! end
@@ -14109,8 +14141,7 @@ parsoid
 !foo!bar
 |}
 !! result
-<table><tbody>
-<tr><th>foo!bar
+<table><tbody><tr><th>foo!bar
 </th></tr></tbody></table>
 
 !! end
@@ -14124,10 +14155,9 @@ parsoid
 !<nowiki>foo!!bar</nowiki>
 |}
 !! result
-<table><tbody>
-<tr><th>foo!!bar
-</th></tr></tbody></table>
-
+<table>
+<tbody><tr><th><span typeof="mw:Nowiki">foo!!bar</span></th></tr>
+</tbody></table>
 !! end
 
 !! test
@@ -14139,10 +14169,8 @@ parsoid
 !<nowiki>foo||bar</nowiki>
 |}
 !! result
-<table><tbody>
-<tr><th>foo||bar
-</th></tr></tbody></table>
-
+<table><tbody><tr>
+<th><span typeof="mw:Nowiki">foo||bar</span></th></tr></tbody></table>
 !! end
 
 !! test
@@ -14159,8 +14187,8 @@ parsoid
 !! result
 <table><tbody>
 <tr><th>-bar</th></tr>
-<tr><td>-bar</td></tr>
-</tbody></table>
+<tr>
+<td><span typeof="mw:Nowiki">-bar</span></td></tr></tbody></table>
 !! end
 
 !! test
@@ -14177,8 +14205,8 @@ parsoid
 !! result
 <table><tbody>
 <tr><th>+bar</th></tr>
-<tr><td>+bar</td></tr>
-</tbody></table>
+<tr>
+<td><span typeof="mw:Nowiki">+bar</span></td></tr></tbody></table>
 !! end
 
 !! test
@@ -14739,7 +14767,7 @@ Indented table with an empty td
 Empty TR followed by a template-generated TR
 (Parsoid-specific since PHP parser doesn't handle this mixed tbl-wikitext)
 !!options
-parsoid
+parsoid=wt2html,wt2wt
 !!input
 {|
 |-
@@ -14748,9 +14776,8 @@ parsoid
 !!result
 <table>
 <tbody>
-<tr>
-</tr>
-<tr>
+<tr></tr>
+<tr typeof="mw:Object/Template">
 <td>foo</td></tr></tbody></table>
 !!end
 
index 2e5cd53..c04c159 100644 (file)
@@ -84,7 +84,7 @@ if ( isset( $options['file'] ) ) {
 
 # Print out software version to assist with locating regressions
 $version = SpecialVersion::getVersion();
-echo( "This is MediaWiki version {$version}.\n\n" );
+echo "This is MediaWiki version {$version}.\n\n";
 
 if ( isset( $options['fuzz'] ) ) {
        $tester->fuzzTest( $files );
index 9efa509..1a1ee00 100644 (file)
@@ -214,7 +214,7 @@ class SeleniumServerManager {
                                        }
                                }
                                wfRestoreWarnings();
-                               echo ( "Starting Selenium server timed out.\n" );
+                               echo "Starting Selenium server timed out.\n";
                                return 'failed';
                        } else {
                                // server already running.