fix lang loading

This commit is contained in:
Dennis Eichhorn 2022-02-12 20:30:04 +01:00
parent cccfbdf418
commit 83bf0c9664
2 changed files with 5 additions and 2 deletions

View File

@ -46,7 +46,6 @@ final class Exporter extends ExporterAbstract
public function __construct(ConnectionAbstract $local, L11nManager $l11n)
{
parent::__construct($local, $l11n);
$this->l11n->loadLanguageFile('Exchange', __DIR__ . '/Lang/lang.php');
}
/**

View File

@ -49,7 +49,6 @@ final class Importer extends ImporterAbstract
public function __construct(ConnectionAbstract $local, ConnectionAbstract $remote, L11nManager $l11n)
{
parent::__construct($local, $remote, $l11n);
$this->l11n->loadLanguageFile('Exchange', __DIR__ . '/Lang/lang.php');
}
/**
@ -81,6 +80,11 @@ final class Importer extends ImporterAbstract
$start = new \DateTime($request->getData('start') ?? 'now');
$end = new \DateTime($request->getData('end') ?? 'now');
$lang = [];
$lang['Exchange'] = include __DIR__ . '/Lang/' . $request->getLanguage() . '.lang.php';
$this->l11n->loadLanguage($request->header->l11n->getLanguage(), 'Exchange', $lang);
if ($request->getData('db') !== null) {
$this->remote = ConnectionFactory::create([
'db' => (string) ($request->getData('db') ?? ''),