Replace $this->l10n->t() with $this->t() for Modules

This commit is contained in:
Philipp 2021-11-18 21:33:05 +01:00
parent 207662251d
commit dab9e13c69
No known key found for this signature in database
GPG key ID: 24A7501396EB5432
23 changed files with 246 additions and 226 deletions

View file

@ -91,7 +91,7 @@ abstract class BaseNotifications extends BaseModule
parent::__construct($l10n, $parameters);
if (!local_user()) {
throw new ForbiddenException($this->l10n->t('Permission denied.'));
throw new ForbiddenException($this->t('Permission denied.'));
}
$page = ($_REQUEST['page'] ?? 0) ?: 1;
@ -144,7 +144,7 @@ abstract class BaseNotifications extends BaseModule
$notif_tpl = Renderer::getMarkupTemplate('notifications/notifications.tpl');
return Renderer::replaceMacros($notif_tpl, [
'$header' => $header ?? $this->l10n->t('Notifications'),
'$header' => $header ?? $this->t('Notifications'),
'$tabs' => $tabs,
'$notifications' => $notifications,
'$noContent' => $noContent,
@ -167,7 +167,7 @@ abstract class BaseNotifications extends BaseModule
foreach (self::URL_TYPES as $type => $url) {
$tabs[] = [
'label' => $this->l10n->t(self::PRINT_TYPES[$type]),
'label' => $this->t(self::PRINT_TYPES[$type]),
'url' => 'notifications/' . $url,
'sel' => (($selected == $url) ? 'active' : ''),
'id' => $type . '-tab',