Browse Source

Merge pull request #23515 from owncloud/issue-22695-wrong-menu-translations

Fix the translations of the User menu
tags/v9.1.0beta1
Thomas Müller 8 years ago
parent
commit
6fc92453f3
1 changed files with 4 additions and 6 deletions
  1. 4
    6
      lib/private/l10n/factory.php

+ 4
- 6
lib/private/l10n/factory.php View File

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

/**

Loading…
Cancel
Save