aboutsummaryrefslogtreecommitdiff
path: root/cli/i18n/I18nFile.php
diff options
context:
space:
mode:
authorGravatar Alexis Degrugillier <aledeg@users.noreply.github.com> 2022-10-20 17:42:47 -0400
committerGravatar GitHub <noreply@github.com> 2022-10-20 23:42:47 +0200
commit1f4e347cae51667e7cf5772aef55d274a39c8023 (patch)
tree86ba1032c30b581223a7131764d8384f4b566d88 /cli/i18n/I18nFile.php
parentd4181e098d93379c21251bd94d1397e16e56218a (diff)
Add tests on i18n classes (#4756)
Diffstat (limited to 'cli/i18n/I18nFile.php')
-rw-r--r--cli/i18n/I18nFile.php11
1 files changed, 2 insertions, 9 deletions
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);
}