Ticket #37819: 37819.diff
File 37819.diff, 865 bytes (added by , 8 years ago) |
---|
-
src/wp-includes/l10n.php
563 563 $mo = new MO(); 564 564 if ( !$mo->import_from_file( $mofile ) ) return false; 565 565 566 if ( isset( $l10n[$domain] ) ) 567 $mo->merge_with( $l10n[$domain] ); 566 if ( isset( $l10n[$domain] ) ) { 568 567 568 $is_regular = false; 569 foreach ( array( 570 WP_LANG_DIR . '/plugins', 571 WP_LANG_DIR . '/themes', 572 ) as $path ) { 573 $is_regular = strstr( $mofile, $path ); 574 575 if ( $is_regular ) { 576 $is_regular = true; 577 break; 578 } 579 } 580 581 if ( ! $is_regular && 'default' !== $domain ) { 582 $mo->merge_originals_with( $l10n[$domain] ); 583 } else { 584 $mo->merge_with( $l10n[$domain] ); 585 } 586 } 587 569 588 unset( $l10n_unloaded[ $domain ] ); 570 589 571 590 $l10n[$domain] = &$mo;