From 7fcffb8d1284d766531ec0661b4285df9524f017 Mon Sep 17 00:00:00 2001 From: Nikolay Bachiyski Date: Mon, 22 Mar 2010 06:51:49 +0000 Subject: [PATCH] Wrap transtable strings used in Network install in WP_I18N_SOMETHING, because translations still aren't loaded. Fixes #12357 git-svn-id: https://develop.svn.wordpress.org/trunk@13797 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/functions.php | 5 ++--- wp-includes/ms-load.php | 34 ++++++++++++++++------------------ wp-includes/ms-settings.php | 10 ++++------ 3 files changed, 22 insertions(+), 27 deletions(-) diff --git a/wp-includes/functions.php b/wp-includes/functions.php index c5733fd82b..0993b7574d 100644 --- a/wp-includes/functions.php +++ b/wp-includes/functions.php @@ -1831,7 +1831,7 @@ function is_blog_installed() { if ( defined('WP_REPAIRING') ) return true; // Die with a DB error. - $wpdb->error = __('One or more database tables are unavailable. The database may need to be repaired.'); + $wpdb->error = sprintf( /*WP_I18N_NO_TABLES*/'One or more database tables are unavailable. The database may need to be repaired.'/*/WP_I18N_NO_TABLES*/, 'maint/repair.php?referrer=is_blog_installed' ); dead_db(); } } @@ -4081,5 +4081,4 @@ function __return_true() { */ function __return_false() { return false; -} -?> +} \ No newline at end of file diff --git a/wp-includes/ms-load.php b/wp-includes/ms-load.php index a909d8cfd2..c6c24f573a 100644 --- a/wp-includes/ms-load.php +++ b/wp-includes/ms-load.php @@ -43,7 +43,7 @@ function ms_site_check() { return WP_CONTENT_DIR . '/blog-deleted.php'; } else { header( 'HTTP/1.1 410 Gone' ); - wp_die( __( 'This user has elected to delete their account and the content is no longer available.' ) ); + 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*/ ); } } @@ -51,7 +51,7 @@ function ms_site_check() { if ( file_exists( WP_CONTENT_DIR . '/blog-inactive.php' ) ) return WP_CONTENT_DIR . '/blog-inactive.php'; else - wp_die( sprintf( __( 'This site has not been activated yet. If you are having problems activating your site, please contact %1$s.' ), str_replace( '@', ' AT ', get_site_option( 'admin_email', "support@{$current_site->domain}" ) ) ) ); + 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 %1$s.'/*/WP_I18N_BLOG_NOT_ACTIVATED*/, str_replace( '@', ' AT ', get_site_option( 'admin_email', "support@{$current_site->domain}" ) ) ) ); } if ( $current_blog->archived == '1' || $current_blog->spam == '1' ) { @@ -59,7 +59,7 @@ function ms_site_check() { return WP_CONTENT_DIR . '/blog-suspended.php'; } else { header( 'HTTP/1.1 410 Gone' ); - wp_die( __( 'This blog has been archived or suspended.' ) ); + wp_die( /*WP_I18N_ARCHIVED*/'This blog has been archived or suspended.'/*/WP_I18N_ARCHIVED*/ ); } } @@ -172,9 +172,9 @@ function wpmu_current_site() { // Still no dice. // @todo Update or remove WPMU codex link. if ( 1 == count( $sites ) ) - wp_die( sprintf( 'That blog does not exist. Please try %s.', $sites[0]->domain . $sites[0]->path ) ); + wp_die( sprintf( /*WP_I18N_BLOG_DOESNT_EXIST*/'That blog does not exist. Please try %s.'/*/WP_I18N_BLOG_DOESNT_EXIST*/, $sites[0]->domain . $sites[0]->path ) ); else - wp_die( 'No site defined on this host. If you are the owner of this site, please check Debugging WPMU for further assistance.' ); + wp_die( /*WP_I18N_NO_SITE_DEFINED*/'No site defined on this host. If you are the owner of this site, please check Debugging WPMU for further assistance.'/*/WP_I18N_NO_SITE_DEFINED*/ ); } /** @@ -190,25 +190,23 @@ function wpmu_current_site() { function ms_not_installed() { global $wpdb, $domain, $path; - $msg = '

' . 'Fatal Error' . '

'; - $msg .= '

' . '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.' . '

'; - if ( ! $wpdb->get_var( "SHOW TABLES LIKE '$wpdb->site'" ) ) - $msg .= '

' . sprintf( 'Database tables are missing. This means that MySQL is not running, WordPress was not installed properly, or someone deleted %s. You really should look at your database now.', $wpdb->site ) . '

'; + $msg = '

' . /*WP_I18N_FATAL_ERROR*/'Fatal Error'/*/WP_I18N_FATAL_ERROR*/ . '

'; + $msg .= '

' . /*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*/ . '

'; + if ( !$wpdb->get_var( "SHOW TABLES LIKE '$wpdb->site'" ) ) + $msg .= '

' . sprintf( /*WP_I18N_TABLES_MISSING_LONG*/'Database tables are missing. This means that MySQL is not running, WordPress was not installed properly, or someone deleted %s. You really should look at your database now.'/*/WP_I18N_TABLES_MISSING_LONG*/, $wpdb->site ) . '

'; else - $msg .= '

' . sprintf( 'Could Not Find Site! Searched for table %1$s in %2$s. Is that right?', $domain . $path, DB_NAME, $wpdb->blogs ) . '

'; - $msg .= '

' . 'What do I do now?' . '

'; + $msg .= '

' . sprintf( /*WP_I18N_NO_SITE_FOUND*/'Could Not Find Site! Searched for table %1$s in %2$s. Is that right?'/*/WP_I18N_NO_SITE_FOUND*/, $domain . $path, DB_NAME, $wpdb->blogs ) . '

'; + $msg .= '

' . /*WP_I18N_WHAT_DO_I_DO*/'What do I do now?'/*WP_I18N_WHAT_DO_I_DO*/ . '

'; // @todo Update WPMU codex link. - $msg .= '

' . 'Read the bug report page. Some of the guidelines there may help you figure out what went wrong.' . '

'; - $msg .= '

' . "If you're still stuck with this message, then check that your database contains the following tables:" . '