Skip to content

Commit

Permalink
Fixed issue with exporting vendor translations #393 (#425)
Browse files Browse the repository at this point in the history
  • Loading branch information
tom-knight authored Oct 31, 2022
1 parent d0d4c14 commit 638e378
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/Manager.php
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,11 @@ public function exportTranslations($group = null, $json = false)
}
}

$path = $path.DIRECTORY_SEPARATOR.$locale.DIRECTORY_SEPARATOR.$group.'.php';
if ($vendor) {
$path = $path.DIRECTORY_SEPARATOR.'messages.php';
} else {
$path = $path.DIRECTORY_SEPARATOR.$locale.DIRECTORY_SEPARATOR.$group.'.php';
}

$output = "<?php\n\nreturn ".var_export($translations, true).';'.\PHP_EOL;
$this->files->put($path, $output);
Expand Down

0 comments on commit 638e378

Please sign in to comment.