WordPress.org

Make WordPress Core

Ticket #7074: mark-not-gettexted-strings.diff

File mark-not-gettexted-strings.diff, 7.3 KB (added by nbachiyski, 10 years ago)
  • wp-load.php

     
    4343        require_once( ABSPATH . '/wp-includes/classes.php' );
    4444        require_once( ABSPATH . '/wp-includes/functions.php' );
    4545        require_once( ABSPATH . '/wp-includes/plugin.php' );
    46         wp_die("There doesn't seem to be a <code>wp-config.php</code> file. I need this before we can get started. Need more help? <a href='http://codex.wordpress.org/Editing_wp-config.php'>We got it</a>. 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='{$path}setup-config.php' class='button'>Create a Configuration File</a>", "WordPress &rsaquo; Error");
     46        wp_die(sprintf(/*WP_I18N_NO_CONFIG*/"There doesn't seem to be a <code>wp-config.php</code> file. I need this before we can get started. Need more help? <a href='http://codex.wordpress.org/Editing_wp-config.php'>We got it</a>. 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>"/*/WP_I18N_NO_CONFIG*/, $path), /*WP_I18N_ERROR_TITLE*/"WordPress &rsaquo; Error"/*/WP_I18N_ERROR_TITLE*/);
    4747
    4848}
    4949
  • wp-includes/wp-db.php

     
    317317
    318318                $this->dbh = @mysql_connect($dbhost, $dbuser, $dbpassword, true);
    319319                if (!$this->dbh) {
    320                         $this->bail("
     320                        $this->bail(sprintf(/*WP_I18N_DB_CONN_ERROR*/"
    321321<h1>Error establishing a database connection</h1>
    322 <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>$dbhost</code>. This could mean your host's database server is down.</p>
     322<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>
    323323<ul>
    324324        <li>Are you sure you have the correct username and password?</li>
    325325        <li>Are you sure that you have typed the correct hostname?</li>
    326326        <li>Are you sure that the database server is running?</li>
    327327</ul>
    328328<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>
    329 ");
     329"/*/WP_I18N_DB_CONN_ERROR*/, $dbhost));
    330330                        return;
    331331                }
    332332
     
    373373        function set_prefix($prefix) {
    374374
    375375                if ( preg_match('|[^a-z0-9_]|i', $prefix) )
    376                         return new WP_Error('invalid_db_prefix', 'Invalid database prefix'); // No gettext here
     376                        return new WP_Error('invalid_db_prefix', /*WP_I18N_DB_BAD_PREFIX*/'Invalid database prefix'/*/WP_I18N_DB_BAD_PREFIX*/);
    377377
    378378                $old_prefix = $this->prefix;
    379379                $this->prefix = $prefix;
     
    404404        function select($db) {
    405405                if (!@mysql_select_db($db, $this->dbh)) {
    406406                        $this->ready = false;
    407                         $this->bail("
     407                        $this->bail(sprintf(/*WP_I18N_DB_SELECT_DB*/'
    408408<h1>Can&#8217;t select database</h1>
    409 <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>$db</code> database.</p>
     409<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>
    410410<ul>
    411411<li>Are you sure it exists?</li>
    412 <li>Does the user <code>".DB_USER."</code> have permission to use the <code>$db</code> database?</li>
     412<li>Does the user <code>%2$s</code> have permission to use the <code>%1$s</code> database?</li>
    413413<li>On some systems the name of your database is prefixed with your username, so it would be like username_wordpress. Could that be the problem?</li>
    414414</ul>
    415 <p>If you don't know how to setup 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>");
     415<p>If you don\'t know how to setup 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, DB_USER));
    416416                        return;
    417417                }
    418418        }
     
    487487                if ( $this->suppress_errors )
    488488                        return false;
    489489
    490                 $error_str = "WordPress database error $str for query $this->last_query";
    491490                if ( $caller = $this->get_caller() )
    492                         $error_str .= " made by $caller";
     491                        $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);
     492                else
     493                        $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);
    493494
    494495                $log_error = true;
    495496                if ( ! function_exists('error_log') )
     
    745746                } elseif ( $output == ARRAY_N ) {
    746747                        return $this->last_result[$y] ? array_values(get_object_vars($this->last_result[$y])) : null;
    747748                } else {
    748                         $this->print_error(" \$db->get_row(string query, output type, int offset) -- Output type must be one of: OBJECT, ARRAY_A, ARRAY_N");
     749                        $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*/);
    749750                }
    750751        }
    751752
  • wp-settings.php

     
    9797        $_SERVER['PHP_SELF'] = $PHP_SELF = preg_replace("/(\?.*)?$/",'',$_SERVER["REQUEST_URI"]);
    9898
    9999if ( version_compare( '4.3', phpversion(), '>' ) ) {
    100         die( 'Your server is running PHP version ' . phpversion() . ' but WordPress requires at least 4.3.' );
     100        die( /*WP_I18N_OLD_PHP*/'Your server is running PHP version ' . phpversion() . ' but WordPress requires at least 4.3.'/*/WP_I18N_OLD_PHP*/ );
    101101}
    102102
    103103if ( !defined('WP_CONTENT_DIR') )
    104104        define( 'WP_CONTENT_DIR', ABSPATH . 'wp-content' ); // no trailing slash, full paths only - WP_CONTENT_URL is defined further down
    105105
    106106if ( !extension_loaded('mysql') && !file_exists(WP_CONTENT_DIR . '/db.php') )
    107         die( 'Your PHP installation appears to be missing the MySQL extension which is required by WordPress.' );
     107        die( /*WP_I18N_OLD_MYSQL*/'Your PHP installation appears to be missing the MySQL extension which is required by WordPress.'/*/WP_I18N_OLD_MYSQL*/ );
    108108
    109109/**
    110110 * timer_start() - PHP 4 standard microtime start capture
     
    212212$prefix = $wpdb->set_prefix($table_prefix);
    213213
    214214if ( is_wp_error($prefix) )
    215         wp_die('<strong>ERROR</strong>: <code>$table_prefix</code> in <code>wp-config.php</code> can only contain numbers, letters, and underscores.');
     215        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*/);
    216216
    217217if ( file_exists(WP_CONTENT_DIR . '/object-cache.php') )
    218218        require_once (WP_CONTENT_DIR . '/object-cache.php');