FEATURE: support submodules in translation helper command

This commit is contained in:
Michal Kváček
2016-09-05 00:10:31 +02:00
parent 5ef2630810
commit e55672bdcd
+9
View File
@@ -38,6 +38,15 @@ class Translations extends Command
if (!is_dir($defaultLocalesDir)) { if (!is_dir($defaultLocalesDir)) {
// this is the place for checking for submodules // 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; return;
} }