]> git.mxchange.org Git - friendica.git/blobdiff - src/Core/L10n.php
Shorten "Configuration" to "Config" again, since the Wrapper is gone
[friendica.git] / src / Core / L10n.php
index 3f92dd5800c35b857295dcb391050c69bf8a8d0b..9fec8735f005851187c4d5634d6c02c9dfc253cb 100644 (file)
@@ -2,7 +2,7 @@
 
 namespace Friendica\Core;
 
-use Friendica\Core\Config\IConfiguration;
+use Friendica\Core\Config\IConfig;
 use Friendica\Core\Session\ISession;
 use Friendica\Database\Database;
 use Friendica\Util\Strings;
@@ -40,7 +40,7 @@ class L10n
         */
        private $logger;
 
-       public function __construct(IConfiguration $config, Database $dba, LoggerInterface $logger, ISession $session, array $server, array $get)
+       public function __construct(IConfig $config, Database $dba, LoggerInterface $logger, ISession $session, array $server, array $get)
        {
                $this->dba    = $dba;
                $this->logger = $logger;
@@ -115,13 +115,13 @@ class L10n
                $addons = $this->dba->select('addon', ['name'], ['installed' => true]);
                while ($p = $this->dba->fetch($addons)) {
                        $name = Strings::sanitizeFilePathItem($p['name']);
-                       if (file_exists("addon/$name/lang/$lang/strings.php")) {
-                               include __DIR__ . "/../../../addon/$name/lang/$lang/strings.php";
+                       if (file_exists(__DIR__ . "/../../addon/$name/lang/$lang/strings.php")) {
+                               include __DIR__ . "/../../addon/$name/lang/$lang/strings.php";
                        }
                }
 
-               if (file_exists(__DIR__ . "/../../../view/lang/$lang/strings.php")) {
-                       include __DIR__ . "/../../../view/lang/$lang/strings.php";
+               if (file_exists(__DIR__ . "/../../view/lang/$lang/strings.php")) {
+                       include __DIR__ . "/../../view/lang/$lang/strings.php";
                }
 
                $this->lang    = $lang;
@@ -191,8 +191,8 @@ class L10n
                        while (count($lang_code)) {
                                // try to mix them so we can get double-code parts too
                                $match_lang = strtolower(join('-', $lang_code));
-                               if (file_exists(__DIR__ . "/../../../view/lang/$match_lang") &&
-                                   is_dir(__DIR__ . "/../../../view/lang/$match_lang")) {
+                               if (file_exists(__DIR__ . "/../../view/lang/$match_lang") &&
+                                   is_dir(__DIR__ . "/../../view/lang/$match_lang")) {
                                        if ($lang_quality > $current_q) {
                                                $current_lang = $match_lang;
                                                $current_q    = $lang_quality;