@@ -55,9 +55,9 @@ class TranslationDebugCommand extends Command
5555 private $ defaultTransPath ;
5656 private $ defaultViewsPath ;
5757 private $ transPaths ;
58- private $ viewsPaths ;
58+ private $ codePaths ;
5959
60- public function __construct (TranslatorInterface $ translator , TranslationReaderInterface $ reader , ExtractorInterface $ extractor , string $ defaultTransPath = null , string $ defaultViewsPath = null , array $ transPaths = [], array $ viewsPaths = [])
60+ public function __construct (TranslatorInterface $ translator , TranslationReaderInterface $ reader , ExtractorInterface $ extractor , string $ defaultTransPath = null , string $ defaultViewsPath = null , array $ transPaths = [], array $ codePaths = [])
6161 {
6262 parent ::__construct ();
6363
@@ -67,7 +67,7 @@ public function __construct(TranslatorInterface $translator, TranslationReaderIn
6767 $ this ->defaultTransPath = $ defaultTransPath ;
6868 $ this ->defaultViewsPath = $ defaultViewsPath ;
6969 $ this ->transPaths = $ transPaths ;
70- $ this ->viewsPaths = $ viewsPaths ;
70+ $ this ->codePaths = $ codePaths ;
7171 }
7272
7373 /**
@@ -139,10 +139,10 @@ protected function execute(InputInterface $input, OutputInterface $output): int
139139 if ($ this ->defaultTransPath ) {
140140 $ transPaths [] = $ this ->defaultTransPath ;
141141 }
142- $ viewsPaths = $ this ->viewsPaths ;
143- $ viewsPaths [] = $ kernel ->getProjectDir ().'/src ' ;
142+ $ codePaths = $ this ->codePaths ;
143+ $ codePaths [] = $ kernel ->getProjectDir ().'/src ' ;
144144 if ($ this ->defaultViewsPath ) {
145- $ viewsPaths [] = $ this ->defaultViewsPath ;
145+ $ codePaths [] = $ this ->defaultViewsPath ;
146146 }
147147
148148 // Override with provided Bundle info
@@ -151,19 +151,19 @@ protected function execute(InputInterface $input, OutputInterface $output): int
151151 $ bundle = $ kernel ->getBundle ($ input ->getArgument ('bundle ' ));
152152 $ bundleDir = $ bundle ->getPath ();
153153 $ transPaths = [is_dir ($ bundleDir .'/Resources/translations ' ) ? $ bundleDir .'/Resources/translations ' : $ bundleDir .'/translations ' ];
154- $ viewsPaths = [is_dir ($ bundleDir .'/Resources/views ' ) ? $ bundleDir .'/Resources/views ' : $ bundleDir .'/templates ' ];
154+ $ codePaths = [is_dir ($ bundleDir .'/Resources/views ' ) ? $ bundleDir .'/Resources/views ' : $ bundleDir .'/templates ' ];
155155 if ($ this ->defaultTransPath ) {
156156 $ transPaths [] = $ this ->defaultTransPath ;
157157 }
158158 if ($ this ->defaultViewsPath ) {
159- $ viewsPaths [] = $ this ->defaultViewsPath ;
159+ $ codePaths [] = $ this ->defaultViewsPath ;
160160 }
161161 } catch (\InvalidArgumentException $ e ) {
162162 // such a bundle does not exist, so treat the argument as path
163163 $ path = $ input ->getArgument ('bundle ' );
164164
165165 $ transPaths = [$ path .'/translations ' ];
166- $ viewsPaths = [$ path .'/templates ' ];
166+ $ codePaths = [$ path .'/templates ' ];
167167
168168 if (!is_dir ($ transPaths [0 ]) && !isset ($ transPaths [1 ])) {
169169 throw new InvalidArgumentException (sprintf ('"%s" is neither an enabled bundle nor a directory. ' , $ transPaths [0 ]));
@@ -173,12 +173,12 @@ protected function execute(InputInterface $input, OutputInterface $output): int
173173 foreach ($ kernel ->getBundles () as $ bundle ) {
174174 $ bundleDir = $ bundle ->getPath ();
175175 $ transPaths [] = is_dir ($ bundleDir .'/Resources/translations ' ) ? $ bundleDir .'/Resources/translations ' : $ bundle ->getPath ().'/translations ' ;
176- $ viewsPaths [] = is_dir ($ bundleDir .'/Resources/views ' ) ? $ bundleDir .'/Resources/views ' : $ bundle ->getPath ().'/templates ' ;
176+ $ codePaths [] = is_dir ($ bundleDir .'/Resources/views ' ) ? $ bundleDir .'/Resources/views ' : $ bundle ->getPath ().'/templates ' ;
177177 }
178178 }
179179
180180 // Extract used messages
181- $ extractedCatalogue = $ this ->extractMessages ($ locale , $ viewsPaths );
181+ $ extractedCatalogue = $ this ->extractMessages ($ locale , $ codePaths );
182182
183183 // Load defined messages
184184 $ currentCatalogue = $ this ->loadCurrentMessages ($ locale , $ transPaths );
0 commit comments