Make WordPress Core


Ignore:
Timestamp:
01/26/2012 08:34:27 PM (13 years ago)
Author:
nacin
Message:

Introduce wp_load_translations_early(), which can be used before the locale is properly loaded in order to translate early error strings. Internationalize setup-config.php -- translators no longer have a reason to modify this file. fixes #18180.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/functions.php

    r19712 r19760  
    12021202        // One or more tables exist. We are insane.
    12031203
     1204        wp_load_translations_early();
     1205
    12041206        // 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' );
    12061208        dead_db();
    12071209    }
     
    26482650    nocache_headers();
    26492651    header( 'Content-Type: text/html; charset=utf-8' );
     2652
     2653    wp_load_translations_early();
    26502654?>
    26512655<!DOCTYPE html>
     
    26532657<head>
    26542658<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>
    26562660
    26572661</head>
    26582662<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>
    26602664</body>
    26612665</html>
Note: See TracChangeset for help on using the changeset viewer.