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