Fix the translations of the User menu
This commit is contained in:
parent
abcee56fe3
commit
6026b67280
|
@ -89,20 +89,18 @@ class Factory implements IFactory {
|
||||||
if ($lang !== null) {
|
if ($lang !== null) {
|
||||||
$lang = str_replace(array('\0', '/', '\\', '..'), '', (string) $lang);
|
$lang = str_replace(array('\0', '/', '\\', '..'), '', (string) $lang);
|
||||||
}
|
}
|
||||||
$key = $lang;
|
if ($lang === null || !$this->languageExists($app, $lang)) {
|
||||||
if ($key === null || !$this->languageExists($app, $lang)) {
|
|
||||||
$key = 'null';
|
|
||||||
$lang = $this->findLanguage($app);
|
$lang = $this->findLanguage($app);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!isset($this->instances[$key][$app])) {
|
if (!isset($this->instances[$lang][$app])) {
|
||||||
$this->instances[$key][$app] = new L10N(
|
$this->instances[$lang][$app] = new L10N(
|
||||||
$this, $app, $lang,
|
$this, $app, $lang,
|
||||||
$this->getL10nFilesForApp($app, $lang)
|
$this->getL10nFilesForApp($app, $lang)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->instances[$key][$app];
|
return $this->instances[$lang][$app];
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue