From 181e1fb7210a9952393e1135a67d6025f380e932 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20Kv=C3=A1=C4=8Dek?= Date: Fri, 22 Jul 2016 00:42:45 +0200 Subject: [PATCH] FEATURE: create directory for translations if not exist --- app/Console/Commands/Translations.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/Console/Commands/Translations.php b/app/Console/Commands/Translations.php index af851adf..5c6a2b66 100644 --- a/app/Console/Commands/Translations.php +++ b/app/Console/Commands/Translations.php @@ -36,6 +36,10 @@ class Translations extends Command $defaultLocalesDir = $dir . '/' . $defaultLocales; $currentLocalesDir = $dir . '/' . $currentLocales; + if (!is_dir($currentLocalesDir)) { + File::makeDirectory($currentLocalesDir); + } + $this->compareTranslationsInDirectory($defaultLocalesDir, $currentLocalesDir); } @@ -57,7 +61,7 @@ class Translations extends Command $default = include($file); $checked = file_exists($currentDir . '/' . $fileName) ? include $currentDir . '/' . $fileName : []; $this->translations = &$checked; - + $this->checkForMissingTranslations($default, $checked, $currentDir, $fileName); }