Merge pull request #27676 from nextcloud/localize-invitation-email-subjects

Localize invitation email subjects
This commit is contained in:
Lukas Reschke 2021-06-28 19:10:24 +02:00 committed by GitHub
commit 583e597237
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -517,13 +517,16 @@ class IMipPlugin extends SabreIMipPlugin {
private function addSubjectAndHeading(IEMailTemplate $template, IL10N $l10n,
$method, $summary) {
if ($method === self::METHOD_CANCEL) {
$template->setSubject('Canceled: ' . $summary);
// TRANSLATORS Subject for email, when an invitation is cancelled. Ex: "Cancelled: {{Event Name}}"
$template->setSubject($l10n->t('Cancelled: %1$s', [$summary]));
$template->addHeading($l10n->t('Invitation canceled'));
} elseif ($method === self::METHOD_REPLY) {
$template->setSubject('Re: ' . $summary);
// TRANSLATORS Subject for email, when an invitation is updated. Ex: "Re: {{Event Name}}"
$template->setSubject($l10n->t('Re: %1$s', [$summary]));
$template->addHeading($l10n->t('Invitation updated'));
} else {
$template->setSubject('Invitation: ' . $summary);
// TRANSLATORS Subject for email, when an invitation is sent. Ex: "Invitation: {{Event Name}}"
$template->setSubject($l10n->t('Invitation: %1$s', [$summary]));
$template->addHeading($l10n->t('Invitation'));
}
}