From 402b334db167c5c1b89de20b015348fc39b89c61 Mon Sep 17 00:00:00 2001 From: Michael <60653773+Mike-on-Tour@users.noreply.github.com> Date: Tue, 12 Apr 2022 11:58:48 +0200 Subject: [PATCH 1/3] Add check for existence of en language pack --- src/Tests/Tests/epv_test_validate_languages.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Tests/Tests/epv_test_validate_languages.php b/src/Tests/Tests/epv_test_validate_languages.php index 18d724c..9ba5d2d 100644 --- a/src/Tests/Tests/epv_test_validate_languages.php +++ b/src/Tests/Tests/epv_test_validate_languages.php @@ -79,6 +79,11 @@ public function validateDirectory(array $files) } } + if (!array_key_exists('en', $langs)) + { + $this->output->addMessage(OutputInterface::FATAL, sprintf("English language pack is missing")); + } + foreach ($langs as $lang_name => $file_contents) { // Check for missing language files From bf498f93fde629372a67b394d4e39e12a7f32dd1 Mon Sep 17 00:00:00 2001 From: Michael <60653773+Mike-on-Tour@users.noreply.github.com> Date: Tue, 12 Apr 2022 15:48:47 +0200 Subject: [PATCH 2/3] Bugfix - Add check for existence of en language pack --- src/Tests/Tests/epv_test_validate_languages.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Tests/Tests/epv_test_validate_languages.php b/src/Tests/Tests/epv_test_validate_languages.php index 9ba5d2d..57d45fd 100644 --- a/src/Tests/Tests/epv_test_validate_languages.php +++ b/src/Tests/Tests/epv_test_validate_languages.php @@ -79,7 +79,7 @@ public function validateDirectory(array $files) } } - if (!array_key_exists('en', $langs)) + if (!empty($langs) && !array_key_exists('en', $langs)) { $this->output->addMessage(OutputInterface::FATAL, sprintf("English language pack is missing")); } From 483f74db999cf728c9587431e833ad0c014bed85 Mon Sep 17 00:00:00 2001 From: Michael <60653773+Mike-on-Tour@users.noreply.github.com> Date: Tue, 12 Apr 2022 19:06:29 +0200 Subject: [PATCH 3/3] Add check for existence of en language pack - improve message output --- src/Tests/Tests/epv_test_validate_languages.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Tests/Tests/epv_test_validate_languages.php b/src/Tests/Tests/epv_test_validate_languages.php index 57d45fd..75a4ddf 100644 --- a/src/Tests/Tests/epv_test_validate_languages.php +++ b/src/Tests/Tests/epv_test_validate_languages.php @@ -81,7 +81,7 @@ public function validateDirectory(array $files) if (!empty($langs) && !array_key_exists('en', $langs)) { - $this->output->addMessage(OutputInterface::FATAL, sprintf("English language pack is missing")); + $this->output->addMessage(OutputInterface::FATAL, 'English language pack is missing'); } foreach ($langs as $lang_name => $file_contents)