Simplify phrases for notifications
authorMarcel Werk <burntime@woltlab.com>
Sat, 13 Feb 2021 17:03:02 +0000 (18:03 +0100)
committerMarcel Werk <burntime@woltlab.com>
Sat, 13 Feb 2021 17:03:02 +0000 (18:03 +0100)
See WoltLab/WCF#3958

files/lib/system/user/notification/event/ConversationMessageUserNotificationEvent.class.php
files/lib/system/user/notification/event/ConversationUserNotificationEvent.class.php
language/de.xml
language/en.xml

index 07783ad372ef2e3006693ba3759a680dccb320ee..eac7e7de11678022a6430ad782c35317d6635e7f 100644 (file)
@@ -82,6 +82,11 @@ class ConversationMessageUserNotificationEvent extends AbstractUserNotificationE
             'application' => 'wcf',
             'in-reply-to' => [$messageID],
             'references' => [$messageID],
+            'variables' => [
+                'author' => $this->author,
+                'message' => $this->userNotificationObject,
+                'conversation' => $this->userNotificationObject->getConversation(),
+            ],
         ];
     }
 
index 6568f363f279d0db9ca63b505d1fb5774860500b..b0d8f8628b1937bd922a748945c7ec07b5888302 100644 (file)
@@ -48,6 +48,10 @@ class ConversationUserNotificationEvent extends AbstractUserNotificationEvent im
             'message-id' => 'com.woltlab.wcf.conversation.notification/' . $this->getUserNotificationObject()->conversationID,
             'template' => 'email_notification_conversation',
             'application' => 'wcf',
+            'variables' => [
+                'author' => $this->author,
+                'conversation' => $this->userNotificationObject,
+            ],
         ];
     }
 
