@@ -82,9 +82,13 @@ public function handle()
8282 $ this ->files = $ this ->filesFromKey ();
8383
8484 $ this ->languages = $ this ->manager ->languages ();
85-
86- if ($ this ->option ('lang ' ) != null ){
87- $ this ->languages = explode (', ' ,$ this ->option ('lang ' ));
85+
86+ if ($ this ->option ('lang ' ) != null ) {
87+ $ languages = explode (', ' , $ this ->option ('lang ' ));
88+ if (!empty ($ diffLangagues = array_diff ($ languages , $ this ->languages ))) {
89+ return $ this ->error ('Unknown Langauges [ ' .implode ($ diffLangagues ,', ' ).' ] ' );
90+ }
91+ $ this ->languages = explode (', ' , $ this ->option ('lang ' ));
8892 }
8993
9094 $ this ->table (
@@ -106,11 +110,11 @@ private function tableRows()
106110
107111 foreach ($ this ->files as $ languageKey => $ file ) {
108112 foreach ($ filesContent [$ languageKey ] = Arr::dot ($ this ->manager ->getFileContent ($ file )) as $ key => $ value ) {
109- if (! $ this ->shouldShowKey ($ key )) {
113+ if (!$ this ->shouldShowKey ($ key )) {
110114 continue ;
111115 }
112116
113- $ output [$ key ]['key ' ] = $ key ;
117+ $ output [$ key ]['key ' ] = $ key ;
114118 $ output [$ key ][$ languageKey ] = $ value ;
115119 }
116120 }
@@ -190,11 +194,11 @@ private function shouldShowKey($key)
190194 return true ;
191195 }
192196
193- if (! $ this ->option ('close ' ) && $ key != $ this ->key ) {
197+ if (!$ this ->option ('close ' ) && $ key != $ this ->key ) {
194198 return false ;
195199 }
196200
197- if ($ this ->option ('close ' ) && ! Str::contains ($ key , $ this ->key )) {
201+ if ($ this ->option ('close ' ) && !Str::contains ($ key , $ this ->key )) {
198202 return false ;
199203 }
200204 }
0 commit comments