From f7f2b2750daac090577ef8f917605220edf9a0fc Mon Sep 17 00:00:00 2001 From: Samuel De Backer Date: Fri, 18 Sep 2020 11:51:31 +0200 Subject: [PATCH] var renamed --- src/Console/Commands/AddTranslations.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/Console/Commands/AddTranslations.php b/src/Console/Commands/AddTranslations.php index 0ba3e9a..0920b8e 100644 --- a/src/Console/Commands/AddTranslations.php +++ b/src/Console/Commands/AddTranslations.php @@ -23,17 +23,17 @@ public function handle() { foreach ($this->getFiles() as $file) { $targetDirectory = resource_path('lang'); - $mainFile = $targetDirectory.'/'.$file->getBasename(); + $targetPath = $targetDirectory.'/'.$file->getBasename(); if ($this->files->missing($targetDirectory)) { $this->files->makeDirectory($targetDirectory); } - if ($this->files->missing($mainFile)) { - $this->files->copy($file->getPathname(), $mainFile); - $this->info($mainFile.' created.'); + if ($this->files->missing($targetPath)) { + $this->files->copy($file->getPathname(), $targetPath); + $this->info($targetPath.' created.'); continue; } - $existingTranslations = $this->getTranslations($mainFile); + $existingTranslations = $this->getTranslations($targetPath); $newTranslations = $this->getTranslations($file); if ($this->option('force')) { @@ -43,9 +43,9 @@ public function handle() } ksort($translations, SORT_STRING | SORT_FLAG_CASE); - $this->put($mainFile, $translations); + $this->put($targetPath, $translations); - $this->info(count($translations) - count($existingTranslations).' translations added in '.$mainFile.'.'); + $this->info(count($translations) - count($existingTranslations).' translations added in '.$targetPath.'.'); } } }