Skip to content

Commit

Permalink
Allow new language files without language tag (#46)
Browse files Browse the repository at this point in the history
* Allow new language files without language tag

* Allow new language files without language tag also for packages
  • Loading branch information
HLeithner authored Jun 27, 2021
1 parent 2884391 commit 5c73ffe
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/Tasks/Build/Language.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down Expand Up @@ -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);

Expand Down
2 changes: 1 addition & 1 deletion src/Tasks/Deploy/Package.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 5c73ffe

Please sign in to comment.