diff --git a/wp-includes/wp-db.php b/wp-includes/wp-db.php index 8eaa5391c3..593ece6992 100644 --- a/wp-includes/wp-db.php +++ b/wp-includes/wp-db.php @@ -317,16 +317,16 @@ class wpdb { $this->dbh = @mysql_connect($dbhost, $dbuser, $dbpassword, true); if (!$this->dbh) { - $this->bail(" + $this->bail(sprintf(/*WP_I18N_DB_CONN_ERROR*/"

Error establishing a database connection

-

This either means that the username and password information in your wp-config.php file is incorrect or we can't contact the database server at $dbhost. This could mean your host's database server is down.

+

This either means that the username and password information in your wp-config.php file is incorrect or we can't contact the database server at %s. This could mean your host's database server is down.

If you're unsure what these terms mean you should probably contact your host. If you still need help you can always visit the WordPress Support Forums.

-"); +"/*/WP_I18N_DB_CONN_ERROR*/, $dbhost)); return; } @@ -373,7 +373,7 @@ class wpdb { function set_prefix($prefix) { if ( preg_match('|[^a-z0-9_]|i', $prefix) ) - return new WP_Error('invalid_db_prefix', 'Invalid database prefix'); // No gettext here + return new WP_Error('invalid_db_prefix', /*WP_I18N_DB_BAD_PREFIX*/'Invalid database prefix'/*/WP_I18N_DB_BAD_PREFIX*/); $old_prefix = $this->prefix; $this->prefix = $prefix; @@ -404,15 +404,15 @@ class wpdb { function select($db) { if (!@mysql_select_db($db, $this->dbh)) { $this->ready = false; - $this->bail(" + $this->bail(sprintf(/*WP_I18N_DB_SELECT_DB*/'

Can’t select database

-

We were able to connect to the database server (which means your username and password is okay) but not able to select the $db database.

+

We were able to connect to the database server (which means your username and password is okay) but not able to select the %1$s database.

-

If you don't know how to setup a database you should contact your host. If all else fails you may find help at the WordPress Support Forums.

"); +

If you don\'t know how to setup a database you should contact your host. If all else fails you may find help at the WordPress Support Forums.

'/*/WP_I18N_DB_SELECT_DB*/, $db, DB_USER)); return; } } @@ -487,9 +487,10 @@ class wpdb { if ( $this->suppress_errors ) return false; - $error_str = "WordPress database error $str for query $this->last_query"; if ( $caller = $this->get_caller() ) - $error_str .= " made by $caller"; + $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); + else + $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); $log_error = true; if ( ! function_exists('error_log') ) @@ -745,7 +746,7 @@ class wpdb { } elseif ( $output == ARRAY_N ) { return $this->last_result[$y] ? array_values(get_object_vars($this->last_result[$y])) : null; } else { - $this->print_error(" \$db->get_row(string query, output type, int offset) -- Output type must be one of: OBJECT, ARRAY_A, ARRAY_N"); + $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*/); } } diff --git a/wp-load.php b/wp-load.php index 2773e8ee50..423edf54b4 100644 --- a/wp-load.php +++ b/wp-load.php @@ -43,7 +43,7 @@ if ( file_exists( ABSPATH . 'wp-config.php') ) { require_once( ABSPATH . '/wp-includes/classes.php' ); require_once( ABSPATH . '/wp-includes/functions.php' ); require_once( ABSPATH . '/wp-includes/plugin.php' ); - wp_die("There doesn't seem to be a wp-config.php file. I need this before we can get started. Need more help? We got it. You can create a wp-config.php file through a web interface, but this doesn't work for all server setups. The safest way is to manually create the file.

Create a Configuration File", "WordPress › Error"); + wp_die(sprintf(/*WP_I18N_NO_CONFIG*/"There doesn't seem to be a wp-config.php file. I need this before we can get started. Need more help? We got it. You can create a wp-config.php file through a web interface, but this doesn't work for all server setups. The safest way is to manually create the file.

Create a Configuration File"/*/WP_I18N_NO_CONFIG*/, $path), /*WP_I18N_ERROR_TITLE*/"WordPress › Error"/*/WP_I18N_ERROR_TITLE*/); } diff --git a/wp-settings.php b/wp-settings.php index e67dd9bf02..4da868c2bc 100644 --- a/wp-settings.php +++ b/wp-settings.php @@ -97,14 +97,14 @@ if ( empty($PHP_SELF) ) $_SERVER['PHP_SELF'] = $PHP_SELF = preg_replace("/(\?.*)?$/",'',$_SERVER["REQUEST_URI"]); if ( version_compare( '4.3', phpversion(), '>' ) ) { - die( 'Your server is running PHP version ' . phpversion() . ' but WordPress requires at least 4.3.' ); + die( /*WP_I18N_OLD_PHP*/'Your server is running PHP version ' . phpversion() . ' but WordPress requires at least 4.3.'/*/WP_I18N_OLD_PHP*/ ); } if ( !defined('WP_CONTENT_DIR') ) define( 'WP_CONTENT_DIR', ABSPATH . 'wp-content' ); // no trailing slash, full paths only - WP_CONTENT_URL is defined further down if ( !extension_loaded('mysql') && !file_exists(WP_CONTENT_DIR . '/db.php') ) - die( 'Your PHP installation appears to be missing the MySQL extension which is required by WordPress.' ); + die( /*WP_I18N_OLD_MYSQL*/'Your PHP installation appears to be missing the MySQL extension which is required by WordPress.'/*/WP_I18N_OLD_MYSQL*/ ); /** * timer_start() - PHP 4 standard microtime start capture @@ -212,7 +212,7 @@ if ( !empty($wpdb->error) ) $prefix = $wpdb->set_prefix($table_prefix); if ( is_wp_error($prefix) ) - wp_die('ERROR: $table_prefix in wp-config.php can only contain numbers, letters, and underscores.'); + wp_die(/*WP_I18N_BAD_PREFIX*/'ERROR: $table_prefix in wp-config.php can only contain numbers, letters, and underscores.'/*/WP_I18N_BAD_PREFIX*/); if ( file_exists(WP_CONTENT_DIR . '/object-cache.php') ) require_once (WP_CONTENT_DIR . '/object-cache.php');