MDL-70608 lang: Recommend running the scheduled task to update packs

This commit is contained in:
David Mudrák 2021-01-11 21:45:14 +01:00
parent c85215e955
commit af9ad8b2b6
3 changed files with 9 additions and 0 deletions

View File

@ -107,6 +107,11 @@ class langimport_page implements renderable, templatable {
$data->caninstall = true;
}
if (count($this->installedlanguages) > 3) {
$data->hasmanyinstalledlanguages = true;
$data->updatelangstaskname = get_string('updatelangs', 'tool_langimport');
}
return $data;
}
}

View File

@ -54,4 +54,5 @@ $string['selectlangs'] = 'Select languages to uninstall';
$string['uninstall'] = 'Uninstall selected language pack(s)';
$string['uninstallconfirm'] = 'You are about to completely uninstall these language packs: <strong>{$a}</strong>. Are you sure?';
$string['updatelangs'] = 'Update all installed language packs';
$string['updatelangsnote'] = 'Updating all installed language packs by clicking the button can take a long time and lead to timeouts. It is recommended instead to make use of the scheduled task \'{$a->taskname}\' (which runs by default every day).';
$string['privacy:metadata'] = 'The Language packs plugin does not store any personal data.';

View File

@ -88,6 +88,9 @@
<form id="updateform" action="{{updateurl}}" method="post">
<fieldset>
<input type="submit" value="{{#str}}updatelangs, tool_langimport{{/str}}" class="btn btn-secondary">
{{#hasmanyinstalledlanguages}}
<p class="mt-2 small">{{#str}} updatelangsnote, tool_langimport, {"taskname": {{#quote}}{{updatelangstaskname}}{{/quote}} }{{/str}}</p>
{{/hasmanyinstalledlanguages}}
</fieldset>
</form>
</div>