From e55672bdcd6768c6062b325f11350e10178f3567 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20Kv=C3=A1=C4=8Dek?= Date: Mon, 5 Sep 2016 00:10:31 +0200 Subject: [PATCH] FEATURE: support submodules in translation helper command --- app/Console/Commands/Translations.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/app/Console/Commands/Translations.php b/app/Console/Commands/Translations.php index aca0693c..333cb971 100644 --- a/app/Console/Commands/Translations.php +++ b/app/Console/Commands/Translations.php @@ -38,6 +38,15 @@ class Translations extends Command if (!is_dir($defaultLocalesDir)) { // this is the place for checking for submodules + + $modulePath = dirname(dirname($dir)); + + if (file_exists($modulePath . '/info.php')) { + $modules = File::directories($modulePath); + foreach ($modules as $module) { + $this->call('translate:dir', ['dir' => $module . '/Resources/lang']); + } + } return; }