WordPress.org

Make WordPress Core

Ticket #12357: early-ms-i18n.diff

File early-ms-i18n.diff, 8.6 KB (added by nbachiyski, 5 years ago)
  • wp-includes/functions.php

     
    18311831                        if ( defined('WP_REPAIRING') ) 
    18321832                                return true; 
    18331833                        // Die with a DB error. 
    1834                         $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>.'); 
     1834                        $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' ); 
    18351835                        dead_db(); 
    18361836                } 
    18371837        } 
     
    40814081 */ 
    40824082function __return_false() { 
    40834083        return false; 
    4084 } 
    4085 ?> 
     4084} 
     4085 No newline at end of file 
  • wp-includes/ms-load.php

     
    4343                        return WP_CONTENT_DIR . '/blog-deleted.php'; 
    4444                } else { 
    4545                        header( 'HTTP/1.1 410 Gone' ); 
    46                         wp_die( __( 'This user has elected to delete their account and the content is no longer available.' ) ); 
     46                        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*/ ); 
    4747                } 
    4848        } 
    4949 
     
    5151                if ( file_exists( WP_CONTENT_DIR . '/blog-inactive.php' ) ) 
    5252                        return WP_CONTENT_DIR . '/blog-inactive.php'; 
    5353                else 
    54                         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}" ) ) ) ); 
     54                        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}" ) ) ) ); 
    5555        } 
    5656 
    5757        if ( $current_blog->archived == '1' || $current_blog->spam == '1' ) { 
     
    5959                        return WP_CONTENT_DIR . '/blog-suspended.php'; 
    6060                } else { 
    6161                        header( 'HTTP/1.1 410 Gone' ); 
    62                         wp_die( __( 'This blog has been archived or suspended.' ) ); 
     62                        wp_die( /*WP_I18N_ARCHIVED*/'This blog has been archived or suspended.'/*/WP_I18N_ARCHIVED*/ ); 
    6363                } 
    6464        } 
    6565 
     
    172172        // Still no dice. 
    173173        // @todo Update or remove WPMU codex link. 
    174174        if ( 1 == count( $sites ) ) 
    175                 wp_die( sprintf( 'That blog does not exist. Please try <a href="%s">%s</a>.', $sites[0]->domain . $sites[0]->path ) ); 
     175                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 ) ); 
    176176        else 
    177                 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.' ); 
     177                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*/ ); 
    178178} 
    179179 
    180180/** 
     
    190190function ms_not_installed() { 
    191191        global $wpdb, $domain, $path; 
    192192 
    193         $msg = '<h1>' . 'Fatal Error' . '</h1>'; 
    194         $msg .= '<p>' . 'If your site does not display, please contact the owner of this network.' . '</p>'; 
    195         $msg .= '<p>' . 'If you are the owner of this network please check that MySQL is running properly and all tables are error free.' . '</p>'; 
    196         if ( ! $wpdb->get_var( "SHOW TABLES LIKE '$wpdb->site'" ) ) 
    197                 $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>'; 
     193        $msg = '<h1>' . /*WP_I18N_FATAL_ERROR*/'Fatal Error'/*/WP_I18N_FATAL_ERROR*/ . '</h1>'; 
     194        $msg .= '<p>' . /*WP_I18N_CONTACT_OWNER*/'If your site does not display, please contact the owner of this network.'/*/WP_I18N_CONTACT_OWNER*/ . '</p>'; 
     195        $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>'; 
     196        if ( !$wpdb->get_var( "SHOW TABLES LIKE '$wpdb->site'" ) ) 
     197                $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>'; 
    198198        else 
    199                 $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>'; 
    200         $msg .= '<h1>' . 'What do I do now?' . '</h1>'; 
     199                $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>'; 
     200        $msg .= '<h1>' . /*WP_I18N_WHAT_DO_I_DO*/'What do I do now?'/*WP_I18N_WHAT_DO_I_DO*/ . '</h1>'; 
    201201        // @todo Update WPMU codex link. 
    202         $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>'; 
    203         $msg .= '<p>' . "If you're still stuck with this message, then check that your database contains the following tables:" . '</p><ul>'; 
     202        $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>'; 
     203        $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>'; 
    204204        foreach ( $wpdb->global_tables as $table ) { 
    205205                $msg .= '<li>' . $wpdb->prefix . $table . '</li>'; 
    206206        } 
    207207        $msg .= '</ul>'; 
    208208        // @todo Update WPMU codex link and support instructions. 
    209         $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>'; 
     209        $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>'; 
    210210 
    211211        die( $msg ); 
    212 } 
    213  
    214 ?> 
     212} 
     213 No newline at end of file 
  • wp-includes/ms-settings.php

     
    1111 
    1212// $base sanity check. 
    1313if ( 'BASE' == $base ) 
    14         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/".' ); 
     14        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*/ ); 
    1515 
    1616/** Include Multisite initialization functions */ 
    1717require( ABSPATH . WPINC . '/ms-load.php' ); 
     
    3131                        $domain = substr( $domain, 0, -4 ); 
    3232                        $_SERVER['HTTP_HOST'] = substr( $_SERVER['HTTP_HOST'], 0, -4 ); 
    3333                } else { 
    34                         wp_die( 'Multisite only works without the port number in the URL.' ); 
     34                        wp_die( /*WP_I18N_NO_PORT_NUMBER*/'Multisite only works without the port number in the URL.'/*/WP_I18N_NO_PORT_NUMBER*/ ); 
    3535                } 
    3636        } 
    3737 
     
    113113                if ( defined( 'WP_INSTALLING' ) ) { 
    114114                        $current_blog->blog_id = $blog_id = 1; 
    115115                } else { 
    116                         $msg = ! $wpdb->get_var( "SHOW TABLES LIKE '$wpdb->site'" ) ? ' ' . __( 'Database tables are missing.' ) : ''; 
    117                         wp_die( 'No blog by that name on this system.' . $msg ); 
     116                        $msg = ! $wpdb->get_var( "SHOW TABLES LIKE '$wpdb->site'" ) ? ' ' . /*WP_I18N_TABLES_MISSING*/'Database tables are missing.'/*/WP_I18N_TABLES_MISSING*/ ) : ''; 
     117                        wp_die( /*WP_I18N_NO_BLOG*/'No blog by that name on this system.'/*/WP_I18N_NO_BLOG*/ . $msg ); 
    118118                } 
    119119        } 
    120120} 
     
    126126wp_start_object_cache(); 
    127127 
    128128// Define upload directory constants 
    129 ms_upload_constants(); 
    130  
    131 ?> 
     129ms_upload_constants(); 
     130 No newline at end of file