fix L10n path after move

这个提交包含在:
Philipp Holzer 2020-01-19 17:11:48 +01:00
父节点 174129af94
当前提交 8138b05032
找不到此签名对应的密钥
GPG 密钥 ID: D8365C3D36B77D90
共有 2 个文件被更改,包括 7 次插入7 次删除

查看文件

@ -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;

查看文件

@ -1,6 +1,6 @@
<?php
namespace src\Core\L10n;
namespace Friendica\Test\src\Core\L10n;
use Friendica\Core\L10n;
use Friendica\Test\MockedTest;