diff options
author | dartcafe <github@dartcafe.de> | 2022-01-27 13:28:12 +0300 |
---|---|---|
committer | dartcafe <github@dartcafe.de> | 2022-01-27 13:28:12 +0300 |
commit | d674c0c9efddc08dd36a9c941c444b02a1cb02b8 (patch) | |
tree | de71b1413cfb6099568a69e02d6a604392186b2b /lib | |
parent | 83a66811973ee509f4d808aac4af88a8c7082208 (diff) |
forgotten replacements
Signed-off-by: dartcafe <github@dartcafe.de>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Model/Mail/InvitationMail.php | 16 | ||||
-rw-r--r-- | lib/Model/Mail/NotificationMail.php | 58 | ||||
-rw-r--r-- | lib/Model/Mail/ReminderMail.php | 20 | ||||
-rw-r--r-- | lib/Settings/ActivityVote.php | 2 |
4 files changed, 48 insertions, 48 deletions
diff --git a/lib/Model/Mail/InvitationMail.php b/lib/Model/Mail/InvitationMail.php index 1acbe51d..6c0951a3 100644 --- a/lib/Model/Mail/InvitationMail.php +++ b/lib/Model/Mail/InvitationMail.php @@ -46,20 +46,20 @@ class InvitationMail extends MailBase { } public function buildEmailTemplate() : void { - $this->emailTemplate->setSubject($this->trans->t('Poll invitation "%s"', $this->poll->getTitle())); + $this->emailTemplate->setSubject($this->l10n->t('Poll invitation "%s"', $this->poll->getTitle())); $this->emailTemplate->addHeader(); - $this->emailTemplate->addHeading($this->trans->t('Poll invitation "%s"', $this->poll->getTitle()), false); + $this->emailTemplate->addHeading($this->l10n->t('Poll invitation "%s"', $this->poll->getTitle()), false); $this->emailTemplate->addBodyText($this->getMainBody()); $this->emailTemplate->addBodyText($this->getRichDescription()); $this->emailTemplate->addBodyButton( - $this->trans->t('Go to poll'), + $this->l10n->t('Go to poll'), $this->url ); - $this->emailTemplate->addBodyText($this->trans->t('This link gives you personal access to the poll named above. Press the button above or copy the following link and add it in your browser\'s location bar:')); + $this->emailTemplate->addBodyText($this->l10n->t('This link gives you personal access to the poll named above. Press the button above or copy the following link and add it in your browser\'s location bar:')); $this->emailTemplate->addBodyText($this->url); - $this->emailTemplate->addBodyText($this->trans->t('Do not share this link with other people, because it is connected to your votes.')); - $this->emailTemplate->addFooter($this->trans->t('This email is sent to you, because you are invited to vote in this poll by the poll owner. At least your name or your email address is recorded in this poll. If you want to get removed from this poll, contact the site administrator or the initiator of this poll, where the mail is sent from.')); + $this->emailTemplate->addBodyText($this->l10n->t('Do not share this link with other people, because it is connected to your votes.')); + $this->emailTemplate->addFooter($this->l10n->t('This email is sent to you, because you are invited to vote in this poll by the poll owner. At least your name or your email address is recorded in this poll. If you want to get removed from this poll, contact the site administrator or the initiator of this poll, where the mail is sent from.')); } protected function getMainBody() : string { @@ -67,13 +67,13 @@ class InvitationMail extends MailBase { return str_replace( ['{owner}', '{title}', '{group_name}'], [$this->owner->getDisplayName(), $this->poll->getTitle(), $this->share->getDisplayName()], - $this->trans->t('{owner} invited you to take part in the poll "{title}" as a member of the group {group_name}') + $this->l10n->t('{owner} invited you to take part in the poll "{title}" as a member of the group {group_name}') ); } else { return str_replace( ['{owner}', '{title}'], [$this->owner->getDisplayName(), $this->poll->getTitle()], - $this->trans->t('{owner} invited you to take part in the poll "{title}"') + $this->l10n->t('{owner} invited you to take part in the poll "{title}"') ); } } diff --git a/lib/Model/Mail/NotificationMail.php b/lib/Model/Mail/NotificationMail.php index 9f179dc5..a824e469 100644 --- a/lib/Model/Mail/NotificationMail.php +++ b/lib/Model/Mail/NotificationMail.php @@ -48,19 +48,19 @@ class NotificationMail extends MailBase { } public function buildEmailTemplate() : void { - $this->emailTemplate->setSubject($this->trans->t('Polls App - New Activity')); + $this->emailTemplate->setSubject($this->l10n->t('Polls App - New Activity')); $this->emailTemplate->addHeader(); - $this->emailTemplate->addHeading($this->trans->t('Polls App - New Activity'), false); + $this->emailTemplate->addHeading($this->l10n->t('Polls App - New Activity'), false); $this->emailTemplate->addBodyText(str_replace( ['{title}'], [$this->poll->getTitle()], - $this->trans->t('"{title}" has recent activity:') + $this->l10n->t('"{title}" has recent activity:') )); foreach ($this->subscription->getNotifyLogs() as $logItem) { if ($this->poll->getAnonymous() || $this->poll->getShowResults() !== "always") { // hide actor's name if poll is anonymous or results are hidden - $displayName = $this->trans->t('A user'); + $displayName = $this->l10n->t('A user'); } else { $displayName = $this->getUser($logItem->getUserId())->getDisplayName(); } @@ -68,35 +68,35 @@ class NotificationMail extends MailBase { $this->emailTemplate->addBodyListItem($this->getComposedLogString($logItem, $displayName)); } - $this->emailTemplate->addBodyButton(htmlspecialchars($this->trans->t('Go to poll')), $this->url, ''); - $this->emailTemplate->addFooter($this->trans->t('This email is sent to you, because you subscribed to notifications of this poll. To opt out, visit the poll and remove your subscription.')); + $this->emailTemplate->addBodyButton(htmlspecialchars($this->l10n->t('Go to poll')), $this->url, ''); + $this->emailTemplate->addFooter($this->l10n->t('This email is sent to you, because you subscribed to notifications of this poll. To opt out, visit the poll and remove your subscription.')); } protected function getComposedLogString(Log $logItem, string $displayName): string { $logStrings = [ - Log::MSG_ID_SETVOTE => $this->trans->t('%s has voted.', [$displayName]), - Log::MSG_ID_UPDATEPOLL => $this->trans->t('Updated poll configuration. Please check your votes.'), - Log::MSG_ID_DELETEPOLL => $this->trans->t('The poll has been deleted.'), - Log::MSG_ID_RESTOREPOLL => $this->trans->t('The poll has been restored.'), - Log::MSG_ID_EXPIREPOLL => $this->trans->t('The poll has been closed.'), - Log::MSG_ID_ADDOPTION => $this->trans->t('A voting option has been added.'), - Log::MSG_ID_UPDATEOPTION => $this->trans->t('A voting option has been changed.'), - Log::MSG_ID_CONFIRMOPTION => $this->trans->t('A voting option has been confirmed.'), - Log::MSG_ID_DELETEOPTION => $this->trans->t('A voting option has been removed.'), - Log::MSG_ID_OWNERCHANGE => $this->trans->t('The poll owner has been changed.'), - Log::MSG_ID_ADDPOLL => $this->trans->t('%s created the poll.', [$displayName]), - PollEvent::ADD => $this->trans->t('%s created the poll.', [$displayName]), - PollEvent::UPDATE => $this->trans->t('Updated poll configuration. Please check your votes.'), - PollEvent::DELETE => $this->trans->t('The poll has been deleted.'), - PollEvent::RESTORE => $this->trans->t('The poll has been restored.'), - PollEvent::EXPIRE => $this->trans->t('The poll has been closed.'), - PollEvent::OWNER_CHANGE => $this->trans->t('The poll owner has been changed.'), - OptionEvent::ADD => $this->trans->t('A voting option has been added.'), - OptionEvent::UPDATE => $this->trans->t('A voting option has been changed.'), - OptionEvent::CONFIRM => $this->trans->t('A voting option has been confirmed.'), - OptionEvent::UNCONFIRM => $this->trans->t('A voting option has been unconfirmed.'), - OptionEvent::DELETE => $this->trans->t('A voting option has been removed.'), - VoteEvent::SET => $this->trans->t('%s has voted.', [$displayName]), + Log::MSG_ID_SETVOTE => $this->l10n->t('%s has voted.', [$displayName]), + Log::MSG_ID_UPDATEPOLL => $this->l10n->t('Updated poll configuration. Please check your votes.'), + Log::MSG_ID_DELETEPOLL => $this->l10n->t('The poll has been deleted.'), + Log::MSG_ID_RESTOREPOLL => $this->l10n->t('The poll has been restored.'), + Log::MSG_ID_EXPIREPOLL => $this->l10n->t('The poll has been closed.'), + Log::MSG_ID_ADDOPTION => $this->l10n->t('A voting option has been added.'), + Log::MSG_ID_UPDATEOPTION => $this->l10n->t('A voting option has been changed.'), + Log::MSG_ID_CONFIRMOPTION => $this->l10n->t('A voting option has been confirmed.'), + Log::MSG_ID_DELETEOPTION => $this->l10n->t('A voting option has been removed.'), + Log::MSG_ID_OWNERCHANGE => $this->l10n->t('The poll owner has been changed.'), + Log::MSG_ID_ADDPOLL => $this->l10n->t('%s created the poll.', [$displayName]), + PollEvent::ADD => $this->l10n->t('%s created the poll.', [$displayName]), + PollEvent::UPDATE => $this->l10n->t('Updated poll configuration. Please check your votes.'), + PollEvent::DELETE => $this->l10n->t('The poll has been deleted.'), + PollEvent::RESTORE => $this->l10n->t('The poll has been restored.'), + PollEvent::EXPIRE => $this->l10n->t('The poll has been closed.'), + PollEvent::OWNER_CHANGE => $this->l10n->t('The poll owner has been changed.'), + OptionEvent::ADD => $this->l10n->t('A voting option has been added.'), + OptionEvent::UPDATE => $this->l10n->t('A voting option has been changed.'), + OptionEvent::CONFIRM => $this->l10n->t('A voting option has been confirmed.'), + OptionEvent::UNCONFIRM => $this->l10n->t('A voting option has been unconfirmed.'), + OptionEvent::DELETE => $this->l10n->t('A voting option has been removed.'), + VoteEvent::SET => $this->l10n->t('%s has voted.', [$displayName]), ]; return $logStrings[$logItem->getMessageId()] ?? $logItem->getMessageId() . " (" . $displayName . ")"; diff --git a/lib/Model/Mail/ReminderMail.php b/lib/Model/Mail/ReminderMail.php index 30b5ac62..6fa58443 100644 --- a/lib/Model/Mail/ReminderMail.php +++ b/lib/Model/Mail/ReminderMail.php @@ -59,23 +59,23 @@ class ReminderMail extends MailBase { public function buildEmailTemplate() : void { $dtDeadline = new DateTime('now', $this->recipient->getTimeZone()); $dtDeadline->setTimestamp($this->deadline); - $deadlineText = (string) $this->trans->l('datetime', $dtDeadline, ['width' => 'long']); + $deadlineText = (string) $this->l10n->l('datetime', $dtDeadline, ['width' => 'long']); - $this->emailTemplate->setSubject($this->trans->t('Reminder for poll "%s"', $this->poll->getTitle())); + $this->emailTemplate->setSubject($this->l10n->t('Reminder for poll "%s"', $this->poll->getTitle())); $this->emailTemplate->addHeader(); - $this->emailTemplate->addHeading($this->trans->t('Reminder for poll "%s"', $this->poll->getTitle()), false); + $this->emailTemplate->addHeading($this->l10n->t('Reminder for poll "%s"', $this->poll->getTitle()), false); $reminderText = str_replace( ['{owner}'], [$this->owner->getDisplayName()], - $this->trans->t('{owner} sends you this reminder to make sure, your votes are set.') + $this->l10n->t('{owner} sends you this reminder to make sure, your votes are set.') ); if ($this->getReminderReason() === self::REASON_OPTION) { $reminderText = str_replace( ['{leftPeriod}', '{dateTime}', '{timezone}'], [($this->timeToDeadline / 3600), $deadlineText, $this->recipient->getTimeZone()->getName()], - $this->trans->t('The first poll option is away less than {leftPeriod} hours ({dateTime}, {timezone}).') + $this->l10n->t('The first poll option is away less than {leftPeriod} hours ({dateTime}, {timezone}).') ); } @@ -83,19 +83,19 @@ class ReminderMail extends MailBase { $reminderText = str_replace( ['{leftPeriod}', '{dateTime}', '{timezone}'], [($this->timeToDeadline / 3600), $deadlineText, $this->recipient->getTimeZone()->getName()], - $this->trans->t('The poll is about to expire in less than {leftPeriod} hours ({dateTime}, {timezone}).') + $this->l10n->t('The poll is about to expire in less than {leftPeriod} hours ({dateTime}, {timezone}).') ); } $this->emailTemplate->addBodyText($reminderText); $this->emailTemplate->addBodyButton( - $this->trans->t('Check your votes'), + $this->l10n->t('Check your votes'), $this->url ); - $this->emailTemplate->addBodyText($this->trans->t('This link gives you personal access to the poll named above. Press the button above or copy the following link and add it in your browser\'s location bar:')); + $this->emailTemplate->addBodyText($this->l10n->t('This link gives you personal access to the poll named above. Press the button above or copy the following link and add it in your browser\'s location bar:')); $this->emailTemplate->addBodyText($this->url); - $this->emailTemplate->addBodyText($this->trans->t('Do not share this link with other people, because it is connected to your votes.')); - $this->emailTemplate->addFooter($this->trans->t('This email is sent to you, because you are invited to vote in this poll by the poll owner. At least your name or your email address is recorded in this poll. If you want to get removed from this poll, contact the site administrator or the initiator of this poll, where the mail is sent from.')); + $this->emailTemplate->addBodyText($this->l10n->t('Do not share this link with other people, because it is connected to your votes.')); + $this->emailTemplate->addFooter($this->l10n->t('This email is sent to you, because you are invited to vote in this poll by the poll owner. At least your name or your email address is recorded in this poll. If you want to get removed from this poll, contact the site administrator or the initiator of this poll, where the mail is sent from.')); } public function getReminderReason() : ?string { diff --git a/lib/Settings/ActivityVote.php b/lib/Settings/ActivityVote.php index 33974529..829e2252 100644 --- a/lib/Settings/ActivityVote.php +++ b/lib/Settings/ActivityVote.php @@ -29,6 +29,6 @@ class ActivityVote extends ActivitySettings { } public function getName() : string { - return $this->l->t('Someone voted inside a <strong>poll</strong>'); + return $this->l10n->t('Someone voted inside a <strong>poll</strong>'); } } |