Skip to content

Commit

Permalink
Plugin not working (extract) with CakePHP 2.10.15
Browse files Browse the repository at this point in the history
The plugin doesn't find any js or ctp files. $dir->findRecursive returns an empty array.
I've changed the regex to match files with js or ctp extension. i18n_js.pot file is now generated correctly.
  • Loading branch information
fdalex committed Oct 23, 2019
1 parent 2c3d00c commit 714f215
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Console/Command/Task/ExtractJsTask.php
Expand Up @@ -65,7 +65,7 @@ public function execute() {

// todo: not only webroot
$dir = new Folder(APP);
$files = $dir->findRecursive('.js|.ctp');
$files = $dir->findRecursive('^([a-zA-Z0-9\s_\\.\-\(\):])+\.(js|ctp)$');
foreach ($files as $filepath) {
$this->_locale_parse_js_file($filepath);
}
Expand Down

0 comments on commit 714f215

Please sign in to comment.