FEATURE: extend translation command for translating also templates
This commit is contained in:
@@ -25,7 +25,6 @@ class Translations extends Command
|
||||
|
||||
/**
|
||||
* Execute the console command.
|
||||
* @return mixed
|
||||
*/
|
||||
public function handle()
|
||||
{
|
||||
@@ -33,15 +32,15 @@ class Translations extends Command
|
||||
$defaultLocales = config('app.fallback_locale');
|
||||
$currentLocales = config('app.locale');
|
||||
|
||||
$defaultLocalesDir = $dir . '/' . $defaultLocales;
|
||||
$currentLocalesDir = $dir . '/' . $currentLocales;
|
||||
$defaultLocalesDir = base_path($dir . '/' . $defaultLocales);
|
||||
$currentLocalesDir = base_path($dir . '/' . $currentLocales);
|
||||
|
||||
if (!is_dir($defaultLocalesDir)) {
|
||||
// this is the place for checking for submodules
|
||||
|
||||
$modulePath = dirname(dirname($dir));
|
||||
|
||||
if (file_exists($modulePath . '/info.php')) {
|
||||
if (is_dir(base_path($modulePath . '/Resources/lang'))) {
|
||||
$modules = File::directories($modulePath);
|
||||
foreach ($modules as $module) {
|
||||
$this->call('translate:dir', ['dir' => $module . '/Resources/lang']);
|
||||
|
||||
Reference in New Issue
Block a user