Skip to content
Snippets Groups Projects
Commit 124719cc authored by Tim van Dijen's avatar Tim van Dijen
Browse files

Fix incorrect use of gettext

parent 81713d9a
No related branches found
No related tags found
No related merge requests found
...@@ -11,6 +11,7 @@ declare(strict_types=1); ...@@ -11,6 +11,7 @@ declare(strict_types=1);
namespace SimpleSAML\Locale; namespace SimpleSAML\Locale;
use Exception; use Exception;
use Gettext\Generator\ArrayGenerator;
use Gettext\Loader\PoLoader; use Gettext\Loader\PoLoader;
use Gettext\Translations; use Gettext\Translations;
use Gettext\Translator; use Gettext\Translator;
...@@ -250,8 +251,7 @@ class Localization ...@@ -250,8 +251,7 @@ class Localization
$file = new File($langPath . $domain . '.po'); $file = new File($langPath . $domain . '.po');
if ($this->fileSystem->exists($file->getRealPath()) && $file->isReadable()) { if ($this->fileSystem->exists($file->getRealPath()) && $file->isReadable()) {
$poLoader = new PoLoader(); $translations = (new PoLoader())->loadFile($file);
$translations = $poLoader->loadFile($file);
$arrayGenerator = new ArrayGenerator(); $arrayGenerator = new ArrayGenerator();
$this->translator->addTranslations( $this->translator->addTranslations(
$arrayGenerator->generateArray($translations) $arrayGenerator->generateArray($translations)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment