From 3e2d6286f303098f016c5f665fbfc2920ad7c278 Mon Sep 17 00:00:00 2001 From: ruan <2369127-ruany@users.noreply.gitlab.com> Date: Thu, 7 Jan 2021 21:12:44 +0200 Subject: [PATCH] Disable English fallback --- README.md | 2 +- inc/page.php | 10 ++-------- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index e50cc30..dfcd563 100644 --- a/README.md +++ b/README.md @@ -8,6 +8,6 @@ All translations in the "lang" folder have been contributed by users. Only the " I do not update these files -- even if I fully understood all of these languages, unfortunately I would not have the time to update all of the translations on my own, especially with the growing number of translations. -As a result, in the future, these translations may contain untranslated English text until they are updated. +As a result, in the future, these translations may become outdated. Pull requests are welcome if you want to fix any problems with user contributed translations. diff --git a/inc/page.php b/inc/page.php index 5ba1681..6e714ae 100644 --- a/inc/page.php +++ b/inc/page.php @@ -14,14 +14,12 @@ class Page { setlocale(LC_ALL, $settings->lang); require_once './lang/en_US.utf8.php'; - $this->defaultlang = new en_US(); - require_once './lang/' . $settings->lang . '.php'; $lang_class = substr($settings->lang, 0, strpos($settings->lang, ".")); // grab "en_US" from "en_US.utf8" if ($lang_class !== "en_US" && class_exists($lang_class)) { $this->lang = new $lang_class; } else { - $this->lang = $this->defaultlang; + $this->lang = new en_US(); } $this->conn = $settings->conn; @@ -115,11 +113,7 @@ class Page { if (array_key_exists($str, $this->lang->array)) { return $this->lang->array[$str]; } - if (array_key_exists($str, $this->defaultlang->array)) { - return $this->defaultlang->array[$str]; - } -// return "404"; - return $str; + return "[$str]"; } public function type_info($type) {