FIX: fix translating submodules

This commit is contained in:
Michal Kváček
2016-09-24 02:55:01 +02:00
parent 55ef5e4af1
commit b7434d0a0b
2 changed files with 4 additions and 3 deletions
@@ -6,7 +6,7 @@ use Illuminate\Console\Command;
use Illuminate\Support\Facades\File;
use Illuminate\Support\Str;
class Translations extends Command
class TranslateDirectory extends Command
{
/**
* The name and signature of the console command.
@@ -40,7 +40,8 @@ class Translations extends Command
$modulePath = dirname(dirname($dir));
if (is_dir(base_path($modulePath . '/Resources/lang'))) {
// does exist directory with translations?
if (is_dir(base_path($modulePath . '/Resources/lang')) || file_exists(base_path($modulePath.DIRECTORY_SEPARATOR.'info.php'))) {
$modules = File::directories($modulePath);
foreach ($modules as $module) {
$this->call('translate:dir', ['dir' => $module . '/Resources/lang']);
+1 -1
View File
@@ -18,7 +18,7 @@ class Kernel extends ConsoleKernel
Commands\ChangePassword::class,
Commands\InstallModule::class,
Commands\InstallAllModules::class,
Commands\Translations::class,
Commands\TranslateDirectory::class,
Commands\TranslateAll::class,
Commands\InitDatabaseSchema::class,
Commands\SetTemplate::class,