Changeset 19760
- Timestamp:
- 01/26/2012 08:34:27 PM (13 years ago)
- Location:
- trunk
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/setup-config.php
r19701 r19760 42 42 /**#@-*/ 43 43 44 require_once(ABSPATH . WPINC . '/load.php'); 45 require_once(ABSPATH . WPINC . '/version.php'); 44 require(ABSPATH . WPINC . '/load.php'); 45 require(ABSPATH . WPINC . '/version.php'); 46 47 // Also loads functions.php, plugin.php, l10n.php, pomo/mo.php (all required by setup-config.php) 48 wp_load_translations_early(); 49 46 50 wp_check_php_mysql_versions(); 47 51 48 52 require_once(ABSPATH . WPINC . '/compat.php'); 49 require_once(ABSPATH . WPINC . '/functions.php');50 53 require_once(ABSPATH . WPINC . '/class-wp-error.php'); 51 54 52 if ( !file_exists(ABSPATH . 'wp-config-sample.php'))53 wp_die( 'Sorry, I need a wp-config-sample.php file to work from. Please re-upload this file from your WordPress installation.');55 if ( ! file_exists( ABSPATH . 'wp-config-sample.php' ) ) 56 wp_die( __( 'Sorry, I need a wp-config-sample.php file to work from. Please re-upload this file from your WordPress installation.' ) ); 54 57 55 58 $config_file = file(ABSPATH . 'wp-config-sample.php'); 56 59 57 60 // Check if wp-config.php has been created 58 if ( file_exists(ABSPATH . 'wp-config.php'))59 wp_die( "<p>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 <a href='install.php'>installing now</a>.</p>");61 if ( file_exists( ABSPATH . 'wp-config.php' ) ) 62 wp_die( '<p>' . sprintf( __( "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 <a href='%s'>installing now</a>." ), 'install.php' ) . '</p>' ); 60 63 61 64 // Check if wp-config.php exists above the root directory but is not part of another install 62 if (file_exists(ABSPATH . '../wp-config.php') && ! file_exists(ABSPATH . '../wp-settings.php')) 63 wp_die("<p>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 <a href='install.php'>installing now</a>.</p>"); 64 65 if (isset($_GET['step'])) 66 $step = $_GET['step']; 67 else 68 $step = 0; 65 if ( file_exists(ABSPATH . '../wp-config.php' ) && ! file_exists( ABSPATH . '../wp-settings.php' ) ) 66 wp_die( '<p>' . sprintf( __( "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 <a href='install.php'>installing now</a>."), 'install.php' ) . '</p>' ); 67 68 $step = isset( $_GET['step'] ) ? (int) $_GET['step'] : 0; 69 69 70 70 /** … … 83 83 <head> 84 84 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 85 <title> WordPress › Setup Configuration File</title>85 <title><?php _e( 'WordPress › Setup Configuration File' ); ?></title> 86 86 <link rel="stylesheet" href="css/install.css" type="text/css" /> 87 87 … … 97 97 ?> 98 98 99 <p> Welcome to WordPress. Before getting started, we need some information on the database. You will need to know the following items before proceeding.</p>99 <p><?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.' ) ?></p> 100 100 <ol> 101 <li> Database name</li>102 <li> Database username</li>103 <li> Database password</li>104 <li> Database host</li>105 <li> Table prefix (if you want to run more than one WordPress in a single database)</li>101 <li><?php _e( 'Database name' ); ?></li> 102 <li><?php _e( 'Database username' ); ?></li> 103 <li><?php _e( 'Database password' ); ?></li> 104 <li><?php _e( 'Database host' ); ?></li> 105 <li><?php _e( 'Table prefix (if you want to run more than one WordPress in a single database)' ); ?></li> 106 106 </ol> 107 <p><strong> 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 <code>wp-config-sample.php</code> in a text editor, fill in your information, and save it as <code>wp-config.php</code>. </strong></p>108 <p>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’re all ready… </p>109 110 <p class="step"><a href="setup-config.php?step=1<?php if ( isset( $_GET['noapi'] ) ) echo '&noapi'; ?>" class="button"> Let’s go!</a></p>107 <p><strong><?php _e( "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 <code>wp-config-sample.php</code> in a text editor, fill in your information, and save it as <code>wp-config.php</code>. </strong></p> 108 <p>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’re all ready…" ); ?></p> 109 110 <p class="step"><a href="setup-config.php?step=1<?php if ( isset( $_GET['noapi'] ) ) echo '&noapi'; ?>" class="button"><?php _e( 'Let’s go!' ); ?></a></p> 111 111 <?php 112 112 break; … … 116 116 ?> 117 117 <form method="post" action="setup-config.php?step=2"> 118 <p> Below you should enter your database connection details. If you're not sure about these, contact your host.</p>118 <p><?php _e( "Below you should enter your database connection details. If you're not sure about these, contact your host." ); ?></p> 119 119 <table class="form-table"> 120 120 <tr> 121 <th scope="row"><label for="dbname"> Database Name</label></th>121 <th scope="row"><label for="dbname"><?php _e( 'Database Name' ); ?></label></th> 122 122 <td><input name="dbname" id="dbname" type="text" size="25" value="wordpress" /></td> 123 <td> The name of the database you want to run WP in.</td>124 </tr> 125 <tr> 126 <th scope="row"><label for="uname"> User Name</label></th>127 <td><input name="uname" id="uname" type="text" size="25" value=" username" /></td>128 <td> Your MySQL username</td>129 </tr> 130 <tr> 131 <th scope="row"><label for="pwd"> Password</label></th>132 <td><input name="pwd" id="pwd" type="text" size="25" value=" password" /></td>133 <td> ...and your MySQL password.</td>134 </tr> 135 <tr> 136 <th scope="row"><label for="dbhost"> Database Host</label></th>123 <td><?php _e( 'The name of the database you want to run WP in.' ); ?></td> 124 </tr> 125 <tr> 126 <th scope="row"><label for="uname"><?php _e( 'User Name' ); ?></label></th> 127 <td><input name="uname" id="uname" type="text" size="25" value="<?php echo htmlspecialchars( _x( 'username', 'example username' ), ENT_QUOTES ); ?>" /></td> 128 <td><?php _e( 'Your MySQL username' ); ?></td> 129 </tr> 130 <tr> 131 <th scope="row"><label for="pwd"><?php _e( 'Password' ); ?></label></th> 132 <td><input name="pwd" id="pwd" type="text" size="25" value="<?php echo htmlspecialchars( _x( 'password', 'example password' ), ENT_QUOTES ); ?>" /></td> 133 <td><?php _e( '…and your MySQL password.' ); ?></td> 134 </tr> 135 <tr> 136 <th scope="row"><label for="dbhost"><?php _e( 'Database Host' ); ?></label></th> 137 137 <td><input name="dbhost" id="dbhost" type="text" size="25" value="localhost" /></td> 138 <td> You should be able to get this info from your web host, if <code>localhost</code> does not work.</td>139 </tr> 140 <tr> 141 <th scope="row"><label for="prefix"> Table Prefix</label></th>138 <td><?php _e( 'You should be able to get this info from your web host, if <code>localhost</code> does not work.' ); ?></td> 139 </tr> 140 <tr> 141 <th scope="row"><label for="prefix"><?php _e( 'Table Prefix' ); ?></label></th> 142 142 <td><input name="prefix" id="prefix" type="text" value="wp_" size="25" /></td> 143 <td> If you want to run multiple WordPress installations in a single database, change this.</td>143 <td><?php _e( 'If you want to run multiple WordPress installations in a single database, change this.' ); ?></td> 144 144 </tr> 145 145 </table> 146 <?php if ( isset( $_GET['noapi'] ) ) { ?><input name="noapi" type="hidden" value=" true" /><?php } ?>147 <p class="step"><input name="submit" type="submit" value=" Submit" class="button" /></p>146 <?php if ( isset( $_GET['noapi'] ) ) { ?><input name="noapi" type="hidden" value="1" /><?php } ?> 147 <p class="step"><input name="submit" type="submit" value="<?php echo htmlspecialchars( __( 'Submit' ), ENT_QUOTES ); ?>" class="button" /></p> 148 148 </form> 149 149 <?php … … 161 161 // Validate $prefix: it can only contain letters, numbers and underscores 162 162 if ( preg_match( '|[^a-z0-9_]|i', $prefix ) ) 163 wp_die( /*WP_I18N_BAD_PREFIX*/'<strong>ERROR</strong>: "Table Prefix" can only contain numbers, letters, and underscores.'/*/WP_I18N_BAD_PREFIX*/);163 wp_die( __( '<strong>ERROR</strong>: "Table Prefix" can only contain numbers, letters, and underscores.' ) ); 164 164 165 165 // Test the db connection. … … 176 176 require_wp_db(); 177 177 if ( ! empty( $wpdb->error ) ) { 178 $back = '<p class="step"><a href="setup-config.php?step=1" onclick="javascript:history.go(-1);return false;" class="button"> Try Again</a></p>';178 $back = '<p class="step"><a href="setup-config.php?step=1" onclick="javascript:history.go(-1);return false;" class="button">' . __( 'Try Again' ) . '</a></p>'; 179 179 wp_die( $wpdb->error->get_error_message() . $back ); 180 180 } … … 182 182 // Fetch or generate keys and salts. 183 183 $no_api = isset( $_POST['noapi'] ); 184 require_once( ABSPATH . WPINC . '/plugin.php' );185 require_once( ABSPATH . WPINC . '/l10n.php' );186 require_once( ABSPATH . WPINC . '/pomo/translations.php' );187 184 if ( ! $no_api ) { 188 185 require_once( ABSPATH . WPINC . '/class-http.php' ); … … 249 246 display_header(); 250 247 ?> 251 <p> Sorry, but I can't write the <code>wp-config.php</code> file.</p>252 <p> You can create the <code>wp-config.php</code> manually and paste the following text into it.</p>248 <p><?php _e( "Sorry, but I can't write the <code>wp-config.php</code> file." ); ?></p> 249 <p><?php _e( 'You can create the <code>wp-config.php</code> manually and paste the following text into it.' ); ?></p> 253 250 <textarea cols="98" rows="15" class="code"><?php 254 251 foreach( $config_file as $line ) { … … 256 253 } 257 254 ?></textarea> 258 <p> After you've done that, click "Run the install."</p>259 <p class="step"><a href="install.php" class="button"> Run the install</a></p>255 <p><?php _e( 'After you\'ve done that, click "Run the install."' ); ?></p> 256 <p class="step"><a href="install.php" class="button"><?php _e( 'Run the install' ); ?></a></p> 260 257 <?php 261 258 else : … … 268 265 display_header(); 269 266 ?> 270 <p> 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…</p>271 272 <p class="step"><a href="install.php" class="button"> Run the install</a></p>267 <p><?php _e( "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…" ); ?></p> 268 269 <p class="step"><a href="install.php" class="button"><?php _e( 'Run the install' ); ?></a></p> 273 270 <?php 274 271 endif; -
trunk/wp-includes/functions.php
r19712 r19760 1202 1202 // One or more tables exist. We are insane. 1203 1203 1204 wp_load_translations_early(); 1205 1204 1206 // Die with a DB error. 1205 $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' );1207 $wpdb->error = sprintf( __( 'One or more database tables are unavailable. The database may need to be <a href="%s">repaired</a>.' ), 'maint/repair.php?referrer=is_blog_installed' ); 1206 1208 dead_db(); 1207 1209 } … … 2648 2650 nocache_headers(); 2649 2651 header( 'Content-Type: text/html; charset=utf-8' ); 2652 2653 wp_load_translations_early(); 2650 2654 ?> 2651 2655 <!DOCTYPE html> … … 2653 2657 <head> 2654 2658 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 2655 <title><?php echo /*WP_I18N_DB_ERROR*/'Database Error'/*/WP_I18N_DB_ERROR*/; ?></title>2659 <title><?php _e( 'Database Error' ); ?></title> 2656 2660 2657 2661 </head> 2658 2662 <body> 2659 <h1><?php echo /*WP_I18N_DB_CONNECTION_ERROR*/'Error establishing a database connection'/*/WP_I18N_DB_CONNECTION_ERROR*/; ?></h1>2663 <h1><?php _e( 'Error establishing a database connection' ); ?></h1> 2660 2664 </body> 2661 2665 </html> -
trunk/wp-includes/load.php
r19712 r19760 20 20 21 21 if ( isset( $_REQUEST['GLOBALS'] ) ) 22 die( /*WP_I18N_GLOBALS_OVERWRITE*/'GLOBALS overwrite attempt detected'/*/WP_I18N_GLOBALS_OVERWRITE*/);22 die( 'GLOBALS overwrite attempt detected' ); 23 23 24 24 // Variables that shouldn't be unset … … 98 98 * Dies if requirements are not met. 99 99 * 100 * This function must be able to work without a complete environment set up. In wp-load.php, for101 * example, WP_CONTENT_DIR is defined and version.php is included before this function is called.102 *103 100 * @access private 104 101 * @since 3.0.0 105 102 */ 106 103 function wp_check_php_mysql_versions() { 107 // we can probably extend this function to check if wp_die() exists then use translated strings, and then use it in install.php etc.108 109 104 global $required_php_version, $wp_version; 110 105 $php_version = phpversion(); 111 if ( version_compare( $required_php_version, $php_version, '>' ) ) 112 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 ) ); 113 114 if ( !extension_loaded( 'mysql' ) && !file_exists( WP_CONTENT_DIR . '/db.php' ) ) 115 die( /*WP_I18N_OLD_MYSQL*/'Your PHP installation appears to be missing the MySQL extension which is required by WordPress.'/*/WP_I18N_OLD_MYSQL*/ ); 106 if ( version_compare( $required_php_version, $php_version, '>' ) ) { 107 wp_load_translations_early(); 108 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 ) ); 109 } 110 111 if ( ! extension_loaded( 'mysql' ) && ! file_exists( WP_CONTENT_DIR . '/db.php' ) ) { 112 wp_load_translations_early(); 113 wp_die( __( 'Your PHP installation appears to be missing the MySQL extension which is required by WordPress.' ) ); 114 } 116 115 } 117 116 … … 159 158 die(); 160 159 } 160 161 wp_load_translations_early(); 161 162 162 163 $protocol = $_SERVER["SERVER_PROTOCOL"]; … … 171 172 <head> 172 173 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 173 <title><?php echo /*WP_I18N_MAINTENANCE*/'Maintenance'/*/WP_I18N_MAINTENANCE*/; ?></title>174 <title><?php _e( 'Maintenance' ); ?></title> 174 175 175 176 </head> 176 177 <body> 177 <h1><?php echo /*WP_I18N_MAINT_MSG*/'Briefly unavailable for scheduled maintenance. Check back in a minute.'/*/WP_I18N_MAINT_MSG*/; ?></h1>178 <h1><?php _e( 'Briefly unavailable for scheduled maintenance. Check back in a minute.' ); ?></h1> 178 179 </body> 179 180 </html> … … 365 366 $prefix = $wpdb->set_prefix( $table_prefix ); 366 367 367 if ( is_wp_error( $prefix ) ) 368 wp_die( /*WP_I18N_BAD_PREFIX*/'<strong>ERROR</strong>: <code>$table_prefix</code> in <code>wp-config.php</code> can only contain numbers, letters, and underscores.'/*/WP_I18N_BAD_PREFIX*/ ); 368 if ( is_wp_error( $prefix ) ) { 369 wp_load_translations_early(); 370 wp_die( __( '<strong>ERROR</strong>: <code>$table_prefix</code> in <code>wp-config.php</code> can only contain numbers, letters, and underscores.' ) ); 371 } 369 372 } 370 373 … … 650 653 return false; 651 654 } 655 656 /** 657 * Attempts an early load of translations. 658 * 659 * Used for errors encountered during the initial loading process, before the locale has been 660 * properly detected and loaded. 661 * 662 * Designed for unusual load sequences (like setup-config.php) or for when the script will then 663 * terminate with an error, otherwise there is a risk that a file can be double-included. 664 * 665 * @since 3.4.0 666 * @access private 667 */ 668 function wp_load_translations_early() { 669 global $text_direction, $wp_locale; 670 671 static $loaded = false; 672 if ( $loaded ) 673 return; 674 $loaded = true; 675 676 if ( function_exists( 'did_action' ) && did_action( 'init' ) ) 677 return; 678 679 // We need $wp_local_package 680 require ABSPATH . WPINC . '/version.php'; 681 682 // Translation and localization 683 require_once ABSPATH . WPINC . '/pomo/mo.php'; 684 require_once ABSPATH . WPINC . '/l10n.php'; 685 require_once ABSPATH . WPINC . '/locale.php'; 686 687 // General libraries 688 require_once ABSPATH . WPINC . '/functions.php'; 689 require_once ABSPATH . WPINC . '/plugin.php'; 690 691 $locales = $locations = array(); 692 693 while ( true ) { 694 if ( defined( 'WPLANG' ) ) { 695 if ( '' == WPLANG ) 696 break; 697 $locales[] = WPLANG; 698 } 699 700 if ( isset( $wp_local_package ) ) 701 $locales[] = $wp_local_package; 702 703 if ( ! $locales ) 704 break; 705 706 if ( defined( 'WP_LANG_DIR' ) && @is_dir( WP_LANG_DIR ) ) 707 $locations[] = WP_LANG_DIR; 708 709 if ( defined( 'WP_CONTENT_DIR' ) && @is_dir( WP_CONTENT_DIR . '/languages' ) ) 710 $locations[] = WP_CONTENT_DIR . '/languages'; 711 712 if ( @is_dir( ABSPATH . 'wp-content/languages' ) ) 713 $locations[] = ABSPATH . 'wp-content/languages'; 714 715 if ( @is_dir( ABSPATH . WPINC . '/languages' ) ) 716 $locations[] = ABSPATH . WPINC . '/languages'; 717 718 if ( ! $locations ) 719 break; 720 721 $locations = array_unique( $locations ); 722 723 foreach ( $locales as $locale ) { 724 foreach ( $locations as $location ) { 725 if ( file_exists( $location . '/' . $locale . '.mo' ) ) { 726 load_textdomain( 'default', $location . '/' . $locale . '.mo' ); 727 if ( WP_Locale::is_locale_rtl( $locale ) ) 728 $text_direction = 'rtl'; 729 break 2; 730 } 731 } 732 } 733 734 break; 735 } 736 737 $wp_locale = new WP_Locale(); 738 } -
trunk/wp-includes/locale.php
r19755 r19760 88 88 * Locales which are known to be right-to-left. 89 89 */ 90 private $rtl_locales = array( 'ar', 'ckb', 'fa_IR', 'he_IL', 'ug_CN', 'dv', 'fa_AF', 'ha', 'ps', 'uz_UZ', 'yi' );90 private static $rtl_locales = array( 'ar', 'ckb', 'fa_IR', 'he_IL', 'ug_CN', 'dv', 'fa_AF', 'ha', 'ps', 'uz_UZ', 'yi' ); 91 91 92 92 /** … … 184 184 185 185 // Locale-specific tweaks 186 if ( in_array( get_locale(), $this->rtl_locales) )186 if ( self::is_locale_rtl( get_locale() ) ) 187 187 $this->text_direction = 'rtl'; 188 188 … … 334 334 } 335 335 336 public static function is_locale_rtl( $locale ) { 337 return in_array( $locale, self::$rtl_locales ); 338 } 336 339 } 337 340 -
trunk/wp-includes/ms-load.php
r19712 r19760 212 212 213 213 // Still no dice. 214 wp_load_translations_early(); 215 214 216 if ( 1 == count( $sites ) ) 215 wp_die( sprintf( /*WP_I18N_BLOG_DOESNT_EXIST*/'That site does not exist. Please try <a href="%s">%s</a>.'/*/WP_I18N_BLOG_DOESNT_EXIST*/,$sites[0]->domain . $sites[0]->path ) );217 wp_die( sprintf( __( 'That site does not exist. Please try <a href="%s">%s</a>.' ), 'http://' . $sites[0]->domain . $sites[0]->path ) ); 216 218 else 217 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_a_WordPress_Network">Debugging a WordPress Network</a> for help.'/*/WP_I18N_NO_SITE_DEFINED*/);219 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_a_WordPress_Network">Debugging a WordPress Network</a> for help.' ) ); 218 220 } 219 221 … … 229 231 global $wpdb, $domain, $path; 230 232 231 $title = /*WP_I18N_FATAL_ERROR*/'Error establishing database connection'/*/WP_I18N_FATAL_ERROR*/; 233 wp_load_translations_early(); 234 235 $title = __( 'Error establishing database connection' ); 232 236 $msg = '<h1>' . $title . '</h1>'; 233 237 if ( ! is_admin() ) 234 238 die( $msg ); 235 $msg .= '<p>' . /*WP_I18N_CONTACT_OWNER*/'If your site does not display, please contact the owner of this network.'/*/WP_I18N_CONTACT_OWNER*/. '';236 $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*/. '</p>';239 $msg .= '<p>' . __( 'If your site does not display, please contact the owner of this network.' ) . ''; 240 $msg .= ' ' . __( 'If you are the owner of this network please check that MySQL is running properly and all tables are error free.' ) . '</p>'; 237 241 if ( false && !$wpdb->get_var( "SHOW TABLES LIKE '$wpdb->site'" ) ) 238 $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 should look at your database now.'/*/WP_I18N_TABLES_MISSING_LONG*/, $wpdb->site ) . '</p>';242 $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 should look at your database now.' ), $wpdb->site ) . '</p>'; 239 243 else 240 $msg .= '<p>' . sprintf( /*WP_I18N_NO_SITE_FOUND*/'<strong>Could not find site <code>%1$s</code>.</strong> Searched for table <code>%2$s</code> in database <code>%3$s</code>. Is that right?'/*/WP_I18N_NO_SITE_FOUND*/, rtrim( $domain . $path, '/' ), $wpdb->blogs, DB_NAME ) . '</p>';241 $msg .= '<p><strong>' . /*WP_I18N_WHAT_DO_I_DO*/'What do I do now?'/*/WP_I18N_WHAT_DO_I_DO*/. '</strong> ';242 $msg .= /*WP_I18N_RTFM*/'Read the <a target="_blank" href="http://codex.wordpress.org/Debugging_a_WordPress_Network">bug report</a> page. Some of the guidelines there may help you figure out what went wrong.'/*/WP_I18N_RTFM*/;243 $msg .= ' ' . /*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>';244 $msg .= '<p>' . sprintf( __( '<strong>Could not find site <code>%1$s</code>.</strong> Searched for table <code>%2$s</code> in database <code>%3$s</code>. Is that right?' ), rtrim( $domain . $path, '/' ), $wpdb->blogs, DB_NAME ) . '</p>'; 245 $msg .= '<p><strong>' . __( 'What do I do now?' ) . '</strong> '; 246 $msg .= __( 'Read the <a target="_blank" href="http://codex.wordpress.org/Debugging_a_WordPress_Network">bug report</a> page. Some of the guidelines there may help you figure out what went wrong.' ); 247 $msg .= ' ' . __( 'If you’re still stuck with this message, then check that your database contains the following tables:' ) . '</p><ul>'; 244 248 foreach ( $wpdb->tables('global') as $t => $table ) { 245 249 if ( 'sitecategories' == $t ) -
trunk/wp-includes/ms-settings.php
r18568 r19760 32 32 $_SERVER['HTTP_HOST'] = substr( $_SERVER['HTTP_HOST'], 0, -4 ); 33 33 } else { 34 wp_die( /*WP_I18N_NO_PORT_NUMBER*/'Multisite only works without the port number in the URL.'/*/WP_I18N_NO_PORT_NUMBER*/ ); 34 wp_load_translations_early(); 35 wp_die( __( 'Multisite only works without the port number in the URL.' ) ); 35 36 } 36 37 } … … 117 118 $current_blog->blog_id = $blog_id = 1; 118 119 } else { 119 $msg = ! $wpdb->get_var( "SHOW TABLES LIKE '$wpdb->site'" ) ? ' ' . /*WP_I18N_TABLES_MISSING*/'Database tables are missing.'/*/WP_I18N_TABLES_MISSING*/ : ''; 120 wp_die( /*WP_I18N_NO_BLOG*/'No site by that name on this system.'/*/WP_I18N_NO_BLOG*/ . $msg ); 120 wp_load_translations_early(); 121 $msg = ! $wpdb->get_var( "SHOW TABLES LIKE '$wpdb->site'" ) ? ' ' . __( 'Database tables are missing.' ) : ''; 122 wp_die( __( 'No site by that name on this system.' ) . $msg ); 121 123 } 122 124 } -
trunk/wp-includes/wp-db.php
r19712 r19760 574 574 575 575 if ( preg_match( '|[^a-z0-9_]|i', $prefix ) ) 576 return new WP_Error('invalid_db_prefix', /*WP_I18N_DB_BAD_PREFIX*/'Invalid database prefix'/*/WP_I18N_DB_BAD_PREFIX*/);576 return new WP_Error('invalid_db_prefix', 'Invalid database prefix' ); 577 577 578 578 $old_prefix = is_multisite() ? '' : $prefix; … … 746 746 if ( !@mysql_select_db( $db, $dbh ) ) { 747 747 $this->ready = false; 748 $this->bail( sprintf( /*WP_I18N_DB_SELECT_DB*/'<h1>Can’t select database</h1> 748 wp_load_translations_early(); 749 $this->bail( sprintf( __( '<h1>Can’t select database</h1> 749 750 <p>We were able to connect to the database server (which means your username and password is okay) but not able to select the <code>%1$s</code> database.</p> 750 751 <ul> … … 753 754 <li>On some systems the name of your database is prefixed with your username, so it would be like <code>username_%1$s</code>. Could that be the problem?</li> 754 755 </ul> 755 <p>If you don\'t know how to set up a database you should <strong>contact your host</strong>. If all else fails you may find help at the <a href="http://wordpress.org/support/">WordPress Support Forums</a>.</p>' /*/WP_I18N_DB_SELECT_DB*/, $db, $this->dbuser ), 'db_select_fail' );756 <p>If you don\'t know how to set up a database you should <strong>contact your host</strong>. If all else fails you may find help at the <a href="http://wordpress.org/support/">WordPress Support Forums</a>.</p>' ), $db, $this->dbuser ), 'db_select_fail' ); 756 757 return; 757 758 } … … 924 925 return false; 925 926 927 wp_load_translations_early(); 928 926 929 if ( $caller = $this->get_caller() ) 927 $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->last_query, $caller );930 $error_str = sprintf( __( 'WordPress database error %1$s for query %2$s made by %3$s' ), $str, $this->last_query, $caller ); 928 931 else 929 $error_str = sprintf( /*WP_I18N_DB_QUERY_ERROR*/'WordPress database error %1$s for query %2$s'/*/WP_I18N_DB_QUERY_ERROR*/, $str, $this->last_query );932 $error_str = sprintf( __( 'WordPress database error %1$s for query %2$s' ), $str, $this->last_query ); 930 933 931 934 if ( function_exists( 'error_log' ) … … 1038 1041 1039 1042 if ( !$this->dbh ) { 1040 $this->bail( sprintf( /*WP_I18N_DB_CONN_ERROR*/" 1043 wp_load_translations_early(); 1044 $this->bail( sprintf( __( " 1041 1045 <h1>Error establishing a database connection</h1> 1042 1046 <p>This either means that the username and password information in your <code>wp-config.php</code> file is incorrect or we can't contact the database server at <code>%s</code>. This could mean your host's database server is down.</p> … … 1047 1051 </ul> 1048 1052 <p>If you're unsure what these terms mean you should probably contact your host. If you still need help you can always visit the <a href='http://wordpress.org/support/'>WordPress Support Forums</a>.</p> 1049 " /*/WP_I18N_DB_CONN_ERROR*/, $this->dbhost ), 'db_connect_fail' );1053 " ), $this->dbhost ), 'db_connect_fail' ); 1050 1054 1051 1055 return; … … 1074 1078 1075 1079 // some queries are made before the plugins have been loaded, and thus cannot be filtered with this method 1076 if ( function_exists( 'apply_filters' ) ) 1077 $query = apply_filters( 'query', $query ); 1080 $query = apply_filters( 'query', $query ); 1078 1081 1079 1082 $return_val = 0; … … 1327 1330 return $this->last_result[$y] ? array_values( get_object_vars( $this->last_result[$y] ) ) : null; 1328 1331 } else { 1329 $this->print_error( /*WP_I18N_DB_GETROW_ERROR*/" \$db->get_row(string query, output type, int offset) -- Output type must be one of: OBJECT, ARRAY_A, ARRAY_N"/*/WP_I18N_DB_GETROW_ERROR*/);1332 $this->print_error( " \$db->get_row(string query, output type, int offset) -- Output type must be one of: OBJECT, ARRAY_A, ARRAY_N" ); 1330 1333 } 1331 1334 } -
trunk/wp-load.php
r19712 r19760 40 40 // Set a path for the link to the installer 41 41 if ( strpos($_SERVER['PHP_SELF'], 'wp-admin') !== false ) 42 $path = ' ';42 $path = 'setup-config.php'; 43 43 else 44 $path = 'wp-admin/ ';44 $path = 'wp-admin/setup-config.php'; 45 45 46 require_once( ABSPATH . '/wp-includes/load.php' ); 47 require_once( ABSPATH . '/wp-includes/version.php' ); 46 define( 'WPINC', 'wp-includes' ); 48 47 define( 'WP_CONTENT_DIR', ABSPATH . 'wp-content' ); 49 define( 'WPINC', 'wp-includes' ); 48 require_once( ABSPATH . WPINC . '/load.php' ); 49 require_once( ABSPATH . WPINC . '/version.php' ); 50 51 wp_load_translations_early(); 50 52 wp_check_php_mysql_versions(); 51 53 52 54 // Die with an error message 53 require_once( ABSPATH . '/wp-includes/class-wp-error.php' ); 54 require_once( ABSPATH . '/wp-includes/functions.php' ); 55 require_once( ABSPATH . '/wp-includes/plugin.php' ); 56 $text_direction = /*WP_I18N_TEXT_DIRECTION*/'ltr'/*/WP_I18N_TEXT_DIRECTION*/; 57 wp_die(sprintf(/*WP_I18N_NO_CONFIG*/"<p>There doesn't seem to be a <code>wp-config.php</code> file. I need this before we can get started.</p> <p>Need more help? <a href='http://codex.wordpress.org/Editing_wp-config.php'>We got it</a>.</p> <p>You can create a <code>wp-config.php</code> file through a web interface, but this doesn't work for all server setups. The safest way is to manually create the file.</p><p><a href='%ssetup-config.php' class='button'>Create a Configuration File</a></p>"/*/WP_I18N_NO_CONFIG*/, $path), /*WP_I18N_ERROR_TITLE*/'WordPress › Error'/*/WP_I18N_ERROR_TITLE*/, array('text_direction' => $text_direction)); 55 $die = '<p>' . __( "There doesn't seem to be a <code>wp-config.php</code> file. I need this before we can get started." ) . '</p>'; 56 $die .= '<p>' . __( "Need more help? <a href='http://codex.wordpress.org/Editing_wp-config.php'>We got it</a>." ) . '</p>'; 57 $die .= '<p>' . __( "You can create a <code>wp-config.php</code> file through a web interface, but this doesn't work for all server setups. The safest way is to manually create the file." ) . '</p>'; 58 $die .= '<p><a href="' . $path . '" class="button">' . __( "Create a Configuration File" ) . '</a></p>'; 58 59 60 wp_die( $die, __( 'WordPress › Error' ) ); 59 61 } -
trunk/wp-settings.php
r19758 r19760 71 71 require( ABSPATH . WPINC . '/class-wp-error.php' ); 72 72 require( ABSPATH . WPINC . '/plugin.php' ); 73 require( ABSPATH . WPINC . '/pomo/mo.php' ); 73 74 74 75 // Include the wpdb class and, if present, a db.php database drop-in. … … 82 83 wp_start_object_cache(); 83 84 84 // Load early WordPress files.85 // Attach the default filters. 85 86 require( ABSPATH . WPINC . '/default-filters.php' ); 86 require( ABSPATH . WPINC . '/pomo/mo.php' );87 87 88 88 // Initialize multisite if enabled. … … 101 101 102 102 // Load the L10n library. 103 require ( ABSPATH . WPINC . '/l10n.php' );103 require_once( ABSPATH . WPINC . '/l10n.php' ); 104 104 105 105 // Run the installer if WordPress is not installed. … … 269 269 270 270 // Pull in locale data after loading text domain. 271 require ( ABSPATH . WPINC . '/locale.php' );271 require_once( ABSPATH . WPINC . '/locale.php' ); 272 272 273 273 /**
Note: See TracChangeset
for help on using the changeset viewer.