@@ -232,7 +232,7 @@ private function stringLineMaker($array, $prepend = '')
232232
233233 $ output .= "\n{$ prepend } ' {$ key }' => [ {$ value }\n{$ prepend } ], " ;
234234 } else {
235- $ value = addslashes ($ value );
235+ $ value = str_replace ( ' \" ' , ' " ' , addslashes ($ value) );
236236
237237 $ output .= "\n{$ prepend } ' {$ key }' => ' {$ value }', " ;
238238 }
@@ -315,8 +315,9 @@ public function getAllViewFilesWithTranslations()
315315 $ functions = ['trans ' , 'trans_choice ' , 'Lang::get ' , 'Lang::choice ' , 'Lang::trans ' , 'Lang::transChoice ' , '@lang ' , '@choice ' ];
316316
317317 $ pattern =
318- // See https://regex101.com/r/jS5fX0/2
319- '[^\w|>] ' . // Must not start with any alphanum or _ or >
318+ // See https://regex101.com/r/jS5fX0/3
319+ '[^\w] ' . // Must not start with any alphanum or _
320+ '(?<!->) ' . // Must not start with ->
320321 '( ' .implode ('| ' , $ functions ).') ' .// Must start with one of the functions
321322 "\( " .// Match opening parentheses
322323 "[\' \"] " .// Match " or '
@@ -381,7 +382,7 @@ public function getKeysExistingInALanguageButNotTheOther($values)
381382 }
382383
383384 foreach ($ this ->languages () as $ languageName ) {
384- if (! Arr::has ($ values , "{$ fileName }. {$ languageName }. {$ key }" )) {
385+ if (! Arr::has ($ values , "{$ fileName }. {$ languageName }. {$ key }" ) && ! array_key_exists ( "{ $ fileName } . { $ languageName } . { $ key }" , $ values ) ) {
385386 $ missing [] = "{$ fileName }. {$ key }: {$ languageName }" ;
386387 }
387388 }
0 commit comments