I18n: to not extract messages from vendor directories and Smarty cache templates files

This commit is contained in:
Benjamin Renard 2023-02-25 17:00:14 +01:00
parent 1d7387fb18
commit 5b9d09b644

View file

@ -327,7 +327,11 @@ class I18n {
if ($core_mode) {
// List EesyPHP PHP files to parse
$eesyphp_php_files = run_external_command(
array('find', '-name', "'*.php'"),
array(
'find', '-name', "'*.php'", // Looking for PHP files
"-not", "-path", "'.*/vendor/*'", // Exclude vendor directories
"-not", "-name", "'*.tpl.php'" // Exclude Smarty cache template files
),
null, // no STDIN data
false, // do not escape command args (already done)
__DIR__ // Run from EesyPHP src directory
@ -360,7 +364,11 @@ class I18n {
else {
// List application PHP files to parse
$php_files = run_external_command(
array('find', '-name', "'*.php'"),
array(
'find', '-name', "'*.php'", // Looking for PHP files
"-not", "-path", "'.*/vendor/*'", // Exclude vendor directories
"-not", "-name", "'*.tpl.php'" // Exclude Smarty cache template files
),
null, // no STDIN data
false, // do not escape command args (already done)
App :: root_directory_path() // Run from Application root directory