From 8bd573b3da18836d4efa0610077b38a32cb49f34 Mon Sep 17 00:00:00 2001 From: HB9HIL Date: Thu, 6 Jun 2024 22:20:18 +0200 Subject: [PATCH] only show error if lang is not english --- application/hooks/gettext/vendor/php-gettext/gettext.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/application/hooks/gettext/vendor/php-gettext/gettext.php b/application/hooks/gettext/vendor/php-gettext/gettext.php index 26db13aeb..abde1b7f7 100644 --- a/application/hooks/gettext/vendor/php-gettext/gettext.php +++ b/application/hooks/gettext/vendor/php-gettext/gettext.php @@ -138,13 +138,19 @@ function _get_reader($domain = null, $category = 5, $enable_cache = true) $locale_names = get_list_of_locales($locale); $input = null; foreach($locale_names as $locale) { + $is_en = false; + if (strpos($locale, 'en') === 0) { + $is_en = true; + } $full_path = APPPATH . "locale/" . $locale . "/" . $subpath; // we need so set a fix path here, to match our folder structure // log_message('error', 'full path: '. $full_path); if (file_exists($full_path)) { $input = new FileReader($full_path); break; } else { - log_message('error', "Language Path does not exist. _get_reader() in gettext.php"); + if(!$is_en) { + log_message('error', "Language Path '". $locale ."' does not exist. _get_reader() in gettext.php"); + } } }