Do not save the language as request lang for apps when we didn't find any
This commit is contained in:
parent
adf7e7295e
commit
9fbb8ce302
2 changed files with 10 additions and 1 deletions
|
@ -263,7 +263,7 @@ class Factory implements IFactory {
|
|||
}
|
||||
}
|
||||
|
||||
if (!$this->requestLanguage) {
|
||||
if ($app === null && !$this->requestLanguage) {
|
||||
$this->requestLanguage = 'en';
|
||||
}
|
||||
return 'en'; // Last try: English
|
||||
|
|
|
@ -343,6 +343,15 @@ class FactoryTest extends TestCase {
|
|||
[null, 'de', 'ru', ['de'], 'de', 'ru'],
|
||||
[null, 'de,en', 'ru', ['de'], 'de', 'ru'],
|
||||
[null, 'de-DE,en-US;q=0.8,en;q=0.6', 'ru', ['de'], 'de', 'ru'],
|
||||
|
||||
// Request lang should not be set for apps: Language is available
|
||||
['files_pdfviewer', 'de', null, ['de'], 'de', ''],
|
||||
['files_pdfviewer', 'de,en', null, ['de'], 'de', ''],
|
||||
['files_pdfviewer', 'de-DE,en-US;q=0.8,en;q=0.6', null, ['de'], 'de', ''],
|
||||
// Request lang should not be set for apps: Language is not available
|
||||
['files_pdfviewer', 'de', null, ['ru'], 'en', ''],
|
||||
['files_pdfviewer', 'de,en', null, ['ru', 'en'], 'en', ''],
|
||||
['files_pdfviewer', 'de-DE,en-US;q=0.8,en;q=0.6', null, ['ru', 'en'], 'en', ''],
|
||||
];
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue