From a381cbc241582a84725b1c84303f088b59b3929e Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Wed, 23 Mar 2016 15:34:25 +0100 Subject: [PATCH] Fix the translations of the User menu --- lib/private/l10n/factory.php | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/lib/private/l10n/factory.php b/lib/private/l10n/factory.php index 1440e9510c..7e3f35e753 100644 --- a/lib/private/l10n/factory.php +++ b/lib/private/l10n/factory.php @@ -89,20 +89,18 @@ class Factory implements IFactory { if ($lang !== null) { $lang = str_replace(array('\0', '/', '\\', '..'), '', (string) $lang); } - $key = $lang; - if ($key === null || !$this->languageExists($app, $lang)) { - $key = 'null'; + if ($lang === null || !$this->languageExists($app, $lang)) { $lang = $this->findLanguage($app); } - if (!isset($this->instances[$key][$app])) { - $this->instances[$key][$app] = new L10N( + if (!isset($this->instances[$lang][$app])) { + $this->instances[$lang][$app] = new L10N( $this, $app, $lang, $this->getL10nFilesForApp($app, $lang) ); } - return $this->instances[$key][$app]; + return $this->instances[$lang][$app]; } /**