Skip to content

Commit

Permalink
Added possibility to select which extensions to scan for.
Browse files Browse the repository at this point in the history
  • Loading branch information
Henrik B Hansen committed Jan 7, 2020
1 parent 7312c28 commit 1c949fe
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 1 deletion.
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,17 @@ return [
*/

'functions' => ['__'],

/*
|--------------------------------------------------------------------------
| Extensions
|--------------------------------------------------------------------------
|
| Here you define an array describing all the file extensions to scan through.
|
*/

'extensions' => ['*.php', '*.vue'],

/*
|--------------------------------------------------------------------------
Expand Down
11 changes: 11 additions & 0 deletions config/translation.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,17 @@

'functions' => ['__'],

/*
|--------------------------------------------------------------------------
| Extensions
|--------------------------------------------------------------------------
|
| Here you define an array describing all the file extensions to scan through.
|
*/

'extensions' => ['*.php', '*.vue'],

/*
|--------------------------------------------------------------------------
| API Key
Expand Down
2 changes: 1 addition & 1 deletion src/Translation.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public function scan($mergeKeys = false): int

$finder->in(base_path())
->exclude(['vendor', 'storage', 'public'])
->name(['*.php', '*.vue'])
->name(config('translation.extensions'))
->files();
/*
* This pattern is derived from Barryvdh\TranslationManager by Barry vd. Heuvel <barryvdh@gmail.com>
Expand Down

0 comments on commit 1c949fe

Please sign in to comment.