Skip to content

Commit

Permalink
Restore usage of ‚php‘ key
Browse files Browse the repository at this point in the history
  • Loading branch information
krokodok committed Feb 16, 2024
1 parent 79c9914 commit 675839f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions inc/Export.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,9 @@ public function export_strings(): ?array {
// Build a mapping based on where the translation entries occur and separate the po entries.
$mapping = $this->map_entries_to_source( $entries );

$php_entries = \array_key_exists( 'po', $mapping ) ? $mapping['po'] : [];
$php_entries = \array_key_exists( 'php', $mapping ) ? $mapping['php'] : [];

unset( $mapping['po'] );
unset( $mapping['php'] );

$this->build_json_files( $mapping );
$this->build_po_file( $php_entries );
Expand Down Expand Up @@ -162,14 +162,14 @@ function ( $reference ) {
if ( substr( $file, -3 ) === '.js' ) {
return $file;
}
return 'po';
return 'php';
},
$entry->references
);

$sources = array_unique( $sources );
} else {
$sources = [ 'po' ];
$sources = [ 'php' ];
}

foreach ( $sources as $source ) {
Expand Down

0 comments on commit 675839f

Please sign in to comment.