Open open-soft-app opened 3 days ago
When the check function (php artisan translations:check en) encounters this type of line of code: echo $level == 'error' ? 'Whoops!' : {{trans('email.hello')}}, "\n\n";
php artisan translations:check en
echo $level == 'error' ? 'Whoops!' : {{trans('email.hello')}}, "\n\n";
The library fails:
Error parsing file C:\.......\resources\views\..........\email-plain.blade.php: Syntax error, unexpected '{' on line 6 at vendor\bottelet\translation-checker\src\Extractor\PhpBaseClassExtractor.php:53 49▕ return []; 50▕ } 51▕ $traverser->traverse($ast); 52▕ } catch (Exception $error) { ➜ 53▕ throw new RuntimeException("Error parsing file {$file->getRealPath()}: {$error->getMessage()}"); 54▕ } 55▕ 56▕ return array_merge( 57▕ $this->translationKeys, 1 vendor\bottelet\translation-checker\src\Finder\MissingKeysFinder.php:26 Bottelet\TranslationChecker\Extractor\PhpBaseClassExtractor::extractFromFile(Object(SplFileInfo)) 2 vendor\bottelet\translation-checker\src\Finder\MissingKeysFinder.php:49 Bottelet\TranslationChecker\Finder\MissingKeysFinder::findTranslatableStrings()
Thanks for letting me know! I'll try and fix it over the weekend.
When the check function (
php artisan translations:check en
) encounters this type of line of code:echo $level == 'error' ? 'Whoops!' : {{trans('email.hello')}}, "\n\n";
The library fails: