Skip to content

Commit

Permalink
Revert "Merge pull request #74 from MohmmedAshraf/fix-json-export"
Browse files Browse the repository at this point in the history
This reverts commit 9454389, reversing
changes made to 985fb64.
  • Loading branch information
MohmmedAshraf committed Feb 13, 2024
1 parent 9454389 commit 52238ab
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/TranslationsManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -116,11 +116,11 @@ public function export($download = false): void

foreach ($phrasesTree as $locale => $groups) {
foreach ($groups as $file => $phrases) {
$langPath = match (true) {
$download => storage_path("app/translations/$locale/$file"),
$this->filesystem->extension(lang_path("$locale/$file")) == 'php' => lang_path("$locale/$file"),
$this->filesystem->extension(lang_path("$file")) == 'json' => lang_path("$file"),
};
if ($file === "$locale.json") {
$langPath = $download ? storage_path("app/translations/$file") : lang_path("$file");
} else {
$langPath = $download ? storage_path("app/translations/$locale/$file") : lang_path("$locale/$file");
}

if (! $this->filesystem->isDirectory(dirname($langPath))) {
$this->filesystem->makeDirectory(dirname($langPath), 0755, true);
Expand Down

0 comments on commit 52238ab

Please sign in to comment.