WordPress.org

Make WordPress Core

Ticket #19852: 19852.diff

File 19852.diff, 1.4 KB (added by ryan, 8 years ago)

First pass at loading the new mo files

  • wp-includes/l10n.php

     
    382382
    383383        load_textdomain( 'default', WP_LANG_DIR . "/$locale.mo" );
    384384
    385         if ( is_multisite() || ( defined( 'WP_INSTALLING_NETWORK' ) && WP_INSTALLING_NETWORK ) ) {
    386                 load_textdomain( 'default', WP_LANG_DIR . "/ms-$locale.mo" );
    387         }
     385        if ( is_admin()  )
     386                load_textdomain( 'default', WP_LANG_DIR . "/admin-$locale.mo" );
     387
     388        if ( is_network_admin() || ( defined( 'WP_INSTALLING_NETWORK' ) && WP_INSTALLING_NETWORK ) )
     389                load_textdomain( 'default', WP_LANG_DIR . "/network-admin-$locale.mo" );
    388390}
    389391
    390392/**
  • wp-admin/includes/admin.php

     
    66 * @subpackage Administration
    77 */
    88
     9if ( ! defined('WP_ADMIN') ) {
     10        // This file is being included from a file other than wp-admin/admin.php, so
     11        // some setup was skipped. Make sure the admin message catalog is loaded since
     12        // load_default_textdomain() will not have done so in this context.
     13        load_textdomain( 'default', WP_LANG_DIR . "/admin-$locale.mo" );
     14}
     15
    916/** WordPress Bookmark Administration API */
    1017require_once(ABSPATH . 'wp-admin/includes/bookmark.php');
    1118