Merge pull request #21754 from nextcloud/td/no_translation_on_each_request

Only translate if we need the string
This commit is contained in:
Roeland Jago Douma 2020-07-08 19:08:34 +02:00 committed by GitHub
commit 44f8312cd3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -851,7 +851,6 @@ class OC_Util {
];
$missingDependencies = [];
$invalidIniSettings = [];
$moduleHint = $l->t('Please ask your server administrator to install the module.');
$iniWrapper = \OC::$server->getIniWrapper();
foreach ($dependencies['classes'] as $class => $module) {
@ -890,7 +889,7 @@ class OC_Util {
foreach ($missingDependencies as $missingDependency) {
$errors[] = [
'error' => $l->t('PHP module %s not installed.', [$missingDependency]),
'hint' => $moduleHint
'hint' => $l->t('Please ask your server administrator to install the module.'),
];
$webServerRestart = true;
}