<!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" /><style type="text/css"><!--
#msg dl { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer { 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 #fc0 solid; padding: 6px; }
#msg ul, pre { overflow: auto; }
#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>
<title>[13797] trunk/wp-includes:
Wrap transtable strings used in Network install in WP_I18N_SOMETHING,
because translations still aren't loaded.</title>
</head>
<body>
<div id="msg">
<dl>
<dt>Revision</dt> <dd><a href="http://trac.wordpress.org/changeset/13797">13797</a></dd>
<dt>Author</dt> <dd>nbachiyski</dd>
<dt>Date</dt> <dd>2010-03-22 06:51:49 +0000 (Mon, 22 Mar 2010)</dd>
</dl>
<h3>Log Message</h3>
<pre>Wrap transtable strings used in Network install in WP_I18N_SOMETHING, because translations still aren't loaded. Fixes <a href="http://trac.wordpress.org/ticket/12357">#12357</a></pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkwpincludesfunctionsphp">trunk/wp-includes/functions.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>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkwpincludesfunctionsphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/functions.php (13796 => 13797)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/functions.php        2010-03-22 06:02:04 UTC (rev 13796)
+++ trunk/wp-includes/functions.php        2010-03-22 06:51:49 UTC (rev 13797)
</span><span class="lines">@@ -1831,7 +1831,7 @@
</span><span class="cx">                         if ( defined('WP_REPAIRING') )
</span><span class="cx">                                 return true;
</span><span class="cx">                         // Die with a DB error.
</span><del>-                        $wpdb->error = __('One or more database tables are unavailable. The database may need to be <a href="maint/repair.php?referrer=is_blog_installed">repaired</a>.');
</del><ins>+                        $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' );
</ins><span class="cx">                         dead_db();
</span><span class="cx">                 }
</span><span class="cx">         }
</span><span class="lines">@@ -4081,5 +4081,4 @@
</span><span class="cx"> */
</span><span class="cx"> function __return_false() {
</span><span class="cx">         return false;
</span><del>-}
-?>
</del><ins>+}
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkwpincludesmsloadphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/ms-load.php (13796 => 13797)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/ms-load.php        2010-03-22 06:02:04 UTC (rev 13796)
+++ trunk/wp-includes/ms-load.php        2010-03-22 06:51:49 UTC (rev 13797)
</span><span class="lines">@@ -43,7 +43,7 @@
</span><span class="cx">                         return WP_CONTENT_DIR . '/blog-deleted.php';
</span><span class="cx">                 } else {
</span><span class="cx">                         header( 'HTTP/1.1 410 Gone' );
</span><del>-                        wp_die( __( 'This user has elected to delete their account and the content is no longer available.' ) );
</del><ins>+                        wp_die( /*WP_I18N_USER_DELETED_BLOG*/'This user has elected to delete their account and the content is no longer available.'/*/WP_I18N_USER_DELETED_BLOG*/ );
</ins><span class="cx">                 }
</span><span class="cx">         }
</span><span class="cx">
</span><span class="lines">@@ -51,7 +51,7 @@
</span><span class="cx">                 if ( file_exists( WP_CONTENT_DIR . '/blog-inactive.php' ) )
</span><span class="cx">                         return WP_CONTENT_DIR . '/blog-inactive.php';
</span><span class="cx">                 else
</span><del>-                        wp_die( sprintf( __( 'This site has not been activated yet. If you are having problems activating your site, please contact <a href="mailto:%1$s">%1$s</a>.' ), str_replace( '@', ' AT ', get_site_option( 'admin_email', "support@{$current_site->domain}" ) ) ) );
</del><ins>+                        wp_die( sprintf( /*WP_I18N_BLOG_NOT_ACTIVATED*/'This site has not been activated yet. If you are having problems activating your site, please contact <a href="mailto:%1$s">%1$s</a>.'/*/WP_I18N_BLOG_NOT_ACTIVATED*/, str_replace( '@', ' AT ', get_site_option( 'admin_email', "support@{$current_site->domain}" ) ) ) );
</ins><span class="cx">         }
</span><span class="cx">
</span><span class="cx">         if ( $current_blog->archived == '1' || $current_blog->spam == '1' ) {
</span><span class="lines">@@ -59,7 +59,7 @@
</span><span class="cx">                         return WP_CONTENT_DIR . '/blog-suspended.php';
</span><span class="cx">                 } else {
</span><span class="cx">                         header( 'HTTP/1.1 410 Gone' );
</span><del>-                        wp_die( __( 'This blog has been archived or suspended.' ) );
</del><ins>+                        wp_die( /*WP_I18N_ARCHIVED*/'This blog has been archived or suspended.'/*/WP_I18N_ARCHIVED*/ );
</ins><span class="cx">                 }
</span><span class="cx">         }
</span><span class="cx">
</span><span class="lines">@@ -172,9 +172,9 @@
</span><span class="cx">         // Still no dice.
</span><span class="cx">         // @todo Update or remove WPMU codex link.
</span><span class="cx">         if ( 1 == count( $sites ) )
</span><del>-                wp_die( sprintf( 'That blog does not exist. Please try <a href="%s">%s</a>.', $sites[0]->domain . $sites[0]->path ) );
</del><ins>+                wp_die( sprintf( /*WP_I18N_BLOG_DOESNT_EXIST*/'That blog does not exist. Please try <a href="%s">%s</a>.'/*/WP_I18N_BLOG_DOESNT_EXIST*/, $sites[0]->domain . $sites[0]->path ) );
</ins><span class="cx">         else
</span><del>-                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_WPMU">Debugging WPMU</a> for further assistance.' );
</del><ins>+                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_WPMU">Debugging WPMU</a> for further assistance.'/*/WP_I18N_NO_SITE_DEFINED*/ );
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> /**
</span><span class="lines">@@ -190,25 +190,23 @@
</span><span class="cx"> function ms_not_installed() {
</span><span class="cx">         global $wpdb, $domain, $path;
</span><span class="cx">
</span><del>-        $msg = '<h1>' . 'Fatal Error' . '</h1>';
-        $msg .= '<p>' . 'If your site does not display, please contact the owner of this network.' . '</p>';
-        $msg .= '<p>' . 'If you are the owner of this network please check that MySQL is running properly and all tables are error free.' . '</p>';
-        if ( ! $wpdb->get_var( "SHOW TABLES LIKE '$wpdb->site'" ) )
-                $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 <em>should</em> look at your database now.', $wpdb->site ) . '</p>';
</del><ins>+        $msg = '<h1>' . /*WP_I18N_FATAL_ERROR*/'Fatal Error'/*/WP_I18N_FATAL_ERROR*/ . '</h1>';
+        $msg .= '<p>' . /*WP_I18N_CONTACT_OWNER*/'If your site does not display, please contact the owner of this network.'/*/WP_I18N_CONTACT_OWNER*/ . '</p>';
+        $msg .= '<p>' . /*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>';
+        if ( !$wpdb->get_var( "SHOW TABLES LIKE '$wpdb->site'" ) )
+                $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 <em>should</em> look at your database now.'/*/WP_I18N_TABLES_MISSING_LONG*/, $wpdb->site ) . '</p>';
</ins><span class="cx">         else
</span><del>-                $msg .= '<p>' . sprintf( '<strong>Could Not Find Site!</strong> Searched for table <em>%1$s</em> in <code>%2$s</code>. Is that right?', $domain . $path, DB_NAME, $wpdb->blogs ) . '</p>';
-        $msg .= '<h1>' . 'What do I do now?' . '</h1>';
</del><ins>+                $msg .= '<p>' . sprintf( /*WP_I18N_NO_SITE_FOUND*/'<strong>Could Not Find Site!</strong> Searched for table <em>%1$s</em> in <code>%2$s</code>. Is that right?'/*/WP_I18N_NO_SITE_FOUND*/, $domain . $path, DB_NAME, $wpdb->blogs ) . '</p>';
+        $msg .= '<h1>' . /*WP_I18N_WHAT_DO_I_DO*/'What do I do now?'/*WP_I18N_WHAT_DO_I_DO*/ . '</h1>';
</ins><span class="cx">         // @todo Update WPMU codex link.
</span><del>-        $msg .= '<p>' . 'Read the <a target="_blank" href="http://codex.wordpress.org/Debugging_WPMU">bug report</a> page. Some of the guidelines there may help you figure out what went wrong.' . '</p>';
-        $msg .= '<p>' . "If you're still stuck with this message, then check that your database contains the following tables:" . '</p><ul>';
</del><ins>+        $msg .= '<p>' . /*WP_I18N_RTFM*/'Read the <a target="_blank" href="http://codex.wordpress.org/Debugging_WPMU">bug report</a> page. Some of the guidelines there may help you figure out what went wrong.'/*/WP_I18N_RTFM*/ . '</p>';
+        $msg .= '<p>' . /*WP_I18N_STUCK*/"If you're still stuck with this message, then check that your database contains the following tables:"/*/WP_I18N_STUCK*/ . '</p><ul>';
</ins><span class="cx">         foreach ( $wpdb->global_tables as $table ) {
</span><span class="cx">                 $msg .= '<li>' . $wpdb->prefix . $table . '</li>';
</span><span class="cx">         }
</span><span class="cx">         $msg .= '</ul>';
</span><span class="cx">         // @todo Update WPMU codex link and support instructions.
</span><del>-        $msg .= '<p>' . 'If you suspect a problem please report it to the support forums but you must include the information asked for in the <a target="_blank" href="http://codex.wordpress.org/Debugging_WPMU">WPMU bug reporting guidelines</a>! ' . '</p>';
</del><ins>+        $msg .= '<p>' . /*WP_I18N_MS_FORUMS*/'If you suspect a problem please report it to the support forums but you must include the information asked for in the <a target="_blank" href="http://codex.wordpress.org/Debugging_WPMU">WPMU bug reporting guidelines</a>!'/*/WP_I18N_MS_FORUMS*/ . '</p>';
</ins><span class="cx">
</span><span class="cx">         die( $msg );
</span><del>-}
-
-?>
</del><ins>+}
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkwpincludesmssettingsphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/ms-settings.php (13796 => 13797)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/ms-settings.php        2010-03-22 06:02:04 UTC (rev 13796)
+++ trunk/wp-includes/ms-settings.php        2010-03-22 06:51:49 UTC (rev 13797)
</span><span class="lines">@@ -11,7 +11,7 @@
</span><span class="cx">
</span><span class="cx"> // $base sanity check.
</span><span class="cx"> if ( 'BASE' == $base )
</span><del>-        die( 'Configuration error in <code>wp-config.php</code>. <code>$base</code> is set to "BASE" when it should be the path like "/" or "/blogs/".' );
</del><ins>+        die( /*WP_I18N_BASE_ERROR*/'Configuration error in <code>wp-config.php</code>. <code>$base</code> is set to "BASE" when it should be the path like "/" or "/blogs/".'/*/WP_I18N_BASE_ERROR*/ );
</ins><span class="cx">
</span><span class="cx"> /** Include Multisite initialization functions */
</span><span class="cx"> require( ABSPATH . WPINC . '/ms-load.php' );
</span><span class="lines">@@ -31,7 +31,7 @@
</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( 'Multisite only works without the port number in the URL.' );
</del><ins>+                        wp_die( /*WP_I18N_NO_PORT_NUMBER*/'Multisite only works without the port number in the URL.'/*/WP_I18N_NO_PORT_NUMBER*/ );
</ins><span class="cx">                 }
</span><span class="cx">         }
</span><span class="cx">
</span><span class="lines">@@ -113,8 +113,8 @@
</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'" ) ? ' ' . __( 'Database tables are missing.' ) : '';
-                        wp_die( 'No blog by that name on this system.' . $msg );
</del><ins>+                        $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 blog by that name on this system.'/*/WP_I18N_NO_BLOG*/ . $msg );
</ins><span class="cx">                 }
</span><span class="cx">         }
</span><span class="cx"> }
</span><span class="lines">@@ -127,5 +127,3 @@
</span><span class="cx">
</span><span class="cx"> // Define upload directory constants
</span><span class="cx"> ms_upload_constants();
</span><del>-
-?>
</del></span></pre>
</div>
</div>
</body>
</html>