<!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(&quot;&lt;p&gt;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 &lt;a href='install.php'&gt;installing now&lt;/a&gt;.&lt;/p&gt;&quot;);
</del><ins>+if ( file_exists( ABSPATH . 'wp-config.php' ) )
+        wp_die( '&lt;p&gt;' . sprintf( __( &quot;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 &lt;a href='%s'&gt;installing now&lt;/a&gt;.&quot; ), 'install.php' ) . '&lt;/p&gt;' );
</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') &amp;&amp; ! file_exists(ABSPATH . '../wp-settings.php'))
-        wp_die(&quot;&lt;p&gt;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 &lt;a href='install.php'&gt;installing now&lt;/a&gt;.&lt;/p&gt;&quot;);
</del><ins>+if ( file_exists(ABSPATH . '../wp-config.php' ) &amp;&amp; ! file_exists( ABSPATH . '../wp-settings.php' ) )
+        wp_die( '&lt;p&gt;' . sprintf( __( &quot;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 &lt;a href='install.php'&gt;installing now&lt;/a&gt;.&quot;), 'install.php' ) . '&lt;/p&gt;' );
</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"> &lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;
</span><span class="cx"> &lt;head&gt;
</span><span class="cx"> &lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=utf-8&quot; /&gt;
</span><del>-&lt;title&gt;WordPress &amp;rsaquo; Setup Configuration File&lt;/title&gt;
</del><ins>+&lt;title&gt;&lt;?php _e( 'WordPress &amp;rsaquo; Setup Configuration File' ); ?&gt;&lt;/title&gt;
</ins><span class="cx"> &lt;link rel=&quot;stylesheet&quot; href=&quot;css/install.css&quot; type=&quot;text/css&quot; /&gt;
</span><span class="cx"> 
</span><span class="cx"> &lt;/head&gt;
</span><span class="lines">@@ -96,18 +96,18 @@
</span><span class="cx">                 display_header();
</span><span class="cx"> ?&gt;
</span><span class="cx"> 
</span><del>-&lt;p&gt;Welcome to WordPress. Before getting started, we need some information on the database. You will need to know the following items before proceeding.&lt;/p&gt;
</del><ins>+&lt;p&gt;&lt;?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.' ) ?&gt;&lt;/p&gt;
</ins><span class="cx"> &lt;ol&gt;
</span><del>-        &lt;li&gt;Database name&lt;/li&gt;
-        &lt;li&gt;Database username&lt;/li&gt;
-        &lt;li&gt;Database password&lt;/li&gt;
-        &lt;li&gt;Database host&lt;/li&gt;
-        &lt;li&gt;Table prefix (if you want to run more than one WordPress in a single database) &lt;/li&gt;
</del><ins>+        &lt;li&gt;&lt;?php _e( 'Database name' ); ?&gt;&lt;/li&gt;
+        &lt;li&gt;&lt;?php _e( 'Database username' ); ?&gt;&lt;/li&gt;
+        &lt;li&gt;&lt;?php _e( 'Database password' ); ?&gt;&lt;/li&gt;
+        &lt;li&gt;&lt;?php _e( 'Database host' ); ?&gt;&lt;/li&gt;
+        &lt;li&gt;&lt;?php _e( 'Table prefix (if you want to run more than one WordPress in a single database)' ); ?&gt;&lt;/li&gt;
</ins><span class="cx"> &lt;/ol&gt;
</span><del>-&lt;p&gt;&lt;strong&gt;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 &lt;code&gt;wp-config-sample.php&lt;/code&gt; in a text editor, fill in your information, and save it as &lt;code&gt;wp-config.php&lt;/code&gt;. &lt;/strong&gt;&lt;/p&gt;
-&lt;p&gt;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&amp;#8217;re all ready&amp;hellip;&lt;/p&gt;
</del><ins>+&lt;p&gt;&lt;strong&gt;&lt;?php _e( &quot;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 &lt;code&gt;wp-config-sample.php&lt;/code&gt; in a text editor, fill in your information, and save it as &lt;code&gt;wp-config.php&lt;/code&gt;. &lt;/strong&gt;&lt;/p&gt;
+&lt;p&gt;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&amp;#8217;re all ready&amp;hellip;&quot; ); ?&gt;&lt;/p&gt;
</ins><span class="cx"> 
</span><del>-&lt;p class=&quot;step&quot;&gt;&lt;a href=&quot;setup-config.php?step=1&lt;?php if ( isset( $_GET['noapi'] ) ) echo '&amp;amp;noapi'; ?&gt;&quot; class=&quot;button&quot;&gt;Let&amp;#8217;s go!&lt;/a&gt;&lt;/p&gt;
</del><ins>+&lt;p class=&quot;step&quot;&gt;&lt;a href=&quot;setup-config.php?step=1&lt;?php if ( isset( $_GET['noapi'] ) ) echo '&amp;amp;noapi'; ?&gt;&quot; class=&quot;button&quot;&gt;&lt;?php _e( 'Let&amp;#8217;s go!' ); ?&gt;&lt;/a&gt;&lt;/p&gt;
</ins><span class="cx"> &lt;?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">         ?&gt;
</span><span class="cx"> &lt;form method=&quot;post&quot; action=&quot;setup-config.php?step=2&quot;&gt;
</span><del>-        &lt;p&gt;Below you should enter your database connection details. If you're not sure about these, contact your host. &lt;/p&gt;
</del><ins>+        &lt;p&gt;&lt;?php _e( &quot;Below you should enter your database connection details. If you're not sure about these, contact your host.&quot; ); ?&gt;&lt;/p&gt;
</ins><span class="cx">         &lt;table class=&quot;form-table&quot;&gt;
</span><span class="cx">                 &lt;tr&gt;
</span><del>-                        &lt;th scope=&quot;row&quot;&gt;&lt;label for=&quot;dbname&quot;&gt;Database Name&lt;/label&gt;&lt;/th&gt;
</del><ins>+                        &lt;th scope=&quot;row&quot;&gt;&lt;label for=&quot;dbname&quot;&gt;&lt;?php _e( 'Database Name' ); ?&gt;&lt;/label&gt;&lt;/th&gt;
</ins><span class="cx">                         &lt;td&gt;&lt;input name=&quot;dbname&quot; id=&quot;dbname&quot; type=&quot;text&quot; size=&quot;25&quot; value=&quot;wordpress&quot; /&gt;&lt;/td&gt;
</span><del>-                        &lt;td&gt;The name of the database you want to run WP in. &lt;/td&gt;
</del><ins>+                        &lt;td&gt;&lt;?php _e( 'The name of the database you want to run WP in.' ); ?&gt;&lt;/td&gt;
</ins><span class="cx">                 &lt;/tr&gt;
</span><span class="cx">                 &lt;tr&gt;
</span><del>-                        &lt;th scope=&quot;row&quot;&gt;&lt;label for=&quot;uname&quot;&gt;User Name&lt;/label&gt;&lt;/th&gt;
-                        &lt;td&gt;&lt;input name=&quot;uname&quot; id=&quot;uname&quot; type=&quot;text&quot; size=&quot;25&quot; value=&quot;username&quot; /&gt;&lt;/td&gt;
-                        &lt;td&gt;Your MySQL username&lt;/td&gt;
</del><ins>+                        &lt;th scope=&quot;row&quot;&gt;&lt;label for=&quot;uname&quot;&gt;&lt;?php _e( 'User Name' ); ?&gt;&lt;/label&gt;&lt;/th&gt;
+                        &lt;td&gt;&lt;input name=&quot;uname&quot; id=&quot;uname&quot; type=&quot;text&quot; size=&quot;25&quot; value=&quot;&lt;?php echo htmlspecialchars( _x( 'username', 'example username' ), ENT_QUOTES ); ?&gt;&quot; /&gt;&lt;/td&gt;
+                        &lt;td&gt;&lt;?php _e( 'Your MySQL username' ); ?&gt;&lt;/td&gt;
</ins><span class="cx">                 &lt;/tr&gt;
</span><span class="cx">                 &lt;tr&gt;
</span><del>-                        &lt;th scope=&quot;row&quot;&gt;&lt;label for=&quot;pwd&quot;&gt;Password&lt;/label&gt;&lt;/th&gt;
-                        &lt;td&gt;&lt;input name=&quot;pwd&quot; id=&quot;pwd&quot; type=&quot;text&quot; size=&quot;25&quot; value=&quot;password&quot; /&gt;&lt;/td&gt;
-                        &lt;td&gt;...and your MySQL password.&lt;/td&gt;
</del><ins>+                        &lt;th scope=&quot;row&quot;&gt;&lt;label for=&quot;pwd&quot;&gt;&lt;?php _e( 'Password' ); ?&gt;&lt;/label&gt;&lt;/th&gt;
+                        &lt;td&gt;&lt;input name=&quot;pwd&quot; id=&quot;pwd&quot; type=&quot;text&quot; size=&quot;25&quot; value=&quot;&lt;?php echo htmlspecialchars( _x( 'password', 'example password' ), ENT_QUOTES ); ?&gt;&quot; /&gt;&lt;/td&gt;
+                        &lt;td&gt;&lt;?php _e( '&amp;hellip;and your MySQL password.' ); ?&gt;&lt;/td&gt;
</ins><span class="cx">                 &lt;/tr&gt;
</span><span class="cx">                 &lt;tr&gt;
</span><del>-                        &lt;th scope=&quot;row&quot;&gt;&lt;label for=&quot;dbhost&quot;&gt;Database Host&lt;/label&gt;&lt;/th&gt;
</del><ins>+                        &lt;th scope=&quot;row&quot;&gt;&lt;label for=&quot;dbhost&quot;&gt;&lt;?php _e( 'Database Host' ); ?&gt;&lt;/label&gt;&lt;/th&gt;
</ins><span class="cx">                         &lt;td&gt;&lt;input name=&quot;dbhost&quot; id=&quot;dbhost&quot; type=&quot;text&quot; size=&quot;25&quot; value=&quot;localhost&quot; /&gt;&lt;/td&gt;
</span><del>-                        &lt;td&gt;You should be able to get this info from your web host, if &lt;code&gt;localhost&lt;/code&gt; does not work.&lt;/td&gt;
</del><ins>+                        &lt;td&gt;&lt;?php _e( 'You should be able to get this info from your web host, if &lt;code&gt;localhost&lt;/code&gt; does not work.' ); ?&gt;&lt;/td&gt;
</ins><span class="cx">                 &lt;/tr&gt;
</span><span class="cx">                 &lt;tr&gt;
</span><del>-                        &lt;th scope=&quot;row&quot;&gt;&lt;label for=&quot;prefix&quot;&gt;Table Prefix&lt;/label&gt;&lt;/th&gt;
</del><ins>+                        &lt;th scope=&quot;row&quot;&gt;&lt;label for=&quot;prefix&quot;&gt;&lt;?php _e( 'Table Prefix' ); ?&gt;&lt;/label&gt;&lt;/th&gt;
</ins><span class="cx">                         &lt;td&gt;&lt;input name=&quot;prefix&quot; id=&quot;prefix&quot; type=&quot;text&quot; value=&quot;wp_&quot; size=&quot;25&quot; /&gt;&lt;/td&gt;
</span><del>-                        &lt;td&gt;If you want to run multiple WordPress installations in a single database, change this.&lt;/td&gt;
</del><ins>+                        &lt;td&gt;&lt;?php _e( 'If you want to run multiple WordPress installations in a single database, change this.' ); ?&gt;&lt;/td&gt;
</ins><span class="cx">                 &lt;/tr&gt;
</span><span class="cx">         &lt;/table&gt;
</span><del>-        &lt;?php if ( isset( $_GET['noapi'] ) ) { ?&gt;&lt;input name=&quot;noapi&quot; type=&quot;hidden&quot; value=&quot;true&quot; /&gt;&lt;?php } ?&gt;
-        &lt;p class=&quot;step&quot;&gt;&lt;input name=&quot;submit&quot; type=&quot;submit&quot; value=&quot;Submit&quot; class=&quot;button&quot; /&gt;&lt;/p&gt;
</del><ins>+        &lt;?php if ( isset( $_GET['noapi'] ) ) { ?&gt;&lt;input name=&quot;noapi&quot; type=&quot;hidden&quot; value=&quot;1&quot; /&gt;&lt;?php } ?&gt;
+        &lt;p class=&quot;step&quot;&gt;&lt;input name=&quot;submit&quot; type=&quot;submit&quot; value=&quot;&lt;?php echo htmlspecialchars( __( 'Submit' ), ENT_QUOTES ); ?&gt;&quot; class=&quot;button&quot; /&gt;&lt;/p&gt;
</ins><span class="cx"> &lt;/form&gt;
</span><span class="cx"> &lt;?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*/'&lt;strong&gt;ERROR&lt;/strong&gt;: &quot;Table Prefix&quot; can only contain numbers, letters, and underscores.'/*/WP_I18N_BAD_PREFIX*/ );
</del><ins>+                wp_die( __( '&lt;strong&gt;ERROR&lt;/strong&gt;: &quot;Table Prefix&quot; 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-&gt;error ) ) {
</span><del>-                $back = '&lt;p class=&quot;step&quot;&gt;&lt;a href=&quot;setup-config.php?step=1&quot; onclick=&quot;javascript:history.go(-1);return false;&quot; class=&quot;button&quot;&gt;Try Again&lt;/a&gt;&lt;/p&gt;';
</del><ins>+                $back = '&lt;p class=&quot;step&quot;&gt;&lt;a href=&quot;setup-config.php?step=1&quot; onclick=&quot;javascript:history.go(-1);return false;&quot; class=&quot;button&quot;&gt;' . __( 'Try Again' ) . '&lt;/a&gt;&lt;/p&gt;';
</ins><span class="cx">                 wp_die( $wpdb-&gt;error-&gt;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"> ?&gt;
</span><del>-&lt;p&gt;Sorry, but I can't write the &lt;code&gt;wp-config.php&lt;/code&gt; file.&lt;/p&gt;
-&lt;p&gt;You can create the &lt;code&gt;wp-config.php&lt;/code&gt; manually and paste the following text into it.&lt;/p&gt;
</del><ins>+&lt;p&gt;&lt;?php _e( &quot;Sorry, but I can't write the &lt;code&gt;wp-config.php&lt;/code&gt; file.&quot; ); ?&gt;&lt;/p&gt;
+&lt;p&gt;&lt;?php _e( 'You can create the &lt;code&gt;wp-config.php&lt;/code&gt; manually and paste the following text into it.' ); ?&gt;&lt;/p&gt;
</ins><span class="cx"> &lt;textarea cols=&quot;98&quot; rows=&quot;15&quot; class=&quot;code&quot;&gt;&lt;?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"> ?&gt;&lt;/textarea&gt;
</span><del>-&lt;p&gt;After you've done that, click &quot;Run the install.&quot;&lt;/p&gt;
-&lt;p class=&quot;step&quot;&gt;&lt;a href=&quot;install.php&quot; class=&quot;button&quot;&gt;Run the install&lt;/a&gt;&lt;/p&gt;
</del><ins>+&lt;p&gt;&lt;?php _e( 'After you\'ve done that, click &quot;Run the install.&quot;' ); ?&gt;&lt;/p&gt;
+&lt;p class=&quot;step&quot;&gt;&lt;a href=&quot;install.php&quot; class=&quot;button&quot;&gt;&lt;?php _e( 'Run the install' ); ?&gt;&lt;/a&gt;&lt;/p&gt;
</ins><span class="cx"> &lt;?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"> ?&gt;
</span><del>-&lt;p&gt;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&amp;hellip;&lt;/p&gt;
</del><ins>+&lt;p&gt;&lt;?php _e( &quot;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&amp;hellip;&quot; ); ?&gt;&lt;/p&gt;
</ins><span class="cx"> 
</span><del>-&lt;p class=&quot;step&quot;&gt;&lt;a href=&quot;install.php&quot; class=&quot;button&quot;&gt;Run the install&lt;/a&gt;&lt;/p&gt;
</del><ins>+&lt;p class=&quot;step&quot;&gt;&lt;a href=&quot;install.php&quot; class=&quot;button&quot;&gt;&lt;?php _e( 'Run the install' ); ?&gt;&lt;/a&gt;&lt;/p&gt;
</ins><span class="cx"> &lt;?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-&gt;error = sprintf( /*WP_I18N_NO_TABLES*/'One or more database tables are unavailable. The database may need to be &lt;a href=&quot;%s&quot;&gt;repaired&lt;/a&gt;.'/*/WP_I18N_NO_TABLES*/, 'maint/repair.php?referrer=is_blog_installed' );
</del><ins>+                $wpdb-&gt;error = sprintf( __( 'One or more database tables are unavailable. The database may need to be &lt;a href=&quot;%s&quot;&gt;repaired&lt;/a&gt;.' ), '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"> ?&gt;
</span><span class="cx"> &lt;!DOCTYPE html&gt;
</span><span class="cx"> &lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot; &lt;?php if ( function_exists( 'language_attributes' ) ) language_attributes(); ?&gt;&gt;
</span><span class="cx"> &lt;head&gt;
</span><span class="cx"> &lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=utf-8&quot; /&gt;
</span><del>-        &lt;title&gt;&lt;?php echo /*WP_I18N_DB_ERROR*/'Database Error'/*/WP_I18N_DB_ERROR*/; ?&gt;&lt;/title&gt;
</del><ins>+        &lt;title&gt;&lt;?php _e( 'Database Error' ); ?&gt;&lt;/title&gt;
</ins><span class="cx"> 
</span><span class="cx"> &lt;/head&gt;
</span><span class="cx"> &lt;body&gt;
</span><del>-        &lt;h1&gt;&lt;?php echo /*WP_I18N_DB_CONNECTION_ERROR*/'Error establishing a database connection'/*/WP_I18N_DB_CONNECTION_ERROR*/; ?&gt;&lt;/h1&gt;
</del><ins>+        &lt;h1&gt;&lt;?php _e( 'Error establishing a database connection' ); ?&gt;&lt;/h1&gt;
</ins><span class="cx"> &lt;/body&gt;
</span><span class="cx"> &lt;/html&gt;
</span><span class="cx"> &lt;?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, '&gt;' ) )
-                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, '&gt;' ) ) {
+                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' ) &amp;&amp; !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' ) &amp;&amp; ! 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[&quot;SERVER_PROTOCOL&quot;];
</span><span class="cx">         if ( 'HTTP/1.1' != $protocol &amp;&amp; 'HTTP/1.0' != $protocol )
</span><span class="cx">                 $protocol = 'HTTP/1.0';
</span><span class="lines">@@ -170,11 +171,11 @@
</span><span class="cx">         &lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;
</span><span class="cx">         &lt;head&gt;
</span><span class="cx">         &lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=utf-8&quot; /&gt;
</span><del>-                &lt;title&gt;&lt;?php echo /*WP_I18N_MAINTENANCE*/'Maintenance'/*/WP_I18N_MAINTENANCE*/; ?&gt;&lt;/title&gt;
</del><ins>+                &lt;title&gt;&lt;?php _e( 'Maintenance' ); ?&gt;&lt;/title&gt;
</ins><span class="cx"> 
</span><span class="cx">         &lt;/head&gt;
</span><span class="cx">         &lt;body&gt;
</span><del>-                &lt;h1&gt;&lt;?php echo /*WP_I18N_MAINT_MSG*/'Briefly unavailable for scheduled maintenance. Check back in a minute.'/*/WP_I18N_MAINT_MSG*/; ?&gt;&lt;/h1&gt;
</del><ins>+                &lt;h1&gt;&lt;?php _e( 'Briefly unavailable for scheduled maintenance. Check back in a minute.' ); ?&gt;&lt;/h1&gt;
</ins><span class="cx">         &lt;/body&gt;
</span><span class="cx">         &lt;/html&gt;
</span><span class="cx"> &lt;?php
</span><span class="lines">@@ -364,8 +365,10 @@
</span><span class="cx"> 
</span><span class="cx">         $prefix = $wpdb-&gt;set_prefix( $table_prefix );
</span><span class="cx"> 
</span><del>-        if ( is_wp_error( $prefix ) )
-                wp_die( /*WP_I18N_BAD_PREFIX*/'&lt;strong&gt;ERROR&lt;/strong&gt;: &lt;code&gt;$table_prefix&lt;/code&gt; in &lt;code&gt;wp-config.php&lt;/code&gt; can only contain numbers, letters, and underscores.'/*/WP_I18N_BAD_PREFIX*/ );
</del><ins>+        if ( is_wp_error( $prefix ) ) {
+                wp_load_translations_early();
+                wp_die( __( '&lt;strong&gt;ERROR&lt;/strong&gt;: &lt;code&gt;$table_prefix&lt;/code&gt; in &lt;code&gt;wp-config.php&lt;/code&gt; 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' ) &amp;&amp; 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' ) &amp;&amp; @is_dir( WP_LANG_DIR ) )
+                        $locations[] = WP_LANG_DIR;
+
+                if ( defined( 'WP_CONTENT_DIR' ) &amp;&amp; @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-&gt;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-&gt;rtl_locales ) )
</del><ins>+                if ( self::is_locale_rtl( get_locale() ) )
</ins><span class="cx">                         $this-&gt;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-&gt;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 &lt;a href=&quot;%s&quot;&gt;%s&lt;/a&gt;.'/*/WP_I18N_BLOG_DOESNT_EXIST*/, $sites[0]-&gt;domain . $sites[0]-&gt;path ) );
</del><ins>+                wp_die( sprintf( __( 'That site does not exist. Please try &lt;a href=&quot;%s&quot;&gt;%s&lt;/a&gt;.' ), 'http://' . $sites[0]-&gt;domain . $sites[0]-&gt;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 &lt;a href=&quot;http://codex.wordpress.org/Debugging_a_WordPress_Network&quot;&gt;Debugging a WordPress Network&lt;/a&gt; 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 &lt;a href=&quot;http://codex.wordpress.org/Debugging_a_WordPress_Network&quot;&gt;Debugging a WordPress Network&lt;/a&gt; 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  = '&lt;h1&gt;' . $title . '&lt;/h1&gt;';
</span><span class="cx">         if ( ! is_admin() )
</span><span class="cx">                 die( $msg );
</span><del>-        $msg .= '&lt;p&gt;' . /*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*/ . '&lt;/p&gt;';
</del><ins>+        $msg .= '&lt;p&gt;' . __( '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.' ) . '&lt;/p&gt;';
</ins><span class="cx">         if ( false &amp;&amp; !$wpdb-&gt;get_var( &quot;SHOW TABLES LIKE '$wpdb-&gt;site'&quot; ) )
</span><del>-                $msg .= '&lt;p&gt;' . sprintf( /*WP_I18N_TABLES_MISSING_LONG*/'&lt;strong&gt;Database tables are missing.&lt;/strong&gt; This means that MySQL is not running, WordPress was not installed properly, or someone deleted &lt;code&gt;%s&lt;/code&gt;. You really should look at your database now.'/*/WP_I18N_TABLES_MISSING_LONG*/, $wpdb-&gt;site ) . '&lt;/p&gt;';
</del><ins>+                $msg .= '&lt;p&gt;' . sprintf( __( '&lt;strong&gt;Database tables are missing.&lt;/strong&gt; This means that MySQL is not running, WordPress was not installed properly, or someone deleted &lt;code&gt;%s&lt;/code&gt;. You really should look at your database now.' ), $wpdb-&gt;site ) . '&lt;/p&gt;';
</ins><span class="cx">         else
</span><del>-                $msg .= '&lt;p&gt;' . sprintf( /*WP_I18N_NO_SITE_FOUND*/'&lt;strong&gt;Could not find site &lt;code&gt;%1$s&lt;/code&gt;.&lt;/strong&gt; Searched for table &lt;code&gt;%2$s&lt;/code&gt; in database &lt;code&gt;%3$s&lt;/code&gt;. Is that right?'/*/WP_I18N_NO_SITE_FOUND*/, rtrim( $domain . $path, '/' ), $wpdb-&gt;blogs, DB_NAME ) . '&lt;/p&gt;';
-        $msg .= '&lt;p&gt;&lt;strong&gt;' . /*WP_I18N_WHAT_DO_I_DO*/'What do I do now?'/*/WP_I18N_WHAT_DO_I_DO*/ . '&lt;/strong&gt; ';
-        $msg .= /*WP_I18N_RTFM*/'Read the &lt;a target=&quot;_blank&quot; href=&quot;http://codex.wordpress.org/Debugging_a_WordPress_Network&quot;&gt;bug report&lt;/a&gt; page. Some of the guidelines there may help you figure out what went wrong.'/*/WP_I18N_RTFM*/;
-        $msg .= ' ' . /*WP_I18N_STUCK*/'If you&amp;#8217;re still stuck with this message, then check that your database contains the following tables:'/*/WP_I18N_STUCK*/ . '&lt;/p&gt;&lt;ul&gt;';
</del><ins>+                $msg .= '&lt;p&gt;' . sprintf( __( '&lt;strong&gt;Could not find site &lt;code&gt;%1$s&lt;/code&gt;.&lt;/strong&gt; Searched for table &lt;code&gt;%2$s&lt;/code&gt; in database &lt;code&gt;%3$s&lt;/code&gt;. Is that right?' ), rtrim( $domain . $path, '/' ), $wpdb-&gt;blogs, DB_NAME ) . '&lt;/p&gt;';
+        $msg .= '&lt;p&gt;&lt;strong&gt;' . __( 'What do I do now?' ) . '&lt;/strong&gt; ';
+        $msg .= __( 'Read the &lt;a target=&quot;_blank&quot; href=&quot;http://codex.wordpress.org/Debugging_a_WordPress_Network&quot;&gt;bug report&lt;/a&gt; page. Some of the guidelines there may help you figure out what went wrong.' );
+        $msg .= ' ' . __( 'If you&amp;#8217;re still stuck with this message, then check that your database contains the following tables:' ) . '&lt;/p&gt;&lt;ul&gt;';
</ins><span class="cx">         foreach ( $wpdb-&gt;tables('global') as $t =&gt; $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-&gt;blog_id = $blog_id = 1;
</span><span class="cx">                 } else {
</span><del>-                        $msg = ! $wpdb-&gt;get_var( &quot;SHOW TABLES LIKE '$wpdb-&gt;site'&quot; ) ? ' ' . /*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-&gt;get_var( &quot;SHOW TABLES LIKE '$wpdb-&gt;site'&quot; ) ? ' ' . __( '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-&gt;ready = false;
</span><del>-                        $this-&gt;bail( sprintf( /*WP_I18N_DB_SELECT_DB*/'&lt;h1&gt;Can&amp;#8217;t select database&lt;/h1&gt;
</del><ins>+                        wp_load_translations_early();
+                        $this-&gt;bail( sprintf( __( '&lt;h1&gt;Can&amp;#8217;t select database&lt;/h1&gt;
</ins><span class="cx"> &lt;p&gt;We were able to connect to the database server (which means your username and password is okay) but not able to select the &lt;code&gt;%1$s&lt;/code&gt; database.&lt;/p&gt;
</span><span class="cx"> &lt;ul&gt;
</span><span class="cx"> &lt;li&gt;Are you sure it exists?&lt;/li&gt;
</span><span class="cx"> &lt;li&gt;Does the user &lt;code&gt;%2$s&lt;/code&gt; have permission to use the &lt;code&gt;%1$s&lt;/code&gt; database?&lt;/li&gt;
</span><span class="cx"> &lt;li&gt;On some systems the name of your database is prefixed with your username, so it would be like &lt;code&gt;username_%1$s&lt;/code&gt;. Could that be the problem?&lt;/li&gt;
</span><span class="cx"> &lt;/ul&gt;
</span><del>-&lt;p&gt;If you don\'t know how to set up a database you should &lt;strong&gt;contact your host&lt;/strong&gt;. If all else fails you may find help at the &lt;a href=&quot;http://wordpress.org/support/&quot;&gt;WordPress Support Forums&lt;/a&gt;.&lt;/p&gt;'/*/WP_I18N_DB_SELECT_DB*/, $db, $this-&gt;dbuser ), 'db_select_fail' );
</del><ins>+&lt;p&gt;If you don\'t know how to set up a database you should &lt;strong&gt;contact your host&lt;/strong&gt;. If all else fails you may find help at the &lt;a href=&quot;http://wordpress.org/support/&quot;&gt;WordPress Support Forums&lt;/a&gt;.&lt;/p&gt;' ), $db, $this-&gt;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-&gt;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-&gt;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-&gt;last_query, $caller );
</del><ins>+                        $error_str = sprintf( __( 'WordPress database error %1$s for query %2$s made by %3$s' ), $str, $this-&gt;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-&gt;last_query );
</del><ins>+                        $error_str = sprintf( __( 'WordPress database error %1$s for query %2$s' ), $str, $this-&gt;last_query );
</ins><span class="cx"> 
</span><span class="cx">                 if ( function_exists( 'error_log' )
</span><span class="cx">                         &amp;&amp; ( $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-&gt;dbh ) {
</span><del>-                        $this-&gt;bail( sprintf( /*WP_I18N_DB_CONN_ERROR*/&quot;
</del><ins>+                        wp_load_translations_early();
+                        $this-&gt;bail( sprintf( __( &quot;
</ins><span class="cx"> &lt;h1&gt;Error establishing a database connection&lt;/h1&gt;
</span><span class="cx"> &lt;p&gt;This either means that the username and password information in your &lt;code&gt;wp-config.php&lt;/code&gt; file is incorrect or we can't contact the database server at &lt;code&gt;%s&lt;/code&gt;. This could mean your host's database server is down.&lt;/p&gt;
</span><span class="cx"> &lt;ul&gt;
</span><span class="lines">@@ -1046,7 +1050,7 @@
</span><span class="cx">         &lt;li&gt;Are you sure that the database server is running?&lt;/li&gt;
</span><span class="cx"> &lt;/ul&gt;
</span><span class="cx"> &lt;p&gt;If you're unsure what these terms mean you should probably contact your host. If you still need help you can always visit the &lt;a href='http://wordpress.org/support/'&gt;WordPress Support Forums&lt;/a&gt;.&lt;/p&gt;
</span><del>-&quot;/*/WP_I18N_DB_CONN_ERROR*/, $this-&gt;dbhost ), 'db_connect_fail' );
</del><ins>+&quot; ), $this-&gt;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-&gt;flush();
</span><span class="lines">@@ -1326,7 +1329,7 @@
</span><span class="cx">                 } elseif ( $output == ARRAY_N ) {
</span><span class="cx">                         return $this-&gt;last_result[$y] ? array_values( get_object_vars( $this-&gt;last_result[$y] ) ) : null;
</span><span class="cx">                 } else {
</span><del>-                        $this-&gt;print_error(/*WP_I18N_DB_GETROW_ERROR*/&quot; \$db-&gt;get_row(string query, output type, int offset) -- Output type must be one of: OBJECT, ARRAY_A, ARRAY_N&quot;/*/WP_I18N_DB_GETROW_ERROR*/);
</del><ins>+                        $this-&gt;print_error( &quot; \$db-&gt;get_row(string query, output type, int offset) -- Output type must be one of: OBJECT, ARRAY_A, ARRAY_N&quot; );
</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*/&quot;&lt;p&gt;There doesn't seem to be a &lt;code&gt;wp-config.php&lt;/code&gt; file. I need this before we can get started.&lt;/p&gt; &lt;p&gt;Need more help? &lt;a href='http://codex.wordpress.org/Editing_wp-config.php'&gt;We got it&lt;/a&gt;.&lt;/p&gt; &lt;p&gt;You can create a &lt;code&gt;wp-config.php&lt;/code&gt; file through a web interface, but this doesn't work for all server setups. The safest way is to manually create the file.&lt;/p&gt;&lt;p&gt;&lt;a href='%ssetup-config.php' class='button'&gt;Create a Configuration File&lt;/a&gt;&lt;/p&gt;&quot;/*/WP_I18N_NO_CONFIG*/, $path), /*WP_I18N_ERROR_TITLE*/'WordPress &amp;rsaquo; Error'/*/WP_I18N_ERROR_TITLE*/, array('text_direction' =&gt; $text_direction));
</del><ins>+        $die  = '&lt;p&gt;' . __( &quot;There doesn't seem to be a &lt;code&gt;wp-config.php&lt;/code&gt; file. I need this before we can get started.&quot; ) . '&lt;/p&gt;';
+        $die .= '&lt;p&gt;' . __( &quot;Need more help? &lt;a href='http://codex.wordpress.org/Editing_wp-config.php'&gt;We got it&lt;/a&gt;.&quot; ) . '&lt;/p&gt;';
+        $die .= '&lt;p&gt;' . __( &quot;You can create a &lt;code&gt;wp-config.php&lt;/code&gt; file through a web interface, but this doesn't work for all server setups. The safest way is to manually create the file.&quot; ) . '&lt;/p&gt;';
+        $die .= '&lt;p&gt;&lt;a href=&quot;' . $path . '&quot; class=&quot;button&quot;&gt;' . __( &quot;Create a Configuration File&quot; ) . '&lt;/a&gt;&lt;/p&gt;';
</ins><span class="cx"> 
</span><ins>+        wp_die( $die, __( 'WordPress &amp;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>