From 1f4e347cae51667e7cf5772aef55d274a39c8023 Mon Sep 17 00:00:00 2001 From: Alexis Degrugillier Date: Thu, 20 Oct 2022 17:42:47 -0400 Subject: Add tests on i18n classes (#4756) --- cli/i18n/I18nFile.php | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) (limited to 'cli/i18n/I18nFile.php') diff --git a/cli/i18n/I18nFile.php b/cli/i18n/I18nFile.php index a7045459c..fca31d662 100644 --- a/cli/i18n/I18nFile.php +++ b/cli/i18n/I18nFile.php @@ -3,16 +3,9 @@ require_once __DIR__ . '/I18nValue.php'; class I18nFile { - - private $i18nPath; - - public function __construct() { - $this->i18nPath = __DIR__ . '/../../app/i18n'; - } - public function load() { $i18n = array(); - $dirs = new DirectoryIterator($this->i18nPath); + $dirs = new DirectoryIterator(I18N_PATH); foreach ($dirs as $dir) { if ($dir->isDot()) { continue; @@ -32,7 +25,7 @@ class I18nFile { public function dump(array $i18n) { foreach ($i18n as $language => $file) { - $dir = $this->i18nPath . DIRECTORY_SEPARATOR . $language; + $dir = I18N_PATH . DIRECTORY_SEPARATOR . $language; if (!file_exists($dir)) { mkdir($dir); } -- cgit v1.2.3