Skip to content

Commit 1fe6a5d

Browse files
Fix exclusion of generated PhD files for translatable files (#73)
This affected file names which look like ``htmlentities.xml`` Co-authored-by: George Peter Banyard <[email protected]>
1 parent 8d24f29 commit 1fe6a5d

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

scripts/include/lib-translations.inc.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,13 @@ function is_translatable ($filename) {
8787
if (in_array(basename($filename), $files_not_translated)) {
8888
return false;
8989
}
90+
91+
// Exclude entity files generated by PhD
92+
if (preg_match("/^entities\./", basename($filename))) {
93+
return false;
94+
}
9095

91-
$files_matches = array('/internals/', '/internals2/', 'entities.');
96+
$files_matches = array('/internals/', '/internals2/');
9297

9398
foreach ($files_matches as $match) {
9499
if (false !== strpos($filename, $match)) {

0 commit comments

Comments
 (0)