mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-03 06:38:51 +02:00
Merge pull request #2327 from ARNHOE/3.1-textcollectorupdate2
BUG Added _config as valid module folder in TextCollector
This commit is contained in:
commit
a6fef9335d
@ -8,7 +8,7 @@
|
|||||||
*
|
*
|
||||||
* Collects all found entities (and their natural language text for the default locale)
|
* Collects all found entities (and their natural language text for the default locale)
|
||||||
* into language-files for each module in an array notation. Creates or overwrites these files,
|
* into language-files for each module in an array notation. Creates or overwrites these files,
|
||||||
* e.g. framework/lang/en_US.php.
|
* e.g. framework/lang/en.yml.
|
||||||
*
|
*
|
||||||
* The collector needs to be run whenever you make new translatable
|
* The collector needs to be run whenever you make new translatable
|
||||||
* entities available. Please don't alter the arrays in language tables manually.
|
* entities available. Please don't alter the arrays in language tables manually.
|
||||||
@ -117,12 +117,15 @@ class i18nTextCollector extends Object {
|
|||||||
$modules = array_merge($modules, $themeFolders);
|
$modules = array_merge($modules, $themeFolders);
|
||||||
|
|
||||||
foreach($modules as $module) {
|
foreach($modules as $module) {
|
||||||
// Only search for calls in folder with a _config.php file (which means they are modules, including
|
// Only search for calls in folder with a _config.php file or _config folder
|
||||||
// themes folder)
|
// (which means they are modules, including themes folder)
|
||||||
$isValidModuleFolder = (
|
$isValidModuleFolder = (
|
||||||
is_dir("$this->basePath/$module")
|
is_dir("$this->basePath/$module")
|
||||||
&& is_file("$this->basePath/$module/_config.php")
|
|
||||||
&& substr($module,0,1) != '.'
|
&& substr($module,0,1) != '.'
|
||||||
|
&& (
|
||||||
|
is_file("$this->basePath/$module/_config.php")
|
||||||
|
|| is_dir("$this->basePath/$module/_config")
|
||||||
|
)
|
||||||
) || (
|
) || (
|
||||||
substr($module,0,7) == 'themes/'
|
substr($module,0,7) == 'themes/'
|
||||||
&& is_dir("$this->basePath/$module")
|
&& is_dir("$this->basePath/$module")
|
||||||
|
Loading…
Reference in New Issue
Block a user