From 2bb020dfb781ff2059854c4d51742022eb3d2007 Mon Sep 17 00:00:00 2001
From: Thijs Kinkhorst <thijs@kinkhorst.com>
Date: Wed, 12 Jan 2022 14:01:20 +0000
Subject: [PATCH] Also search for noop() function use in modules/<module>/lib/

---
 bin/get-translatable-strings | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/bin/get-translatable-strings b/bin/get-translatable-strings
index 3848ced10..2aec4ffff 100755
--- a/bin/get-translatable-strings
+++ b/bin/get-translatable-strings
@@ -30,8 +30,10 @@ foreach($modules as $module) {
     $transUtils->compileAllTemplates($module, $tempDir);
     $domain = $module ?: 'messages';
 
-    $outputDir = $baseDir . ($module === '' ? '' : '/modules/' . $module) . $outputSuffix;
-    print `xgettext --default-domain=$domain -p $outputDir --from-code=UTF-8 -j --no-location -ktrans -L PHP $tempDir/*/*.php`;
+    $moduleDir = $baseDir . ($module === '' ? '' : '/modules/' . $module);
+    $moduleLibDir = $moduleDir . '/lib/';
+    $outputDir = $moduleDir . $outputSuffix;
+    print `find $tempDir $moduleLibDir -name \*.php | xargs xgettext --default-domain=$domain -p $outputDir --from-code=UTF-8 -j --omit-header --no-location -ktrans -knoop -L PHP`;
 }
 
 $filesystem->remove($tempDirBase);
-- 
GitLab