From b91b8787be48db3d5669b84882971f72710a4b27 Mon Sep 17 00:00:00 2001 From: Harald Leithner Date: Sun, 27 Jun 2021 12:24:54 +0200 Subject: [PATCH 1/2] Allow new language files without language tag --- src/Tasks/Build/Language.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Tasks/Build/Language.php b/src/Tasks/Build/Language.php index c46b12c..50f63fe 100644 --- a/src/Tasks/Build/Language.php +++ b/src/Tasks/Build/Language.php @@ -146,12 +146,12 @@ public function run() private function analyze() { // Check for all languages here - if (empty(glob($this->adminLangPath . "/*/*." . $this->ext . "*.ini"))) + if (empty(glob($this->adminLangPath . "/*/*" . $this->ext . "*.ini"))) { $this->hasAdminLang = false; } - if (empty(glob($this->frontLangPath . "/*/*." . $this->ext . "*.ini"))) + if (empty(glob($this->frontLangPath . "/*/*" . $this->ext . "*.ini"))) { $this->hasFrontLang = false; } @@ -238,7 +238,7 @@ public function copyLanguage($dir, $target) while ($file = readdir($fileHdl)) { // Only copy language files for this extension (and sys files..) - if (substr($file, 0, 1) != '.' && strpos($file, $this->ext . ".")) + if (substr($file, 0, 1) !== '.' && strpos($file, $this->ext . ".") !== false) { $files[] = array($entry => $file); From 4d6c55bd366738d7743082449d4fdc358a704505 Mon Sep 17 00:00:00 2001 From: Harald Leithner Date: Sun, 27 Jun 2021 13:04:18 +0200 Subject: [PATCH 2/2] Allow new language files without language tag also for packages --- src/Tasks/Deploy/Package.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Tasks/Deploy/Package.php b/src/Tasks/Deploy/Package.php index 124b84e..2198ec6 100644 --- a/src/Tasks/Deploy/Package.php +++ b/src/Tasks/Deploy/Package.php @@ -536,7 +536,7 @@ public function createPackageZip() // If the package has language files, add those $pkg_languages_path = $pkg_path . "/language"; - $languages = glob($pkg_languages_path . "/*/*.pkg_" . $this->getExtensionName() . "*.ini"); + $languages = glob($pkg_languages_path . "/*/*pkg_" . $this->getExtensionName() . "*.ini"); // Add all package language files foreach ($languages as $lang_path)