Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix spacing
  • Loading branch information
swissspidy committed Dec 18, 2023
commit 5af3b26df309adcaa5f16dc63fb77353e80f546f
7 changes: 4 additions & 3 deletions gp-includes/formats/format-php.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,14 +58,15 @@ public function print_exported_file( $project, $locale, $translation_set, $entri
foreach ( $entries as $entry ) {
$key = $entry->context ? $entry->context . chr( 4 ) . $entry->singular : $entry->singular;

$result['messages'][$key] = implode(
$result['messages'][ $key ] = implode(
"\0",
array_filter(
$entry->translations,
function ( $translation ) {
static function ( $translation ) {
return null !== $translation;
}
) );
)
);
}

return '<?php' . PHP_EOL . 'return ' . $this->var_export( $result ) . ';';
Expand Down