WordPress.org

Make WordPress Core

Ticket #11644: 11644.no-i18n.diff

File 11644.no-i18n.diff, 3.1 KB (added by nacin, 4 years ago)
  • functions.php

     
    18231823        $tables = $wpdb->get_col('SHOW TABLES'); 
    18241824        $wpdb->suppress_errors( $suppress ); 
    18251825 
    1826         $wp_tables = $wpdb->tables( 'all', true ); 
     1826        $wp_tables = $wpdb->tables( 'all' ); 
    18271827        // Loop over the WP tables.  If none exist, then scratch install is allowed. 
    18281828        // If one or more exist, suggest table repair since we got here because the options 
    18291829        // table could not be accessed. 
     
    18341834                        if ( defined('WP_REPAIRING') ) 
    18351835                                return true; 
    18361836                        // Die with a DB error. 
    1837                         $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>.'); 
     1837                        if ( function_exists( '__' ) ) 
     1838                                $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>.'); 
     1839                        else 
     1840                                $wpdb->error = /*WP_I18N_DEAD_DB*/'One or more database tables are unavailable. The database may need to be <a href="maint/repair.php?referrer=is_blog_installed">repaired</a>.'/*/WP_I18N_DEAD_DB*/; 
    18381841                        dead_db(); 
    18391842                } 
    18401843        } 
  • load.php

     
    382382function wp_not_installed() { 
    383383        if ( is_multisite() ) { 
    384384                if ( ! is_blog_installed() && ! defined( 'WP_INSTALLING' ) ) 
    385                         wp_die( __( 'The blog you have requested is not installed properly. Please contact the system administrator.' ) ); 
     385                        wp_die( /*WP_I18N_MS_NOT_INSTALLED*/'The blog you have requested is not installed properly. Please contact the system administrator.'/*/WP_I18N_MS_NOT_INSTALLED*/ ); 
    386386        } elseif ( ! is_blog_installed() && false === strpos( $_SERVER['PHP_SELF'], 'install.php' ) && !defined( 'WP_INSTALLING' ) ) { 
    387387                if ( defined( 'WP_SITEURL' ) ) 
    388388                        $link = WP_SITEURL . '/wp-admin/install.php'; 
  • ms-load.php

     
    180180 * 
    181181 * Used when blog does not exist. Checks for a missing $wpdb->site table as well. 
    182182 * 
     183 * @todo We don't have i18n here 
    183184 * @access private 
    184185 * @since 3.0.0 
    185186 */ 
  • ms-settings.php

     
    110110        if ( defined( 'WP_INSTALLING' ) ) { 
    111111                $current_blog->blog_id = $blog_id = 1; 
    112112    } else { 
    113                 $msg = ! $wpdb->get_var( "SHOW TABLES LIKE '$wpdb->site'" ) ? ' ' . __( 'Database tables are missing.' ) : ''; 
    114                 wp_die( __( 'No blog by that name on this system.' ) . $msg ); 
     113                // No i18n yet. 
     114                $msg = ! $wpdb->get_var( "SHOW TABLES LIKE '$wpdb->site'" ) ? ' ' . /*WP_I18N_NO_MS_TABLES*/'Database tables are missing.'/*/WP_I18N_NO_MS_TABLES*/ : ''; 
     115                wp_die( /*WP_I18N_NO_BLOG*/'No blog by that name on this system.'/*/WP_I18N_NO_BLOG*/ . $msg ); 
    115116    } 
    116117} 
    117118