Fixed wrong language in Admin Tools [#2077]

This commit is contained in:
Matias Griese
2021-02-23 21:05:20 +02:00
parent d962316740
commit e115eba2cc
2 changed files with 6 additions and 6 deletions

View File

@@ -8,6 +8,7 @@
1. [](#bugfix) 1. [](#bugfix)
* Regression: Fixed enabling/disabling plugin or theme corrupting configuration * Regression: Fixed enabling/disabling plugin or theme corrupting configuration
* Fixed unnecessary closing bracket cuasing JS error [#2079](https://github.com/getgrav/grav-plugin-admin/issues/2079) * Fixed unnecessary closing bracket cuasing JS error [#2079](https://github.com/getgrav/grav-plugin-admin/issues/2079)
* Fixed wrong language in Admin Tools [#2077](https://github.com/getgrav/grav-plugin-admin/issues/2077)
# v1.10.5 # v1.10.5
## 02/18/2021 ## 02/18/2021

View File

@@ -465,13 +465,12 @@ class AdminPlugin extends Plugin
*/ */
public function onAdminTools(Event $event) public function onAdminTools(Event $event)
{ {
$lang = $this->grav['language'];
$event['tools'] = array_merge($event['tools'], [ $event['tools'] = array_merge($event['tools'], [
'backups' => [['admin.maintenance', 'admin.super'], $lang->translate('PLUGIN_ADMIN.BACKUPS')], 'backups' => [['admin.maintenance', 'admin.super'], 'PLUGIN_ADMIN.BACKUPS'],
'scheduler' => [['admin.super'], $lang->translate('PLUGIN_ADMIN.SCHEDULER')], 'scheduler' => [['admin.super'], 'PLUGIN_ADMIN.SCHEDULER'],
'logs' => [['admin.super'], $lang->translate('PLUGIN_ADMIN.LOGS')], 'logs' => [['admin.super'], 'PLUGIN_ADMIN.LOGS'],
'reports' => [['admin.super'], $lang->translate('PLUGIN_ADMIN.REPORTS')], 'reports' => [['admin.super'], 'PLUGIN_ADMIN.REPORTS'],
'direct-install' => [['admin.super'], $lang->translate('PLUGIN_ADMIN.DIRECT_INSTALL')], 'direct-install' => [['admin.super'], 'PLUGIN_ADMIN.DIRECT_INSTALL'],
]); ]);
return $event; return $event;