Skip to content

Commit

Permalink
Merge pull request barryvdh#174 from al0mie/al0mie-patch-2
Browse files Browse the repository at this point in the history
Search lang keys in __() functions
  • Loading branch information
barryvdh authored Feb 10, 2017
2 parents 760fea6 + 68d9f3b commit cc7db92
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Manager.php
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ public function findTranslations($path = null)
{
$path = $path ?: base_path();
$keys = array();
$functions = array('trans', 'trans_choice', 'Lang::get', 'Lang::choice', 'Lang::trans', 'Lang::transChoice', '@lang', '@choice');
$functions = array('trans', 'trans_choice', 'Lang::get', 'Lang::choice', 'Lang::trans', 'Lang::transChoice', '@lang', '@choice', '__');
$pattern = // See http://regexr.com/392hu
"[^\w|>]". // Must not have an alphanum or _ or > before real method
"(".implode('|', $functions) .")". // Must start with one of the functions
Expand Down

0 comments on commit cc7db92

Please sign in to comment.