Merge pull request #23541 from owncloud/backport-23515-menu-language
[9.0] Fix the translations of the User menu
This commit is contained in:
commit
4da4163d14
|
@ -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…
Reference in New Issue