diff options
author | Joas Schilling <213943+nickvergessen@users.noreply.github.com> | 2020-07-23 21:25:03 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-23 21:25:03 +0200 |
commit | 9a264ace7acbe35f75156876704cb5754bc2663e (patch) | |
tree | 5cc212ae1f749e822fddc5ac5e2c7701035bd1ee /lib/Notification | |
parent | 106f8e730bbbc3586615deafb08d9de105226f81 (diff) |
Update Notifier.phpnickvergessen-patch-1
Diffstat (limited to 'lib/Notification')
-rw-r--r-- | lib/Notification/Notifier.php | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/lib/Notification/Notifier.php b/lib/Notification/Notifier.php index 1b7db739..49414c98 100644 --- a/lib/Notification/Notifier.php +++ b/lib/Notification/Notifier.php @@ -31,7 +31,6 @@ namespace OCA\Social\Notification; use InvalidArgumentException; -use OC; use OCA\Social\AppInfo\Application; use OCP\Contacts\IManager; use OCP\Federation\ICloudIdManager; @@ -109,7 +108,7 @@ class Notifier implements INotifier { throw new InvalidArgumentException(); } - $l10n = OC::$server->getL10N(Application::APP_NAME, $languageCode); + $l10n = $this->factory->get(Application::APP_NAME, $languageCode); $notification->setIcon( $this->url->getAbsoluteURL($this->url->imagePath('social', 'social_dark.svg')) @@ -118,12 +117,11 @@ class Notifier implements INotifier { switch ($notification->getSubject()) { case 'update_alpha3': - $notification->setParsedSubject('The Social App have been updated to alpha3.'); + $notification->setParsedSubject('The Social App has been updated to alpha3.'); $notification->setParsedMessage( $l10n->t( 'Please note that the data from alpha2 can only be migrated manually. - A detailed documentation to guide you during this process is available using the button below.', - $params + A detailed documentation to guide you during this process is available using the button below.' ) ); break; @@ -136,7 +134,7 @@ class Notifier implements INotifier { foreach ($notification->getActions() as $action) { switch ($action->getLabel()) { case 'help': - $action->setParsedLabel((string)$l10n->t('Help')) + $action->setParsedLabel($l10n->t('Help')) ->setPrimary(true); break; } |