Skip to content

Commit f7f2b27

Browse files
committed
var renamed
1 parent 058e79f commit f7f2b27

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/Console/Commands/AddTranslations.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,17 +23,17 @@ public function handle()
2323
{
2424
foreach ($this->getFiles() as $file) {
2525
$targetDirectory = resource_path('lang');
26-
$mainFile = $targetDirectory.'/'.$file->getBasename();
26+
$targetPath = $targetDirectory.'/'.$file->getBasename();
2727
if ($this->files->missing($targetDirectory)) {
2828
$this->files->makeDirectory($targetDirectory);
2929
}
30-
if ($this->files->missing($mainFile)) {
31-
$this->files->copy($file->getPathname(), $mainFile);
32-
$this->info($mainFile.' created.');
30+
if ($this->files->missing($targetPath)) {
31+
$this->files->copy($file->getPathname(), $targetPath);
32+
$this->info($targetPath.' created.');
3333
continue;
3434
}
3535

36-
$existingTranslations = $this->getTranslations($mainFile);
36+
$existingTranslations = $this->getTranslations($targetPath);
3737
$newTranslations = $this->getTranslations($file);
3838

3939
if ($this->option('force')) {
@@ -43,9 +43,9 @@ public function handle()
4343
}
4444
ksort($translations, SORT_STRING | SORT_FLAG_CASE);
4545

46-
$this->put($mainFile, $translations);
46+
$this->put($targetPath, $translations);
4747

48-
$this->info(count($translations) - count($existingTranslations).' translations added in '.$mainFile.'.');
48+
$this->info(count($translations) - count($existingTranslations).' translations added in '.$targetPath.'.');
4949
}
5050
}
5151
}

0 commit comments

Comments
 (0)