index 303be779b5660828ca57b83e5d0031577079cd31..415a255cd3bdbabbf6074645c1aa3f3998d9b9c5 100644 (file)
                <item name="wcf.user.notification.conversation.message.message.stacked"><![CDATA[{@'wcf.user.notification.stacked.authorList'|language} haben auf die Konversation <strong>{$message->getConversation()->getTitle()}</strong> geantwortet.]]></item>
                <item name="wcf.user.notification.conversation.message.title"><![CDATA[Neue Antwort auf Konversation]]></item>
                <item name="wcf.user.notification.conversation.message.title.stacked"><![CDATA[{#$count} Teilnehmer haben auf eine Konversation geantwortet]]></item>
-               <item name="wcf.user.notification.conversation.message.mail.plaintext"><![CDATA[{@$authorList} {if $count == 1 && !$guestTimesTriggered}hat{else}haben{/if} auf die Konversation „{@$event->getUserNotificationObject()->getConversation()->subject}“ [URL:{link controller='Conversation' object=$event->getUserNotificationObject()->getConversation() isEmail=true}{/link}] geantwortet{if $count == 1 && !$guestTimesTriggered}:{else}.{/if}]]></item>
-               <item name="wcf.user.notification.conversation.message.mail.html"><![CDATA[<p>{@$authorList} {if $count == 1 && !$guestTimesTriggered}hat{else}haben{/if} auf die Konversation <a href="{link controller='Conversation' object=$event->getUserNotificationObject()->getConversation() isHtmlEmail=true}{/link}">{$event->getUserNotificationObject()->getConversation()->subject}</a> geantwortet:</p>]]></item>
+               <item name="wcf.user.notification.conversation.message.mail.plaintext"><![CDATA[{@$authorList} {if $count == 1 && !$guestTimesTriggered}hat{else}haben{/if} auf die Konversation „{@$conversation->getTitle()}“ [URL:{@$message->getLink()}] geantwortet{if $count == 1 && !$guestTimesTriggered}:{else}.{/if}]]></item>
+               <item name="wcf.user.notification.conversation.message.mail.html"><![CDATA[<p>{@$authorList} {if $count == 1 && !$guestTimesTriggered}hat{else}haben{/if} auf die Konversation <a href="{$message->getLink()}">{$conversation->getTitle()}</a> geantwortet:</p>]]></item>
                <item name="wcf.user.notification.conversation.message.mail.title"><![CDATA["{@$author->username}" hat auf die Konversation "{$message->getConversation()->subject}" geantwortet]]></item>
                <item name="wcf.user.notification.conversation.message"><![CDATA[<strong>{$author}</strong> hat die Konversation <strong>{$conversation->getTitle()}</strong> gestartet.]]></item>
                <item name="wcf.user.notification.conversation.title"><![CDATA[Neue Konversation]]></item>
-               <item name="wcf.user.notification.conversation.mail.plaintext"><![CDATA[{@$event->getAuthor()->username} [URL:{link controller='User' object=$event->getAuthor() isEmail=true}{/link}] hat die Konversation „{@$event->getUserNotificationObject()->subject}“ [URL:{link controller='Conversation' object=$event->getUserNotificationObject() isEmail=true}{/link}] gestartet:]]></item>
-               <item name="wcf.user.notification.conversation.mail.html"><![CDATA[<p><a href="{link controller='User' object=$event->getAuthor() isHtmlEmail=true}{/link}">{$event->getAuthor()->username}</a> hat die Konversation <a href="{link controller='Conversation' object=$event->getUserNotificationObject() isHtmlEmail=true}{/link}">{$event->getUserNotificationObject()->subject}</a> gestartet:</p>]]></item>
+               <item name="wcf.user.notification.conversation.mail.plaintext"><![CDATA[{@$author} hat die Konversation „{@$conversation->getTitle()}“ [URL:{@$conversation->getLink()}] gestartet:]]></item>
+               <item name="wcf.user.notification.conversation.mail.html"><![CDATA[<p><strong>{$author}</strong> hat die Konversation <a href="{$conversation->getLink()}">{$conversation->getTitle()}</a> gestartet:</p>]]></item>
                <item name="wcf.user.notification.conversation.mail.title"><![CDATA[Neue Konversation von "{@$author->username}"]]></item>
                <item name="wcf.user.notification.com.woltlab.wcf.conversation"><![CDATA[Konversationen]]></item>
                <item name="wcf.user.notification.com.woltlab.wcf.conversation.notification.conversation"><![CDATA[Neue Konversation]]></item>
index 5ff66f97031e7175dc53156206c9c52efd3a468a..b6438bb3e4f1f384c8e92eb6098a8a0621392bec 100644 (file)
                <item name="wcf.user.notification.conversation.message.message.stacked"><![CDATA[{@'wcf.user.notification.stacked.authorList'|language} replied to the conversation <strong>{$message->getConversation()->getTitle()}</strong>.]]></item>
                <item name="wcf.user.notification.conversation.message.title"><![CDATA[New Reply to a Conversation]]></item>
                <item name="wcf.user.notification.conversation.message.title.stacked"><![CDATA[{#$count} participants replied to a conversation]]></item>
-               <item name="wcf.user.notification.conversation.message.mail.plaintext"><![CDATA[{@$authorList} replied to the conversation “{@$event->getUserNotificationObject()->getConversation()->subject}” [URL:{link controller='Conversation' object=$event->getUserNotificationObject()->getConversation() isEmail=true}{/link}]{if $count == 1 && !$guestTimesTriggered}:{else}.{/if}]]></item>
-               <item name="wcf.user.notification.conversation.message.mail.html"><![CDATA[<p>{@$authorList} replied to the conversation <a href="{link controller='Conversation' object=$event->getUserNotificationObject()->getConversation() isHtmlEmail=true}{/link}">{$event->getUserNotificationObject()->getConversation()->subject}</a>:</p>]]></item>
+               <item name="wcf.user.notification.conversation.message.mail.plaintext"><![CDATA[{@$authorList} replied to the conversation “{@$conversation->getTitle()}” [URL:{@$message->getLink()}]{if $count == 1 && !$guestTimesTriggered}:{else}.{/if}]]></item>
+               <item name="wcf.user.notification.conversation.message.mail.html"><![CDATA[<p>{@$authorList} replied to the conversation <a href="{$message->getLink()}">{$conversation->getTitle()}</a>:</p>]]></item>
                <item name="wcf.user.notification.conversation.message.mail.title"><![CDATA["{@$author->username}" replied to the conversation "{$message->getConversation()->subject}"]]></item>
                <item name="wcf.user.notification.conversation.message"><![CDATA[<strong>{$author}</strong> started the conversation <strong>{$conversation->getTitle()}</strong>.]]></item>
                <item name="wcf.user.notification.conversation.title"><![CDATA[New Conversation]]></item>
-               <item name="wcf.user.notification.conversation.mail.plaintext"><![CDATA[{@$event->getAuthor()->username} [URL:{link controller='User' object=$event->getAuthor() isEmail=true}{/link}] started the conversation “{@$event->getUserNotificationObject()->subject}” [URL:{link controller='Conversation' object=$event->getUserNotificationObject() isEmail=true}{/link}]:]]></item>
-               <item name="wcf.user.notification.conversation.mail.html"><![CDATA[<p><a href="{link controller='User' object=$event->getAuthor() isHtmlEmail=true}{/link}">{$event->getAuthor()->username}</a> started the conversation <a href="{link controller='Conversation' object=$event->getUserNotificationObject() isHtmlEmail=true}{/link}">{$event->getUserNotificationObject()->subject}</a>:</p>]]></item>
+               <item name="wcf.user.notification.conversation.mail.plaintext"><![CDATA[{@$author} started the conversation “{@$conversation->getTitle()}” [URL:{@$conversation->getLink()}]:]]></item>
+               <item name="wcf.user.notification.conversation.mail.html"><![CDATA[<p><strong>{$author}</strong> started the conversation <a href="{$conversation->getLink()}">{$conversation->getTitle()}</a>:</p>]]></item>
                <item name="wcf.user.notification.conversation.mail.title"><![CDATA[New Conversation from "{@$author->username}"]]></item>
                <item name="wcf.user.notification.com.woltlab.wcf.conversation"><![CDATA[Conversations]]></item>
                <item name="wcf.user.notification.com.woltlab.wcf.conversation.notification.conversation"><![CDATA[Notify me of new conversations]]></item>