<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[19760] trunk: Introduce wp_load_translations_early(), which can be used before the locale is properly loaded in order to translate early error strings.</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg > ul, #logmsg > ol { margin-left: 0; margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://core.trac.wordpress.org/changeset/19760">19760</a></dd>
<dt>Author</dt> <dd>nacin</dd>
<dt>Date</dt> <dd>2012-01-26 20:34:27 +0000 (Thu, 26 Jan 2012)</dd>
</dl>
<h3>Log Message</h3>
<pre>Introduce wp_load_translations_early(), which can be used before the locale is properly loaded in order to translate early error strings. Internationalize setup-config.php -- translators no longer have a reason to modify this file. fixes <a href="http://core.trac.wordpress.org/ticket/18180">#18180</a>.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkwpadminsetupconfigphp">trunk/wp-admin/setup-config.php</a></li>
<li><a href="#trunkwpincludesfunctionsphp">trunk/wp-includes/functions.php</a></li>
<li><a href="#trunkwpincludesloadphp">trunk/wp-includes/load.php</a></li>
<li><a href="#trunkwpincludeslocalephp">trunk/wp-includes/locale.php</a></li>
<li><a href="#trunkwpincludesmsloadphp">trunk/wp-includes/ms-load.php</a></li>
<li><a href="#trunkwpincludesmssettingsphp">trunk/wp-includes/ms-settings.php</a></li>
<li><a href="#trunkwpincludeswpdbphp">trunk/wp-includes/wp-db.php</a></li>
<li><a href="#trunkwploadphp">trunk/wp-load.php</a></li>
<li><a href="#trunkwpsettingsphp">trunk/wp-settings.php</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkwpadminsetupconfigphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/setup-config.php (19759 => 19760)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/setup-config.php        2012-01-26 09:21:44 UTC (rev 19759)
+++ trunk/wp-admin/setup-config.php        2012-01-26 20:34:27 UTC (rev 19760)
</span><span class="lines">@@ -41,31 +41,31 @@
</span><span class="cx"> define('WP_DEBUG', false);
</span><span class="cx"> /**#@-*/
</span><span class="cx">
</span><del>-require_once(ABSPATH . WPINC . '/load.php');
-require_once(ABSPATH . WPINC . '/version.php');
</del><ins>+require(ABSPATH . WPINC . '/load.php');
+require(ABSPATH . WPINC . '/version.php');
+
+// Also loads functions.php, plugin.php, l10n.php, pomo/mo.php (all required by setup-config.php)
+wp_load_translations_early();
+
</ins><span class="cx"> wp_check_php_mysql_versions();
</span><span class="cx">
</span><span class="cx"> require_once(ABSPATH . WPINC . '/compat.php');
</span><del>-require_once(ABSPATH . WPINC . '/functions.php');
</del><span class="cx"> require_once(ABSPATH . WPINC . '/class-wp-error.php');
</span><span class="cx">
</span><del>-if (!file_exists(ABSPATH . 'wp-config-sample.php'))
-        wp_die('Sorry, I need a wp-config-sample.php file to work from. Please re-upload this file from your WordPress installation.');
</del><ins>+if ( ! file_exists( ABSPATH . 'wp-config-sample.php' ) )
+        wp_die( __( 'Sorry, I need a wp-config-sample.php file to work from. Please re-upload this file from your WordPress installation.' ) );
</ins><span class="cx">
</span><span class="cx"> $config_file = file(ABSPATH . 'wp-config-sample.php');
</span><span class="cx">
</span><span class="cx"> // Check if wp-config.php has been created
</span><del>-if (file_exists(ABSPATH . 'wp-config.php'))
-        wp_die("<p>The file 'wp-config.php' already exists. If you need to reset any of the configuration items in this file, please delete it first. You may try <a href='install.php'>installing now</a>.</p>");
</del><ins>+if ( file_exists( ABSPATH . 'wp-config.php' ) )
+        wp_die( '<p>' . sprintf( __( "The file 'wp-config.php' already exists. If you need to reset any of the configuration items in this file, please delete it first. You may try <a href='%s'>installing now</a>." ), 'install.php' ) . '</p>' );
</ins><span class="cx">
</span><span class="cx"> // Check if wp-config.php exists above the root directory but is not part of another install
</span><del>-if (file_exists(ABSPATH . '../wp-config.php') && ! file_exists(ABSPATH . '../wp-settings.php'))
-        wp_die("<p>The file 'wp-config.php' already exists one level above your WordPress installation. If you need to reset any of the configuration items in this file, please delete it first. You may try <a href='install.php'>installing now</a>.</p>");
</del><ins>+if ( file_exists(ABSPATH . '../wp-config.php' ) && ! file_exists( ABSPATH . '../wp-settings.php' ) )
+        wp_die( '<p>' . sprintf( __( "The file 'wp-config.php' already exists one level above your WordPress installation. If you need to reset any of the configuration items in this file, please delete it first. You may try <a href='install.php'>installing now</a>."), 'install.php' ) . '</p>' );
</ins><span class="cx">
</span><del>-if (isset($_GET['step']))
-        $step = $_GET['step'];
-else
-        $step = 0;
</del><ins>+$step = isset( $_GET['step'] ) ? (int) $_GET['step'] : 0;
</ins><span class="cx">
</span><span class="cx"> /**
</span><span class="cx"> * Display setup wp-config.php file header.
</span><span class="lines">@@ -82,7 +82,7 @@
</span><span class="cx"> <html xmlns="http://www.w3.org/1999/xhtml">
</span><span class="cx"> <head>
</span><span class="cx"> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
</span><del>-<title>WordPress &rsaquo; Setup Configuration File</title>
</del><ins>+<title><?php _e( 'WordPress &rsaquo; Setup Configuration File' ); ?></title>
</ins><span class="cx"> <link rel="stylesheet" href="css/install.css" type="text/css" />
</span><span class="cx">
</span><span class="cx"> </head>
</span><span class="lines">@@ -96,18 +96,18 @@
</span><span class="cx">                 display_header();
</span><span class="cx"> ?>
</span><span class="cx">
</span><del>-<p>Welcome to WordPress. Before getting started, we need some information on the database. You will need to know the following items before proceeding.</p>
</del><ins>+<p><?php _e( 'Welcome to WordPress. Before getting started, we need some information on the database. You will need to know the following items before proceeding.' ) ?></p>
</ins><span class="cx"> <ol>
</span><del>-        <li>Database name</li>
-        <li>Database username</li>
-        <li>Database password</li>
-        <li>Database host</li>
-        <li>Table prefix (if you want to run more than one WordPress in a single database) </li>
</del><ins>+        <li><?php _e( 'Database name' ); ?></li>
+        <li><?php _e( 'Database username' ); ?></li>
+        <li><?php _e( 'Database password' ); ?></li>
+        <li><?php _e( 'Database host' ); ?></li>
+        <li><?php _e( 'Table prefix (if you want to run more than one WordPress in a single database)' ); ?></li>
</ins><span class="cx"> </ol>
</span><del>-<p><strong>If for any reason this automatic file creation doesn't work, don't worry. All this does is fill in the database information to a configuration file. You may also simply open <code>wp-config-sample.php</code> in a text editor, fill in your information, and save it as <code>wp-config.php</code>. </strong></p>
-<p>In all likelihood, these items were supplied to you by your Web Host. If you do not have this information, then you will need to contact them before you can continue. If you&#8217;re all ready&hellip;</p>
</del><ins>+<p><strong><?php _e( "If for any reason this automatic file creation doesn't work, don't worry. All this does is fill in the database information to a configuration file. You may also simply open <code>wp-config-sample.php</code> in a text editor, fill in your information, and save it as <code>wp-config.php</code>. </strong></p>
+<p>In all likelihood, these items were supplied to you by your Web Host. If you do not have this information, then you will need to contact them before you can continue. If you&#8217;re all ready&hellip;" ); ?></p>
</ins><span class="cx">
</span><del>-<p class="step"><a href="setup-config.php?step=1<?php if ( isset( $_GET['noapi'] ) ) echo '&amp;noapi'; ?>" class="button">Let&#8217;s go!</a></p>
</del><ins>+<p class="step"><a href="setup-config.php?step=1<?php if ( isset( $_GET['noapi'] ) ) echo '&amp;noapi'; ?>" class="button"><?php _e( 'Let&#8217;s go!' ); ?></a></p>
</ins><span class="cx"> <?php
</span><span class="cx">         break;
</span><span class="cx">
</span><span class="lines">@@ -115,36 +115,36 @@
</span><span class="cx">                 display_header();
</span><span class="cx">         ?>
</span><span class="cx"> <form method="post" action="setup-config.php?step=2">
</span><del>-        <p>Below you should enter your database connection details. If you're not sure about these, contact your host. </p>
</del><ins>+        <p><?php _e( "Below you should enter your database connection details. If you're not sure about these, contact your host." ); ?></p>
</ins><span class="cx">         <table class="form-table">
</span><span class="cx">                 <tr>
</span><del>-                        <th scope="row"><label for="dbname">Database Name</label></th>
</del><ins>+                        <th scope="row"><label for="dbname"><?php _e( 'Database Name' ); ?></label></th>
</ins><span class="cx">                         <td><input name="dbname" id="dbname" type="text" size="25" value="wordpress" /></td>
</span><del>-                        <td>The name of the database you want to run WP in. </td>
</del><ins>+                        <td><?php _e( 'The name of the database you want to run WP in.' ); ?></td>
</ins><span class="cx">                 </tr>
</span><span class="cx">                 <tr>
</span><del>-                        <th scope="row"><label for="uname">User Name</label></th>
-                        <td><input name="uname" id="uname" type="text" size="25" value="username" /></td>
-                        <td>Your MySQL username</td>
</del><ins>+                        <th scope="row"><label for="uname"><?php _e( 'User Name' ); ?></label></th>
+                        <td><input name="uname" id="uname" type="text" size="25" value="<?php echo htmlspecialchars( _x( 'username', 'example username' ), ENT_QUOTES ); ?>" /></td>
+                        <td><?php _e( 'Your MySQL username' ); ?></td>
</ins><span class="cx">                 </tr>
</span><span class="cx">                 <tr>
</span><del>-                        <th scope="row"><label for="pwd">Password</label></th>
-                        <td><input name="pwd" id="pwd" type="text" size="25" value="password" /></td>
-                        <td>...and your MySQL password.</td>
</del><ins>+                        <th scope="row"><label for="pwd"><?php _e( 'Password' ); ?></label></th>
+                        <td><input name="pwd" id="pwd" type="text" size="25" value="<?php echo htmlspecialchars( _x( 'password', 'example password' ), ENT_QUOTES ); ?>" /></td>
+                        <td><?php _e( '&hellip;and your MySQL password.' ); ?></td>
</ins><span class="cx">                 </tr>
</span><span class="cx">                 <tr>
</span><del>-                        <th scope="row"><label for="dbhost">Database Host</label></th>
</del><ins>+                        <th scope="row"><label for="dbhost"><?php _e( 'Database Host' ); ?></label></th>
</ins><span class="cx">                         <td><input name="dbhost" id="dbhost" type="text" size="25" value="localhost" /></td>
</span><del>-                        <td>You should be able to get this info from your web host, if <code>localhost</code> does not work.</td>
</del><ins>+                        <td><?php _e( 'You should be able to get this info from your web host, if <code>localhost</code> does not work.' ); ?></td>
</ins><span class="cx">                 </tr>
</span><span class="cx">                 <tr>
</span><del>-                        <th scope="row"><label for="prefix">Table Prefix</label></th>
</del><ins>+                        <th scope="row"><label for="prefix"><?php _e( 'Table Prefix' ); ?></label></th>
</ins><span class="cx">                         <td><input name="prefix" id="prefix" type="text" value="wp_" size="25" /></td>
</span><del>-                        <td>If you want to run multiple WordPress installations in a single database, change this.</td>
</del><ins>+                        <td><?php _e( 'If you want to run multiple WordPress installations in a single database, change this.' ); ?></td>
</ins><span class="cx">                 </tr>
</span><span class="cx">         </table>
</span><del>-        <?php if ( isset( $_GET['noapi'] ) ) { ?><input name="noapi" type="hidden" value="true" /><?php } ?>
-        <p class="step"><input name="submit" type="submit" value="Submit" class="button" /></p>
</del><ins>+        <?php if ( isset( $_GET['noapi'] ) ) { ?><input name="noapi" type="hidden" value="1" /><?php } ?>
+        <p class="step"><input name="submit" type="submit" value="<?php echo htmlspecialchars( __( 'Submit' ), ENT_QUOTES ); ?>" class="button" /></p>
</ins><span class="cx"> </form>
</span><span class="cx"> <?php
</span><span class="cx">         break;
</span><span class="lines">@@ -160,7 +160,7 @@
</span><span class="cx">
</span><span class="cx">         // Validate $prefix: it can only contain letters, numbers and underscores
</span><span class="cx">         if ( preg_match( '|[^a-z0-9_]|i', $prefix ) )
</span><del>-                wp_die( /*WP_I18N_BAD_PREFIX*/'<strong>ERROR</strong>: "Table Prefix" can only contain numbers, letters, and underscores.'/*/WP_I18N_BAD_PREFIX*/ );
</del><ins>+                wp_die( __( '<strong>ERROR</strong>: "Table Prefix" can only contain numbers, letters, and underscores.' ) );
</ins><span class="cx">
</span><span class="cx">         // Test the db connection.
</span><span class="cx">         /**#@+
</span><span class="lines">@@ -175,15 +175,12 @@
</span><span class="cx">         // We'll fail here if the values are no good.
</span><span class="cx">         require_wp_db();
</span><span class="cx">         if ( ! empty( $wpdb->error ) ) {
</span><del>-                $back = '<p class="step"><a href="setup-config.php?step=1" onclick="javascript:history.go(-1);return false;" class="button">Try Again</a></p>';
</del><ins>+                $back = '<p class="step"><a href="setup-config.php?step=1" onclick="javascript:history.go(-1);return false;" class="button">' . __( 'Try Again' ) . '</a></p>';
</ins><span class="cx">                 wp_die( $wpdb->error->get_error_message() . $back );
</span><span class="cx">         }
</span><span class="cx">
</span><span class="cx">         // Fetch or generate keys and salts.
</span><span class="cx">         $no_api = isset( $_POST['noapi'] );
</span><del>-        require_once( ABSPATH . WPINC . '/plugin.php' );
-        require_once( ABSPATH . WPINC . '/l10n.php' );
-        require_once( ABSPATH . WPINC . '/pomo/translations.php' );
</del><span class="cx">         if ( ! $no_api ) {
</span><span class="cx">                 require_once( ABSPATH . WPINC . '/class-http.php' );
</span><span class="cx">                 require_once( ABSPATH . WPINC . '/http.php' );
</span><span class="lines">@@ -248,15 +245,15 @@
</span><span class="cx">         if ( ! is_writable(ABSPATH) ) :
</span><span class="cx">                 display_header();
</span><span class="cx"> ?>
</span><del>-<p>Sorry, but I can't write the <code>wp-config.php</code> file.</p>
-<p>You can create the <code>wp-config.php</code> manually and paste the following text into it.</p>
</del><ins>+<p><?php _e( "Sorry, but I can't write the <code>wp-config.php</code> file." ); ?></p>
+<p><?php _e( 'You can create the <code>wp-config.php</code> manually and paste the following text into it.' ); ?></p>
</ins><span class="cx"> <textarea cols="98" rows="15" class="code"><?php
</span><span class="cx">                 foreach( $config_file as $line ) {
</span><span class="cx">                         echo htmlentities($line, ENT_COMPAT, 'UTF-8');
</span><span class="cx">                 }
</span><span class="cx"> ?></textarea>
</span><del>-<p>After you've done that, click "Run the install."</p>
-<p class="step"><a href="install.php" class="button">Run the install</a></p>
</del><ins>+<p><?php _e( 'After you\'ve done that, click "Run the install."' ); ?></p>
+<p class="step"><a href="install.php" class="button"><?php _e( 'Run the install' ); ?></a></p>
</ins><span class="cx"> <?php
</span><span class="cx">         else :
</span><span class="cx">                 $handle = fopen(ABSPATH . 'wp-config.php', 'w');
</span><span class="lines">@@ -267,9 +264,9 @@
</span><span class="cx">                 chmod(ABSPATH . 'wp-config.php', 0666);
</span><span class="cx">                 display_header();
</span><span class="cx"> ?>
</span><del>-<p>All right sparky! You've made it through this part of the installation. WordPress can now communicate with your database. If you are ready, time now to&hellip;</p>
</del><ins>+<p><?php _e( "All right sparky! You've made it through this part of the installation. WordPress can now communicate with your database. If you are ready, time now to&hellip;" ); ?></p>
</ins><span class="cx">
</span><del>-<p class="step"><a href="install.php" class="button">Run the install</a></p>
</del><ins>+<p class="step"><a href="install.php" class="button"><?php _e( 'Run the install' ); ?></a></p>
</ins><span class="cx"> <?php
</span><span class="cx">         endif;
</span><span class="cx">         break;
</span></span></pre></div>
<a id="trunkwpincludesfunctionsphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/functions.php (19759 => 19760)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/functions.php        2012-01-26 09:21:44 UTC (rev 19759)
+++ trunk/wp-includes/functions.php        2012-01-26 20:34:27 UTC (rev 19760)
</span><span class="lines">@@ -1201,8 +1201,10 @@
</span><span class="cx">
</span><span class="cx">                 // One or more tables exist. We are insane.
</span><span class="cx">
</span><ins>+                wp_load_translations_early();
+
</ins><span class="cx">                 // Die with a DB error.
</span><del>-                $wpdb->error = sprintf( /*WP_I18N_NO_TABLES*/'One or more database tables are unavailable. The database may need to be <a href="%s">repaired</a>.'/*/WP_I18N_NO_TABLES*/, 'maint/repair.php?referrer=is_blog_installed' );
</del><ins>+                $wpdb->error = sprintf( __( 'One or more database tables are unavailable. The database may need to be <a href="%s">repaired</a>.' ), 'maint/repair.php?referrer=is_blog_installed' );
</ins><span class="cx">                 dead_db();
</span><span class="cx">         }
</span><span class="cx">
</span><span class="lines">@@ -2647,16 +2649,18 @@
</span><span class="cx">         status_header( 500 );
</span><span class="cx">         nocache_headers();
</span><span class="cx">         header( 'Content-Type: text/html; charset=utf-8' );
</span><ins>+
+        wp_load_translations_early();
</ins><span class="cx"> ?>
</span><span class="cx"> <!DOCTYPE html>
</span><span class="cx"> <html xmlns="http://www.w3.org/1999/xhtml" <?php if ( function_exists( 'language_attributes' ) ) language_attributes(); ?>>
</span><span class="cx"> <head>
</span><span class="cx"> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
</span><del>-        <title><?php echo /*WP_I18N_DB_ERROR*/'Database Error'/*/WP_I18N_DB_ERROR*/; ?></title>
</del><ins>+        <title><?php _e( 'Database Error' ); ?></title>
</ins><span class="cx">
</span><span class="cx"> </head>
</span><span class="cx"> <body>
</span><del>-        <h1><?php echo /*WP_I18N_DB_CONNECTION_ERROR*/'Error establishing a database connection'/*/WP_I18N_DB_CONNECTION_ERROR*/; ?></h1>
</del><ins>+        <h1><?php _e( 'Error establishing a database connection' ); ?></h1>
</ins><span class="cx"> </body>
</span><span class="cx"> </html>
</span><span class="cx"> <?php
</span></span></pre></div>
<a id="trunkwpincludesloadphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/load.php (19759 => 19760)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/load.php        2012-01-26 09:21:44 UTC (rev 19759)
+++ trunk/wp-includes/load.php        2012-01-26 20:34:27 UTC (rev 19760)
</span><span class="lines">@@ -19,7 +19,7 @@
</span><span class="cx">                 return;
</span><span class="cx">
</span><span class="cx">         if ( isset( $_REQUEST['GLOBALS'] ) )
</span><del>-                die( /*WP_I18N_GLOBALS_OVERWRITE*/'GLOBALS overwrite attempt detected'/*/WP_I18N_GLOBALS_OVERWRITE*/ );
</del><ins>+                die( 'GLOBALS overwrite attempt detected' );
</ins><span class="cx">
</span><span class="cx">         // Variables that shouldn't be unset
</span><span class="cx">         $no_unset = array( 'GLOBALS', '_GET', '_POST', '_COOKIE', '_REQUEST', '_SERVER', '_ENV', '_FILES', 'table_prefix' );
</span><span class="lines">@@ -97,22 +97,21 @@
</span><span class="cx"> *
</span><span class="cx"> * Dies if requirements are not met.
</span><span class="cx"> *
</span><del>- * This function must be able to work without a complete environment set up. In wp-load.php, for
- * example, WP_CONTENT_DIR is defined and version.php is included before this function is called.
- *
</del><span class="cx"> * @access private
</span><span class="cx"> * @since 3.0.0
</span><span class="cx"> */
</span><span class="cx"> function wp_check_php_mysql_versions() {
</span><del>-        // we can probably extend this function to check if wp_die() exists then use translated strings, and then use it in install.php etc.
-
</del><span class="cx">         global $required_php_version, $wp_version;
</span><span class="cx">         $php_version = phpversion();
</span><del>-        if ( version_compare( $required_php_version, $php_version, '>' ) )
-                die( sprintf( /*WP_I18N_OLD_PHP*/'Your server is running PHP version %1$s but WordPress %2$s requires at least %3$s.'/*/WP_I18N_OLD_PHP*/, $php_version, $wp_version, $required_php_version ) );
</del><ins>+        if ( version_compare( $required_php_version, $php_version, '>' ) ) {
+                wp_load_translations_early();
+                wp_die( sprintf( __( 'Your server is running PHP version %1$s but WordPress %2$s requires at least %3$s.' ), $php_version, $wp_version, $required_php_version ) );
+        }
</ins><span class="cx">
</span><del>-        if ( !extension_loaded( 'mysql' ) && !file_exists( WP_CONTENT_DIR . '/db.php' ) )
-                die( /*WP_I18N_OLD_MYSQL*/'Your PHP installation appears to be missing the MySQL extension which is required by WordPress.'/*/WP_I18N_OLD_MYSQL*/ );
</del><ins>+        if ( ! extension_loaded( 'mysql' ) && ! file_exists( WP_CONTENT_DIR . '/db.php' ) ) {
+                wp_load_translations_early();
+                wp_die( __( 'Your PHP installation appears to be missing the MySQL extension which is required by WordPress.' ) );
+        }
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> /**
</span><span class="lines">@@ -159,6 +158,8 @@
</span><span class="cx">                 die();
</span><span class="cx">         }
</span><span class="cx">
</span><ins>+        wp_load_translations_early();
+
</ins><span class="cx">         $protocol = $_SERVER["SERVER_PROTOCOL"];
</span><span class="cx">         if ( 'HTTP/1.1' != $protocol && 'HTTP/1.0' != $protocol )
</span><span class="cx">                 $protocol = 'HTTP/1.0';
</span><span class="lines">@@ -170,11 +171,11 @@
</span><span class="cx">         <html xmlns="http://www.w3.org/1999/xhtml">
</span><span class="cx">         <head>
</span><span class="cx">         <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
</span><del>-                <title><?php echo /*WP_I18N_MAINTENANCE*/'Maintenance'/*/WP_I18N_MAINTENANCE*/; ?></title>
</del><ins>+                <title><?php _e( 'Maintenance' ); ?></title>
</ins><span class="cx">
</span><span class="cx">         </head>
</span><span class="cx">         <body>
</span><del>-                <h1><?php echo /*WP_I18N_MAINT_MSG*/'Briefly unavailable for scheduled maintenance. Check back in a minute.'/*/WP_I18N_MAINT_MSG*/; ?></h1>
</del><ins>+                <h1><?php _e( 'Briefly unavailable for scheduled maintenance. Check back in a minute.' ); ?></h1>
</ins><span class="cx">         </body>
</span><span class="cx">         </html>
</span><span class="cx"> <?php
</span><span class="lines">@@ -364,8 +365,10 @@
</span><span class="cx">
</span><span class="cx">         $prefix = $wpdb->set_prefix( $table_prefix );
</span><span class="cx">
</span><del>-        if ( is_wp_error( $prefix ) )
-                wp_die( /*WP_I18N_BAD_PREFIX*/'<strong>ERROR</strong>: <code>$table_prefix</code> in <code>wp-config.php</code> can only contain numbers, letters, and underscores.'/*/WP_I18N_BAD_PREFIX*/ );
</del><ins>+        if ( is_wp_error( $prefix ) ) {
+                wp_load_translations_early();
+                wp_die( __( '<strong>ERROR</strong>: <code>$table_prefix</code> in <code>wp-config.php</code> can only contain numbers, letters, and underscores.' ) );
+        }
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> /**
</span><span class="lines">@@ -649,3 +652,87 @@
</span><span class="cx">
</span><span class="cx">         return false;
</span><span class="cx"> }
</span><ins>+
+/**
+ * Attempts an early load of translations.
+ *
+ * Used for errors encountered during the initial loading process, before the locale has been
+ * properly detected and loaded.
+ *
+ * Designed for unusual load sequences (like setup-config.php) or for when the script will then
+ * terminate with an error, otherwise there is a risk that a file can be double-included.
+ *
+ * @since 3.4.0
+ * @access private
+ */
+function wp_load_translations_early() {
+        global $text_direction, $wp_locale;
+
+        static $loaded = false;
+        if ( $loaded )
+                return;
+        $loaded = true;
+
+        if ( function_exists( 'did_action' ) && did_action( 'init' ) )
+                return;
+
+        // We need $wp_local_package
+        require ABSPATH . WPINC . '/version.php';
+
+        // Translation and localization
+        require_once ABSPATH . WPINC . '/pomo/mo.php';
+        require_once ABSPATH . WPINC . '/l10n.php';
+        require_once ABSPATH . WPINC . '/locale.php';
+
+        // General libraries
+        require_once ABSPATH . WPINC . '/functions.php';
+        require_once ABSPATH . WPINC . '/plugin.php';
+
+        $locales = $locations = array();
+
+        while ( true ) {
+                if ( defined( 'WPLANG' ) ) {
+                        if ( '' == WPLANG )
+                                break;
+                        $locales[] = WPLANG;
+                }
+
+                if ( isset( $wp_local_package ) )
+                        $locales[] = $wp_local_package;
+
+                if ( ! $locales )
+                        break;
+
+                if ( defined( 'WP_LANG_DIR' ) && @is_dir( WP_LANG_DIR ) )
+                        $locations[] = WP_LANG_DIR;
+
+                if ( defined( 'WP_CONTENT_DIR' ) && @is_dir( WP_CONTENT_DIR . '/languages' ) )
+                        $locations[] = WP_CONTENT_DIR . '/languages';
+
+                if ( @is_dir( ABSPATH . 'wp-content/languages' ) )
+                        $locations[] = ABSPATH . 'wp-content/languages';
+
+                if ( @is_dir( ABSPATH . WPINC . '/languages' ) )
+                        $locations[] = ABSPATH . WPINC . '/languages';
+
+                if ( ! $locations )
+                        break;
+
+                $locations = array_unique( $locations );
+
+                foreach ( $locales as $locale ) {
+                        foreach ( $locations as $location ) {
+                                if ( file_exists( $location . '/' . $locale . '.mo' ) ) {
+                                        load_textdomain( 'default', $location . '/' . $locale . '.mo' );
+                                        if ( WP_Locale::is_locale_rtl( $locale ) )
+                                                $text_direction = 'rtl';
+                                        break 2;
+                                }
+                        }
+                }
+
+                break;
+        }
+
+        $wp_locale = new WP_Locale();
+}
</ins></span></pre></div>
<a id="trunkwpincludeslocalephp"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/locale.php (19759 => 19760)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/locale.php        2012-01-26 09:21:44 UTC (rev 19759)
+++ trunk/wp-includes/locale.php        2012-01-26 20:34:27 UTC (rev 19760)
</span><span class="lines">@@ -87,7 +87,7 @@
</span><span class="cx">         /**
</span><span class="cx">          * Locales which are known to be right-to-left.
</span><span class="cx">          */
</span><del>-        private $rtl_locales = array( 'ar', 'ckb', 'fa_IR', 'he_IL', 'ug_CN', 'dv', 'fa_AF', 'ha', 'ps', 'uz_UZ', 'yi' );
</del><ins>+        private static $rtl_locales = array( 'ar', 'ckb', 'fa_IR', 'he_IL', 'ug_CN', 'dv', 'fa_AF', 'ha', 'ps', 'uz_UZ', 'yi' );
</ins><span class="cx">
</span><span class="cx">         /**
</span><span class="cx">          * Sets up the translated strings and object properties.
</span><span class="lines">@@ -183,7 +183,7 @@
</span><span class="cx">                 $this->number_format['decimal_point'] = ('number_format_decimal_point' == $trans) ? '.' : $trans;
</span><span class="cx">
</span><span class="cx">                 // Locale-specific tweaks
</span><del>-                if ( in_array( get_locale(), $this->rtl_locales ) )
</del><ins>+                if ( self::is_locale_rtl( get_locale() ) )
</ins><span class="cx">                         $this->text_direction = 'rtl';
</span><span class="cx">
</span><span class="cx">                 // Import the $text_direction global.
</span><span class="lines">@@ -333,6 +333,9 @@
</span><span class="cx">                 return 'rtl' == $this->text_direction;
</span><span class="cx">         }
</span><span class="cx">
</span><ins>+        public static function is_locale_rtl( $locale ) {
+                return in_array( $locale, self::$rtl_locales );
+        }
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> /**
</span></span></pre></div>
<a id="trunkwpincludesmsloadphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/ms-load.php (19759 => 19760)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/ms-load.php        2012-01-26 09:21:44 UTC (rev 19759)
+++ trunk/wp-includes/ms-load.php        2012-01-26 20:34:27 UTC (rev 19760)
</span><span class="lines">@@ -211,10 +211,12 @@
</span><span class="cx">         }
</span><span class="cx">
</span><span class="cx">         // Still no dice.
</span><ins>+        wp_load_translations_early();
+
</ins><span class="cx">         if ( 1 == count( $sites ) )
</span><del>-                wp_die( sprintf( /*WP_I18N_BLOG_DOESNT_EXIST*/'That site does not exist. Please try <a href="%s">%s</a>.'/*/WP_I18N_BLOG_DOESNT_EXIST*/, $sites[0]->domain . $sites[0]->path ) );
</del><ins>+                wp_die( sprintf( __( 'That site does not exist. Please try <a href="%s">%s</a>.' ), 'http://' . $sites[0]->domain . $sites[0]->path ) );
</ins><span class="cx">         else
</span><del>-                wp_die( /*WP_I18N_NO_SITE_DEFINED*/'No site defined on this host. If you are the owner of this site, please check <a href="http://codex.wordpress.org/Debugging_a_WordPress_Network">Debugging a WordPress Network</a> for help.'/*/WP_I18N_NO_SITE_DEFINED*/ );
</del><ins>+                wp_die( __( 'No site defined on this host. If you are the owner of this site, please check <a href="http://codex.wordpress.org/Debugging_a_WordPress_Network">Debugging a WordPress Network</a> for help.' ) );
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> /**
</span><span class="lines">@@ -228,19 +230,21 @@
</span><span class="cx"> function ms_not_installed() {
</span><span class="cx">         global $wpdb, $domain, $path;
</span><span class="cx">
</span><del>-        $title = /*WP_I18N_FATAL_ERROR*/'Error establishing database connection'/*/WP_I18N_FATAL_ERROR*/;
</del><ins>+        wp_load_translations_early();
+
+        $title = __( 'Error establishing database connection' );
</ins><span class="cx">         $msg = '<h1>' . $title . '</h1>';
</span><span class="cx">         if ( ! is_admin() )
</span><span class="cx">                 die( $msg );
</span><del>-        $msg .= '<p>' . /*WP_I18N_CONTACT_OWNER*/'If your site does not display, please contact the owner of this network.'/*/WP_I18N_CONTACT_OWNER*/ . '';
-        $msg .= ' ' . /*WP_I18N_CHECK_MYSQL*/'If you are the owner of this network please check that MySQL is running properly and all tables are error free.'/*/WP_I18N_CHECK_MYSQL*/ . '</p>';
</del><ins>+        $msg .= '<p>' . __( 'If your site does not display, please contact the owner of this network.' ) . '';
+        $msg .= ' ' . __( 'If you are the owner of this network please check that MySQL is running properly and all tables are error free.' ) . '</p>';
</ins><span class="cx">         if ( false && !$wpdb->get_var( "SHOW TABLES LIKE '$wpdb->site'" ) )
</span><del>-                $msg .= '<p>' . sprintf( /*WP_I18N_TABLES_MISSING_LONG*/'<strong>Database tables are missing.</strong> This means that MySQL is not running, WordPress was not installed properly, or someone deleted <code>%s</code>. You really should look at your database now.'/*/WP_I18N_TABLES_MISSING_LONG*/, $wpdb->site ) . '</p>';
</del><ins>+                $msg .= '<p>' . sprintf( __( '<strong>Database tables are missing.</strong> This means that MySQL is not running, WordPress was not installed properly, or someone deleted <code>%s</code>. You really should look at your database now.' ), $wpdb->site ) . '</p>';
</ins><span class="cx">         else
</span><del>-                $msg .= '<p>' . sprintf( /*WP_I18N_NO_SITE_FOUND*/'<strong>Could not find site <code>%1$s</code>.</strong> Searched for table <code>%2$s</code> in database <code>%3$s</code>. Is that right?'/*/WP_I18N_NO_SITE_FOUND*/, rtrim( $domain . $path, '/' ), $wpdb->blogs, DB_NAME ) . '</p>';
-        $msg .= '<p><strong>' . /*WP_I18N_WHAT_DO_I_DO*/'What do I do now?'/*/WP_I18N_WHAT_DO_I_DO*/ . '</strong> ';
-        $msg .= /*WP_I18N_RTFM*/'Read the <a target="_blank" href="http://codex.wordpress.org/Debugging_a_WordPress_Network">bug report</a> page. Some of the guidelines there may help you figure out what went wrong.'/*/WP_I18N_RTFM*/;
-        $msg .= ' ' . /*WP_I18N_STUCK*/'If you&#8217;re still stuck with this message, then check that your database contains the following tables:'/*/WP_I18N_STUCK*/ . '</p><ul>';
</del><ins>+                $msg .= '<p>' . sprintf( __( '<strong>Could not find site <code>%1$s</code>.</strong> Searched for table <code>%2$s</code> in database <code>%3$s</code>. Is that right?' ), rtrim( $domain . $path, '/' ), $wpdb->blogs, DB_NAME ) . '</p>';
+        $msg .= '<p><strong>' . __( 'What do I do now?' ) . '</strong> ';
+        $msg .= __( 'Read the <a target="_blank" href="http://codex.wordpress.org/Debugging_a_WordPress_Network">bug report</a> page. Some of the guidelines there may help you figure out what went wrong.' );
+        $msg .= ' ' . __( 'If you&#8217;re still stuck with this message, then check that your database contains the following tables:' ) . '</p><ul>';
</ins><span class="cx">         foreach ( $wpdb->tables('global') as $t => $table ) {
</span><span class="cx">                 if ( 'sitecategories' == $t )
</span><span class="cx">                         continue;
</span></span></pre></div>
<a id="trunkwpincludesmssettingsphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/ms-settings.php (19759 => 19760)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/ms-settings.php        2012-01-26 09:21:44 UTC (rev 19759)
+++ trunk/wp-includes/ms-settings.php        2012-01-26 20:34:27 UTC (rev 19760)
</span><span class="lines">@@ -31,7 +31,8 @@
</span><span class="cx">                         $domain = substr( $domain, 0, -4 );
</span><span class="cx">                         $_SERVER['HTTP_HOST'] = substr( $_SERVER['HTTP_HOST'], 0, -4 );
</span><span class="cx">                 } else {
</span><del>-                        wp_die( /*WP_I18N_NO_PORT_NUMBER*/'Multisite only works without the port number in the URL.'/*/WP_I18N_NO_PORT_NUMBER*/ );
</del><ins>+                        wp_load_translations_early();
+                        wp_die( __( 'Multisite only works without the port number in the URL.' ) );
</ins><span class="cx">                 }
</span><span class="cx">         }
</span><span class="cx">
</span><span class="lines">@@ -116,8 +117,9 @@
</span><span class="cx">                 if ( defined( 'WP_INSTALLING' ) ) {
</span><span class="cx">                         $current_blog->blog_id = $blog_id = 1;
</span><span class="cx">                 } else {
</span><del>-                        $msg = ! $wpdb->get_var( "SHOW TABLES LIKE '$wpdb->site'" ) ? ' ' . /*WP_I18N_TABLES_MISSING*/'Database tables are missing.'/*/WP_I18N_TABLES_MISSING*/ : '';
-                        wp_die( /*WP_I18N_NO_BLOG*/'No site by that name on this system.'/*/WP_I18N_NO_BLOG*/ . $msg );
</del><ins>+                        wp_load_translations_early();
+                        $msg = ! $wpdb->get_var( "SHOW TABLES LIKE '$wpdb->site'" ) ? ' ' . __( 'Database tables are missing.' ) : '';
+                        wp_die( __( 'No site by that name on this system.' ) . $msg );
</ins><span class="cx">                 }
</span><span class="cx">         }
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkwpincludeswpdbphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/wp-db.php (19759 => 19760)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/wp-db.php        2012-01-26 09:21:44 UTC (rev 19759)
+++ trunk/wp-includes/wp-db.php        2012-01-26 20:34:27 UTC (rev 19760)
</span><span class="lines">@@ -573,7 +573,7 @@
</span><span class="cx">         function set_prefix( $prefix, $set_table_names = true ) {
</span><span class="cx">
</span><span class="cx">                 if ( preg_match( '|[^a-z0-9_]|i', $prefix ) )
</span><del>-                        return new WP_Error('invalid_db_prefix', /*WP_I18N_DB_BAD_PREFIX*/'Invalid database prefix'/*/WP_I18N_DB_BAD_PREFIX*/);
</del><ins>+                        return new WP_Error('invalid_db_prefix', 'Invalid database prefix' );
</ins><span class="cx">
</span><span class="cx">                 $old_prefix = is_multisite() ? '' : $prefix;
</span><span class="cx">
</span><span class="lines">@@ -745,14 +745,15 @@
</span><span class="cx">
</span><span class="cx">                 if ( !@mysql_select_db( $db, $dbh ) ) {
</span><span class="cx">                         $this->ready = false;
</span><del>-                        $this->bail( sprintf( /*WP_I18N_DB_SELECT_DB*/'<h1>Can&#8217;t select database</h1>
</del><ins>+                        wp_load_translations_early();
+                        $this->bail( sprintf( __( '<h1>Can&#8217;t select database</h1>
</ins><span class="cx"> <p>We were able to connect to the database server (which means your username and password is okay) but not able to select the <code>%1$s</code> database.</p>
</span><span class="cx"> <ul>
</span><span class="cx"> <li>Are you sure it exists?</li>
</span><span class="cx"> <li>Does the user <code>%2$s</code> have permission to use the <code>%1$s</code> database?</li>
</span><span class="cx"> <li>On some systems the name of your database is prefixed with your username, so it would be like <code>username_%1$s</code>. Could that be the problem?</li>
</span><span class="cx"> </ul>
</span><del>-<p>If you don\'t know how to set up a database you should <strong>contact your host</strong>. If all else fails you may find help at the <a href="http://wordpress.org/support/">WordPress Support Forums</a>.</p>'/*/WP_I18N_DB_SELECT_DB*/, $db, $this->dbuser ), 'db_select_fail' );
</del><ins>+<p>If you don\'t know how to set up a database you should <strong>contact your host</strong>. If all else fails you may find help at the <a href="http://wordpress.org/support/">WordPress Support Forums</a>.</p>' ), $db, $this->dbuser ), 'db_select_fail' );
</ins><span class="cx">                         return;
</span><span class="cx">                 }
</span><span class="cx">         }
</span><span class="lines">@@ -923,10 +924,12 @@
</span><span class="cx">                 if ( $this->suppress_errors )
</span><span class="cx">                         return false;
</span><span class="cx">
</span><ins>+                wp_load_translations_early();
+
</ins><span class="cx">                 if ( $caller = $this->get_caller() )
</span><del>-                        $error_str = sprintf( /*WP_I18N_DB_QUERY_ERROR_FULL*/'WordPress database error %1$s for query %2$s made by %3$s'/*/WP_I18N_DB_QUERY_ERROR_FULL*/, $str, $this->last_query, $caller );
</del><ins>+                        $error_str = sprintf( __( 'WordPress database error %1$s for query %2$s made by %3$s' ), $str, $this->last_query, $caller );
</ins><span class="cx">                 else
</span><del>-                        $error_str = sprintf( /*WP_I18N_DB_QUERY_ERROR*/'WordPress database error %1$s for query %2$s'/*/WP_I18N_DB_QUERY_ERROR*/, $str, $this->last_query );
</del><ins>+                        $error_str = sprintf( __( 'WordPress database error %1$s for query %2$s' ), $str, $this->last_query );
</ins><span class="cx">
</span><span class="cx">                 if ( function_exists( 'error_log' )
</span><span class="cx">                         && ( $log_file = @ini_get( 'error_log' ) )
</span><span class="lines">@@ -1037,7 +1040,8 @@
</span><span class="cx">                 }
</span><span class="cx">
</span><span class="cx">                 if ( !$this->dbh ) {
</span><del>-                        $this->bail( sprintf( /*WP_I18N_DB_CONN_ERROR*/"
</del><ins>+                        wp_load_translations_early();
+                        $this->bail( sprintf( __( "
</ins><span class="cx"> <h1>Error establishing a database connection</h1>
</span><span class="cx"> <p>This either means that the username and password information in your <code>wp-config.php</code> file is incorrect or we can't contact the database server at <code>%s</code>. This could mean your host's database server is down.</p>
</span><span class="cx"> <ul>
</span><span class="lines">@@ -1046,7 +1050,7 @@
</span><span class="cx">         <li>Are you sure that the database server is running?</li>
</span><span class="cx"> </ul>
</span><span class="cx"> <p>If you're unsure what these terms mean you should probably contact your host. If you still need help you can always visit the <a href='http://wordpress.org/support/'>WordPress Support Forums</a>.</p>
</span><del>-"/*/WP_I18N_DB_CONN_ERROR*/, $this->dbhost ), 'db_connect_fail' );
</del><ins>+" ), $this->dbhost ), 'db_connect_fail' );
</ins><span class="cx">
</span><span class="cx">                         return;
</span><span class="cx">                 }
</span><span class="lines">@@ -1073,8 +1077,7 @@
</span><span class="cx">                         return false;
</span><span class="cx">
</span><span class="cx">                 // some queries are made before the plugins have been loaded, and thus cannot be filtered with this method
</span><del>-                if ( function_exists( 'apply_filters' ) )
-                        $query = apply_filters( 'query', $query );
</del><ins>+                $query = apply_filters( 'query', $query );
</ins><span class="cx">
</span><span class="cx">                 $return_val = 0;
</span><span class="cx">                 $this->flush();
</span><span class="lines">@@ -1326,7 +1329,7 @@
</span><span class="cx">                 } elseif ( $output == ARRAY_N ) {
</span><span class="cx">                         return $this->last_result[$y] ? array_values( get_object_vars( $this->last_result[$y] ) ) : null;
</span><span class="cx">                 } else {
</span><del>-                        $this->print_error(/*WP_I18N_DB_GETROW_ERROR*/" \$db->get_row(string query, output type, int offset) -- Output type must be one of: OBJECT, ARRAY_A, ARRAY_N"/*/WP_I18N_DB_GETROW_ERROR*/);
</del><ins>+                        $this->print_error( " \$db->get_row(string query, output type, int offset) -- Output type must be one of: OBJECT, ARRAY_A, ARRAY_N" );
</ins><span class="cx">                 }
</span><span class="cx">         }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkwploadphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-load.php (19759 => 19760)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-load.php        2012-01-26 09:21:44 UTC (rev 19759)
+++ trunk/wp-load.php        2012-01-26 20:34:27 UTC (rev 19760)
</span><span class="lines">@@ -39,21 +39,23 @@
</span><span class="cx">
</span><span class="cx">         // Set a path for the link to the installer
</span><span class="cx">         if ( strpos($_SERVER['PHP_SELF'], 'wp-admin') !== false )
</span><del>-                $path = '';
</del><ins>+                $path = 'setup-config.php';
</ins><span class="cx">         else
</span><del>-                $path = 'wp-admin/';
</del><ins>+                $path = 'wp-admin/setup-config.php';
</ins><span class="cx">
</span><del>-        require_once( ABSPATH . '/wp-includes/load.php' );
-        require_once( ABSPATH . '/wp-includes/version.php' );
</del><ins>+        define( 'WPINC', 'wp-includes' );
</ins><span class="cx">         define( 'WP_CONTENT_DIR', ABSPATH . 'wp-content' );
</span><del>-        define( 'WPINC', 'wp-includes' );
</del><ins>+        require_once( ABSPATH . WPINC . '/load.php' );
+        require_once( ABSPATH . WPINC . '/version.php' );
+
+        wp_load_translations_early();
</ins><span class="cx">         wp_check_php_mysql_versions();
</span><span class="cx">
</span><span class="cx">         // Die with an error message
</span><del>-        require_once( ABSPATH . '/wp-includes/class-wp-error.php' );
-        require_once( ABSPATH . '/wp-includes/functions.php' );
-        require_once( ABSPATH . '/wp-includes/plugin.php' );
-        $text_direction = /*WP_I18N_TEXT_DIRECTION*/'ltr'/*/WP_I18N_TEXT_DIRECTION*/;
-        wp_die(sprintf(/*WP_I18N_NO_CONFIG*/"<p>There doesn't seem to be a <code>wp-config.php</code> file. I need this before we can get started.</p> <p>Need more help? <a href='http://codex.wordpress.org/Editing_wp-config.php'>We got it</a>.</p> <p>You can create a <code>wp-config.php</code> file through a web interface, but this doesn't work for all server setups. The safest way is to manually create the file.</p><p><a href='%ssetup-config.php' class='button'>Create a Configuration File</a></p>"/*/WP_I18N_NO_CONFIG*/, $path), /*WP_I18N_ERROR_TITLE*/'WordPress &rsaquo; Error'/*/WP_I18N_ERROR_TITLE*/, array('text_direction' => $text_direction));
</del><ins>+        $die = '<p>' . __( "There doesn't seem to be a <code>wp-config.php</code> file. I need this before we can get started." ) . '</p>';
+        $die .= '<p>' . __( "Need more help? <a href='http://codex.wordpress.org/Editing_wp-config.php'>We got it</a>." ) . '</p>';
+        $die .= '<p>' . __( "You can create a <code>wp-config.php</code> file through a web interface, but this doesn't work for all server setups. The safest way is to manually create the file." ) . '</p>';
+        $die .= '<p><a href="' . $path . '" class="button">' . __( "Create a Configuration File" ) . '</a></p>';
</ins><span class="cx">
</span><ins>+        wp_die( $die, __( 'WordPress &rsaquo; Error' ) );
</ins><span class="cx"> }
</span></span></pre></div>
<a id="trunkwpsettingsphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-settings.php (19759 => 19760)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-settings.php        2012-01-26 09:21:44 UTC (rev 19759)
+++ trunk/wp-settings.php        2012-01-26 20:34:27 UTC (rev 19760)
</span><span class="lines">@@ -70,6 +70,7 @@
</span><span class="cx"> require( ABSPATH . WPINC . '/class-wp.php' );
</span><span class="cx"> require( ABSPATH . WPINC . '/class-wp-error.php' );
</span><span class="cx"> require( ABSPATH . WPINC . '/plugin.php' );
</span><ins>+require( ABSPATH . WPINC . '/pomo/mo.php' );
</ins><span class="cx">
</span><span class="cx"> // Include the wpdb class and, if present, a db.php database drop-in.
</span><span class="cx"> require_wp_db();
</span><span class="lines">@@ -81,9 +82,8 @@
</span><span class="cx"> // Start the WordPress object cache, or an external object cache if the drop-in is present.
</span><span class="cx"> wp_start_object_cache();
</span><span class="cx">
</span><del>-// Load early WordPress files.
</del><ins>+// Attach the default filters.
</ins><span class="cx"> require( ABSPATH . WPINC . '/default-filters.php' );
</span><del>-require( ABSPATH . WPINC . '/pomo/mo.php' );
</del><span class="cx">
</span><span class="cx"> // Initialize multisite if enabled.
</span><span class="cx"> if ( is_multisite() ) {
</span><span class="lines">@@ -100,7 +100,7 @@
</span><span class="cx">         return false;
</span><span class="cx">
</span><span class="cx"> // Load the L10n library.
</span><del>-require( ABSPATH . WPINC . '/l10n.php' );
</del><ins>+require_once( ABSPATH . WPINC . '/l10n.php' );
</ins><span class="cx">
</span><span class="cx"> // Run the installer if WordPress is not installed.
</span><span class="cx"> wp_not_installed();
</span><span class="lines">@@ -268,7 +268,7 @@
</span><span class="cx"> unset($locale_file);
</span><span class="cx">
</span><span class="cx"> // Pull in locale data after loading text domain.
</span><del>-require( ABSPATH . WPINC . '/locale.php' );
</del><ins>+require_once( ABSPATH . WPINC . '/locale.php' );
</ins><span class="cx">
</span><span class="cx"> /**
</span><span class="cx"> * WordPress Locale object for loading locale domain date and various strings.
</span></span></pre>
</div>
</div>
</body>
</html>