Skip to content

Commit ddf1730

Browse files
gilbertomangonesenzolutions
authored andcommitted
Add Message to run 'composer require drupal/console-language'. (#368)
1 parent 1d2d579 commit ddf1730

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/Utils/TranslatorManager.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,10 @@ private function buildCoreLanguageDirectory(
103103
$language,
104104
$directoryRoot
105105
) {
106+
$output = new ConsoleOutput();
107+
$input = new ArrayInput([]);
108+
$io = new DrupalStyle($input, $output);
109+
106110
$coreLanguageDirectory =
107111
$directoryRoot .
108112
sprintf(
@@ -126,6 +130,12 @@ private function buildCoreLanguageDirectory(
126130
if (!isset($languageDirectory)) {
127131
if ($language == 'en') {
128132
throw new \Exception('No languages found. Make sure you have installed a console language package in a supported directory');
133+
}else{
134+
$io->warning(
135+
sprintf(
136+
'Language not available please execute this command in order to get the language locally using composer, run composer require drupal/console-'.$language.''
137+
)
138+
);
129139
}
130140
return $this->buildCoreLanguageDirectory('en', $directoryRoot);
131141
}

0 commit comments

Comments
 (0)