diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2016-03-23 23:20:00 +0100 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2016-03-23 23:20:00 +0100 |
commit | 6fc92453f3ade9bfdb5286b74bf64457e88e8917 (patch) | |
tree | 468fd96681671499b73b4409e5b9241d5c6d5236 | |
parent | 765cff49fab0cf293562c169061dfaf3b1bc76d4 (diff) | |
parent | 6026b67280c79ed19bd14fc5729b475b30d0ee14 (diff) | |
download | nextcloud-server-6fc92453f3ade9bfdb5286b74bf64457e88e8917.tar.gz nextcloud-server-6fc92453f3ade9bfdb5286b74bf64457e88e8917.zip |
Merge pull request #23515 from owncloud/issue-22695-wrong-menu-translations
Fix the translations of the User menu
-rw-r--r-- | lib/private/l10n/factory.php | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/lib/private/l10n/factory.php b/lib/private/l10n/factory.php index fd093c3601b..8f157d9c0bb 100644 --- a/lib/private/l10n/factory.php +++ b/lib/private/l10n/factory.php @@ -95,20 +95,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]; } /** |