thiagocordeiro / laravel-translator

Search translation keys and insert into json to be translated
MIT License
84 stars 22 forks source link

Scan vuejs files for translations #26

Closed AMAFsoft closed 4 years ago

AMAFsoft commented 4 years ago

In my *.vue files I'm using the same translation function __('') ; is there a way to add vue files to the list of scannable files? Example :

<template>
  <div>{{__('Hello')}}</div>
</template>
AMAFsoft commented 4 years ago

This solution works great for me: $files = glob_recursive("{$path}/*.{php,vue}", GLOB_BRACE); But if you could add it officially to this package would be great.

thiagocordeiro commented 4 years ago

Yes, this is the solution, but I guess we shouldn’t scan vue files by default, can you create a PR extending the configuration in src/Framework/config.php?

AMAFsoft commented 4 years ago

Done!

27

thiagocordeiro commented 4 years ago

Available on version v1.1.0