| 1 | Index: wp-includes/l10n.php |
|---|
| 2 | =================================================================== |
|---|
| 3 | --- wp-includes/l10n.php (revision 19770) |
|---|
| 4 | +++ wp-includes/l10n.php (working copy) |
|---|
| 5 | @@ -382,9 +382,17 @@ |
|---|
| 6 | |
|---|
| 7 | load_textdomain( 'default', WP_LANG_DIR . "/$locale.mo" ); |
|---|
| 8 | |
|---|
| 9 | - if ( is_multisite() || ( defined( 'WP_INSTALLING_NETWORK' ) && WP_INSTALLING_NETWORK ) ) { |
|---|
| 10 | + if ( ! file_exists( WP_LANG_DIR . "/admin-$locale.mo" ) ) { |
|---|
| 11 | load_textdomain( 'default', WP_LANG_DIR . "/ms-$locale.mo" ); |
|---|
| 12 | + return; |
|---|
| 13 | } |
|---|
| 14 | + |
|---|
| 15 | + if ( is_admin() ) |
|---|
| 16 | + load_textdomain( 'default', WP_LANG_DIR . "/admin-$locale.mo" ); |
|---|
| 17 | + |
|---|
| 18 | + if ( is_network_admin() || ( defined( 'WP_INSTALLING_NETWORK' ) && WP_INSTALLING_NETWORK ) ) |
|---|
| 19 | + load_textdomain( 'default', WP_LANG_DIR . "/admin-network-$locale.mo" ); |
|---|
| 20 | + |
|---|
| 21 | } |
|---|
| 22 | |
|---|
| 23 | /** |
|---|
| 24 | Index: wp-admin/includes/admin.php |
|---|
| 25 | =================================================================== |
|---|
| 26 | --- wp-admin/includes/admin.php (revision 19770) |
|---|
| 27 | +++ wp-admin/includes/admin.php (working copy) |
|---|
| 28 | @@ -6,6 +6,13 @@ |
|---|
| 29 | * @subpackage Administration |
|---|
| 30 | */ |
|---|
| 31 | |
|---|
| 32 | +if ( ! defined('WP_ADMIN') ) { |
|---|
| 33 | + // This file is being included from a file other than wp-admin/admin.php, so |
|---|
| 34 | + // some setup was skipped. Make sure the admin message catalog is loaded since |
|---|
| 35 | + // load_default_textdomain() will not have done so in this context. |
|---|
| 36 | + load_textdomain( 'default', WP_LANG_DIR . "/admin-$locale.mo" ); |
|---|
| 37 | +} |
|---|
| 38 | + |
|---|
| 39 | /** WordPress Bookmark Administration API */ |
|---|
| 40 | require_once(ABSPATH . 'wp-admin/includes/bookmark.php'); |
|---|
| 41 | |
|---|