Add default implementation for user notifications about comments
authorMarcel Werk <burntime@woltlab.com>
Tue, 25 Apr 2023 14:06:04 +0000 (16:06 +0200)
committerMarcel Werk <burntime@woltlab.com>
Tue, 25 Apr 2023 14:06:04 +0000 (16:06 +0200)
wcfsetup/install/files/lib/system/moderation/queue/AbstractModerationQueueHandler.class.php
wcfsetup/install/files/lib/system/moderation/queue/IModerationQueueHandler.class.php
wcfsetup/install/files/lib/system/user/notification/event/AbstractCommentUserNotificationEvent.class.php [new file with mode: 0644]
wcfsetup/install/files/lib/system/user/notification/event/ArticleCommentUserNotificationEvent.class.php
wcfsetup/install/files/lib/system/user/notification/event/ModerationQueueCommentUserNotificationEvent.class.php
wcfsetup/install/files/lib/system/user/notification/event/PageCommentUserNotificationEvent.class.php
wcfsetup/install/files/lib/system/user/notification/event/UserProfileCommentUserNotificationEvent.class.php
wcfsetup/install/lang/de.xml
wcfsetup/install/lang/en.xml

index 351ee14e47b25a7d9122d70950c97e1122c85dc8..9953f1a244e4feb5e3abdac68814f2056899d52f 100644 (file)
@@ -140,4 +140,18 @@ abstract class AbstractModerationQueueHandler implements IModerationQueueHandler
 
         return 'wcf.moderation.notification';
     }
+
+    /**
+     * @inheritDoc
+     */
+    public function getCommentNotificationTypeNameLanguageItem(): string
+    {
+        if ($this instanceof IModerationQueueActivationHandler) {
+            return 'wcf.moderation.activation';
+        } elseif ($this instanceof IModerationQueueReportHandler) {
+            return 'wcf.moderation.report';
+        }
+
+        return 'wcf.moderation.moderation';
+    }
 }
index 2881255be66f8071992070e7823a1a60a3d824ca..70f83ae238fa1b8daa025cffb9e87080ebcd4668 100644 (file)
@@ -94,4 +94,13 @@ interface IModerationQueueHandler
      * @since   3.0
      */
     public function getCommentNotificationLanguageItemPrefix();
+
+    /**
+     * Returns the language item for the type name for notifications for comments
+     * and comment responses on moderation queues of this type.
+     *
+     * @return  string
+     * @since   6.0
+     */
+    public function getCommentNotificationTypeNameLanguageItem(): string;
 }
diff --git a/wcfsetup/install/files/lib/system/user/notification/event/AbstractCommentUserNotificationEvent.class.php b/wcfsetup/install/files/lib/system/user/notification/event/AbstractCommentUserNotificationEvent.class.php
new file mode 100644 (file)
index 0000000..7f1c577
--- /dev/null
@@ -0,0 +1,72 @@
+<?php
+
+namespace wcf\system\user\notification\event;
+
+/**
+ * Provides a default implementation for user notifications about comments.
+ *
+ * @author  Marcel Werk
+ * @copyright   2001-2023 WoltLab GmbH
+ * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
+ * @since 6.0
+ */
+abstract class AbstractCommentUserNotificationEvent extends AbstractSharedUserNotificationEvent
+{
+    /**
+     * @inheritDoc
+     */
+    protected $stackable = true;
+
+    /**
+     * @inheritDoc
+     */
+    public function getTitle(): string
+    {
+        $count = \count($this->getAuthors());
+        if ($count > 1) {
+            return $this->getLanguage()->getDynamicVariable('wcf.user.notification.comment.title.stacked', [
+                'count' => $count,
+                'timesTriggered' => $this->notification->timesTriggered,
+                'typeName' => $this->getTypeName(),
+            ]);
+        }
+
+        return $this->getLanguage()->getDynamicVariable('wcf.user.notification.comment.title', [
+            'typeName' => $this->getTypeName(),
+        ]);
+    }
+
+    /**
+     * @inheritDoc
+     */
+    public function getEmailTitle()
+    {
+        $count = \count($this->getAuthors());
+        if ($count > 1) {
+            return $this->getTitle();
+        }
+
+        return $this->getLanguage()->getDynamicVariable('wcf.user.notification.comment.mail.title', [
+            'objectTitle' => $this->getObjectTitle(),
+            'typeName' => $this->getTypeName(),
+        ]);
+    }
+
+    /**
+     * @inheritDoc
+     */
+    public function getEventHash()
+    {
+        return \sha1($this->eventID . '-' . $this->getUserNotificationObject()->objectID);
+    }
+
+    /**
+     * Returns the name of the type to which the comment belong.
+     */
+    protected abstract function getTypeName(): string;
+
+    /**
+     * Returns the title of the object to which the comment belong.
+     */
+    protected abstract function getObjectTitle(): string;
+}
index 7508ee196e7619297b7e284c1ad99fd7aa065e0e..1c7fe137411d6779e90d8ac54089f1f8a6caeca5 100644 (file)
@@ -15,17 +15,12 @@ use wcf\system\user\notification\object\CommentUserNotificationObject;
  *
  * @method  CommentUserNotificationObject   getUserNotificationObject()
  */
-class ArticleCommentUserNotificationEvent extends AbstractSharedUserNotificationEvent implements
+class ArticleCommentUserNotificationEvent extends AbstractCommentUserNotificationEvent implements
     ITestableUserNotificationEvent
 {
     use TTestableCommentUserNotificationEvent;
     use TTestableArticleCommentUserNotificationEvent;
 
-    /**
-     * @inheritDoc
-     */
-    protected $stackable = true;
-
     /**
      * @inheritDoc
      */
@@ -34,22 +29,6 @@ class ArticleCommentUserNotificationEvent extends AbstractSharedUserNotification
         ViewableArticleContentRuntimeCache::getInstance()->cacheObjectID($this->getUserNotificationObject()->objectID);
     }
 
-    /**
-     * @inheritDoc
-     */
-    public function getTitle(): string
-    {
-        $count = \count($this->getAuthors());
-        if ($count > 1) {
-            return $this->getLanguage()->getDynamicVariable('wcf.user.notification.articleComment.title.stacked', [
-                'count' => $count,
-                'timesTriggered' => $this->notification->timesTriggered,
-            ]);
-        }
-
-        return $this->getLanguage()->getDynamicVariable('wcf.user.notification.articleComment.title');
-    }
-
     /**
      * @inheritDoc
      */
@@ -111,8 +90,17 @@ class ArticleCommentUserNotificationEvent extends AbstractSharedUserNotification
     /**
      * @inheritDoc
      */
-    public function getEventHash()
+    protected function getTypeName(): string
+    {
+        return $this->getLanguage()->get('wcf.user.recentActivity.com.woltlab.wcf.article.recentActivityEvent');
+    }
+
+    /**
+     * @inheritDoc
+     */
+    protected function getObjectTitle(): string
     {
-        return \sha1($this->eventID . '-' . $this->getUserNotificationObject()->objectID);
+        return ViewableArticleContentRuntimeCache::getInstance()
+            ->getObject($this->getUserNotificationObject()->objectID)->getTitle();
     }
 }
index 1ccd4a9ca871c7f5b68561d3ee10b7b7d1a0f1c5..17a5666750bc395f5da7dc5798b6ded3cc251157 100644 (file)
@@ -23,7 +23,7 @@ use wcf\system\WCF;
  *
  * @method  CommentUserNotificationObject   getUserNotificationObject()
  */
-class ModerationQueueCommentUserNotificationEvent extends AbstractUserNotificationEvent implements
+class ModerationQueueCommentUserNotificationEvent extends AbstractCommentUserNotificationEvent implements
     ITestableUserNotificationEvent
 {
     use TTestableCommentUserNotificationEvent;
@@ -36,15 +36,16 @@ class ModerationQueueCommentUserNotificationEvent extends AbstractUserNotificati
     protected $languageItemPrefix = '';
 
     /**
-     * moderation queue object the notifications (indirectly) belong to
-     * @var ViewableModerationQueue
+     * language item for the type name
+     * @var string
      */
-    protected $moderationQueue;
+    protected $typeName = '';
 
     /**
-     * @inheritDoc
+     * moderation queue object the notifications (indirectly) belong to
+     * @var ViewableModerationQueue
      */
-    protected $stackable = true;
+    protected $moderationQueue;
 
     /**
      * @inheritDoc
@@ -124,17 +125,8 @@ class ModerationQueueCommentUserNotificationEvent extends AbstractUserNotificati
     /**
      * @inheritDoc
      */
-    public function getTitle(): string
+    protected function prepare()
     {
-        $count = \count($this->getAuthors());
-        if ($count > 1) {
-            return $this->getLanguage()->getDynamicVariable($this->languageItemPrefix . '.comment.title.stacked', [
-                'count' => $count,
-                'timesTriggered' => $this->notification->timesTriggered,
-            ]);
-        }
-
-        return $this->getLanguage()->get($this->languageItemPrefix . '.comment.title');
     }
 
     /**
@@ -159,6 +151,7 @@ class ModerationQueueCommentUserNotificationEvent extends AbstractUserNotificati
                 ->getObjectType($this->moderationQueue->objectTypeID)
                 ->getProcessor();
             $this->languageItemPrefix = $moderationHandler->getCommentNotificationLanguageItemPrefix();
+            $this->typeName = $this->getLanguage()->get($moderationHandler->getCommentNotificationTypeNameLanguageItem());
         }
     }
 
@@ -182,4 +175,20 @@ class ModerationQueueCommentUserNotificationEvent extends AbstractUserNotificati
             'objectTypeID' => CommentHandler::getInstance()->getObjectTypeID('com.woltlab.wcf.moderation.queue'),
         ];
     }
+
+    /**
+     * @inheritDoc
+     */
+    protected function getTypeName(): string
+    {
+        return $this->typeName;
+    }
+
+    /**
+     * @inheritDoc
+     */
+    protected function getObjectTitle(): string
+    {
+        return $this->moderationQueue->getTitle();
+    }
 }
index 85078a65ea94b86bb192c12bb915c04d215de519..868faa35bf206ea27b88528f7bc89125d6a0911a 100644 (file)
@@ -18,17 +18,12 @@ use wcf\system\user\notification\object\CommentUserNotificationObject;
  *
  * @method  CommentUserNotificationObject   getUserNotificationObject()
  */
-class PageCommentUserNotificationEvent extends AbstractSharedUserNotificationEvent implements
+class PageCommentUserNotificationEvent extends AbstractCommentUserNotificationEvent implements
     ITestableUserNotificationEvent
 {
     use TTestableCommentUserNotificationEvent;
     use TTestablePageUserNotificationEvent;
 
-    /**
-     * @inheritDoc
-     */
-    protected $stackable = true;
-
     /**
      * @inheritDoc
      */
@@ -37,22 +32,6 @@ class PageCommentUserNotificationEvent extends AbstractSharedUserNotificationEve
         UserProfileRuntimeCache::getInstance()->cacheObjectID($this->getUserNotificationObject()->objectID);
     }
 
-    /**
-     * @inheritDoc
-     */
-    public function getTitle(): string
-    {
-        $count = \count($this->getAuthors());
-        if ($count > 1) {
-            return $this->getLanguage()->getDynamicVariable('wcf.user.notification.pageComment.title.stacked', [
-                'count' => $count,
-                'timesTriggered' => $this->notification->timesTriggered,
-            ]);
-        }
-
-        return $this->getLanguage()->getDynamicVariable('wcf.user.notification.pageComment.title');
-    }
-
     /**
      * @inheritDoc
      */
@@ -111,9 +90,17 @@ class PageCommentUserNotificationEvent extends AbstractSharedUserNotificationEve
     /**
      * @inheritDoc
      */
-    public function getEventHash()
+    protected function getTypeName(): string
+    {
+        return $this->getLanguage()->get('wcf.search.object.com.woltlab.wcf.page');
+    }
+
+    /**
+     * @inheritDoc
+     */
+    protected function getObjectTitle(): string
     {
-        return \sha1($this->eventID . '-' . $this->getUserNotificationObject()->objectID);
+        return PageCache::getInstance()->getPage($this->getUserNotificationObject()->objectID)->getTitle();
     }
 
     /**
index 61aad7e52bdb52aa07635073d0cc59e63d86afcc..b58d089753b06974b96d1864a71b6cfff5856f6a 100644 (file)
@@ -16,16 +16,11 @@ use wcf\system\user\notification\object\CommentUserNotificationObject;
  *
  * @method  CommentUserNotificationObject   getUserNotificationObject()
  */
-class UserProfileCommentUserNotificationEvent extends AbstractSharedUserNotificationEvent implements
+class UserProfileCommentUserNotificationEvent extends AbstractCommentUserNotificationEvent implements
     ITestableUserNotificationEvent
 {
     use TTestableCommentUserNotificationEvent;
 
-    /**
-     * @inheritDoc
-     */
-    protected $stackable = true;
-
     /**
      * @inheritDoc
      */
@@ -34,22 +29,6 @@ class UserProfileCommentUserNotificationEvent extends AbstractSharedUserNotifica
         UserProfileRuntimeCache::getInstance()->cacheObjectID($this->getUserNotificationObject()->objectID);
     }
 
-    /**
-     * @inheritDoc
-     */
-    public function getTitle(): string
-    {
-        $count = \count($this->getAuthors());
-        if ($count > 1) {
-            return $this->getLanguage()->getDynamicVariable('wcf.user.notification.comment.title.stacked', [
-                'count' => $count,
-                'timesTriggered' => $this->notification->timesTriggered,
-            ]);
-        }
-
-        return $this->getLanguage()->get('wcf.user.notification.comment.title');
-    }
-
     /**
      * @inheritDoc
      */
@@ -108,9 +87,18 @@ class UserProfileCommentUserNotificationEvent extends AbstractSharedUserNotifica
     /**
      * @inheritDoc
      */
-    public function getEventHash()
+    protected function getTypeName(): string
+    {
+        return $this->getLanguage()->get('wcf.user.profile.menu.wall');
+    }
+
+    /**
+     * @inheritDoc
+     */
+    protected function getObjectTitle(): string
     {
-        return \sha1($this->eventID . '-' . $this->notification->userID);
+        return UserProfileRuntimeCache::getInstance()
+            ->getObject($this->getUserNotificationObject()->objectID)->username;
     }
 
     /**
index d27649e25e8ee6a1c08b371802714701dbbbfd41..976ea55d92da6816b77092a90f7cba61f0346d17 100644 (file)
@@ -4290,8 +4290,6 @@ Dateianhänge:
                <item name="wcf.moderation.lastChangeTime"><![CDATA[Letzte Änderung]]></item>
                <item name="wcf.moderation.moderation"><![CDATA[Moderation]]></item>
                <item name="wcf.moderation.noMoreItems"><![CDATA[Keine weiteren Einträge]]></item>
-               <item name="wcf.moderation.notification.comment.title"><![CDATA[Neuer Kommentar (Moderation)]]></item>
-               <item name="wcf.moderation.notification.comment.title.stacked"><![CDATA[{#$timesTriggered} neue Kommentare (Moderation)]]></item>
                <item name="wcf.moderation.notification.comment.message"><![CDATA[{if $author->userID}<strong>{$author}</strong>{else}Ein Gast{/if} hat einen Kommentar zum Moderationseintrag <strong>{$moderationQueue}</strong> verfasst.]]></item>
                <item name="wcf.moderation.notification.comment.message.stacked"><![CDATA[{@'wcf.user.notification.stacked.authorList'|language} haben Kommentare zum Moderationseintrag <strong>{$moderationQueue}</strong> verfasst.]]></item>
                <item name="wcf.moderation.notification.comment.mail.plaintext"><![CDATA[{@$authorList} {if $count == 1 && $guestTimesTriggered < 2 && (!$event->getAuthor()->userID || $guestTimesTriggered == 0)}hat einen Kommentar{else}haben Kommentare{/if} zum Moderationseintrag {@$moderationQueue->getTitle()} [URL:{@$moderationQueue->getLink()}] verfasst{if $count == 1 && $guestTimesTriggered < 2 && (!$event->getAuthor()->userID || $guestTimesTriggered == 0)}:{else}.{/if}]]></item>
@@ -4338,8 +4336,6 @@ Dateianhänge:
                <item name="wcf.moderation.activation.content"><![CDATA[Freizuschaltender Inhalt]]></item>
                <item name="wcf.moderation.activation.enableContent"><![CDATA[Inhalt freischalten]]></item>
                <item name="wcf.moderation.activation.enableContent.confirmMessage"><![CDATA[{if LANGUAGE_USE_INFORMAL_VARIANT}Willst du{else}Wollen Sie{/if} {if !$moderationQueueCount|isset || $moderationQueueCount == 1}diesen Inhalt{else}diese Inhalte{/if} wirklich freischalten?]]></item>
-               <item name="wcf.moderation.activation.notification.comment.title"><![CDATA[Neuer Kommentar (Freischaltung)]]></item>
-               <item name="wcf.moderation.activation.notification.comment.title.stacked"><![CDATA[{#$timesTriggered} neue Kommentare (Freischaltung)]]></item>
                <item name="wcf.moderation.activation.notification.comment.message"><![CDATA[{if $author->userID}<strong>{$author}</strong>{else}Ein Gast{/if} hat einen Kommentar zum freizuschaltenden Inhalt <strong>{$moderationQueue}</strong> verfasst.]]></item>
                <item name="wcf.moderation.activation.notification.comment.message.stacked"><![CDATA[{@'wcf.user.notification.stacked.authorList'|language} haben Kommentare zum freizuschaltenden Inhalt <strong>{$moderationQueue}</strong> verfasst.]]></item>
                <item name="wcf.moderation.activation.notification.comment.mail.plaintext"><![CDATA[{@$authorList} {if $count == 1 && $guestTimesTriggered < 2 && (!$event->getAuthor()->userID || $guestTimesTriggered == 0)}hat einen Kommentar{else}haben Kommentare{/if} zum freizuschaltenden Inhalt {@$moderationQueue->getTitle()} [URL:{@$moderationQueue->getLink()}] verfasst{if $count == 1 && !$guestTimesTriggered}:{else}.{/if}]]></item>
@@ -4357,8 +4353,6 @@ Dateianhänge:
                <item name="wcf.moderation.report"><![CDATA[Meldung]]></item>
                <item name="wcf.moderation.report.alreadyReported"><![CDATA[Dieser Inhalt wurde bereits gemeldet.]]></item>
                <item name="wcf.moderation.report.details"><![CDATA[Informationen]]></item>
-               <item name="wcf.moderation.report.notification.comment.title"><![CDATA[Neuer Kommentar (Meldung)]]></item>
-               <item name="wcf.moderation.report.notification.comment.title.stacked"><![CDATA[{#$timesTriggered} neue Kommentare (Meldung)]]></item>
                <item name="wcf.moderation.report.notification.comment.message"><![CDATA[{if $author->userID}<strong>{$author}</strong>{else}Ein Gast{/if} hat einen Kommentar zur Meldung <strong>{$moderationQueue}</strong> verfasst.]]></item>
                <item name="wcf.moderation.report.notification.comment.message.stacked"><![CDATA[{@'wcf.user.notification.stacked.authorList'|language} haben Kommentare zur Meldung <strong>{$moderationQueue}</strong> verfasst.]]></item>
                <item name="wcf.moderation.report.notification.comment.mail.plaintext"><![CDATA[{@$authorList} {if $count == 1 && $guestTimesTriggered < 2 && (!$event->getAuthor()->userID || $guestTimesTriggered == 0)}hat einen Kommentar{else}haben Kommentare{/if} zu der Meldung {@$moderationQueue->getTitle()} [URL:{@$moderationQueue->getLink()}] verfasst{if $count == 1 && !$guestTimesTriggered}:{else}.{/if}]]></item>
@@ -5358,8 +5352,6 @@ Benachrichtigungen auf <a href="{link isHtmlEmail=true}{/link}">{PAGE_TITLE|phra
                <item name="wcf.user.notification.follow.message.stacked"><![CDATA[{@'wcf.user.notification.stacked.authorList'|language} folgen {if LANGUAGE_USE_INFORMAL_VARIANT}dir{else}Ihnen{/if}.]]></item>
                <item name="wcf.user.notification.follow.mail.plaintext"><![CDATA[{@$authorList} {if $count == 1}folgt{else}folgen{/if} {if LANGUAGE_USE_INFORMAL_VARIANT}dir{else}Ihnen{/if}.]]></item>
                <item name="wcf.user.notification.follow.mail.html"><![CDATA[<p>{@$authorList} {if $count == 1}folgt{else}folgen{/if} {if LANGUAGE_USE_INFORMAL_VARIANT}dir{else}Ihnen{/if}:</p>]]></item>
-               <item name="wcf.user.notification.comment.title"><![CDATA[Neuer Kommentar (Pinnwand)]]></item>
-               <item name="wcf.user.notification.comment.title.stacked"><![CDATA[{#$timesTriggered} neue Kommentare (Pinnwand)]]></item>
                <item name="wcf.user.notification.comment.message"><![CDATA[{if $author->userID}<strong>{$author}</strong>{else}Ein Gast{/if} hat einen Kommentar an {if LANGUAGE_USE_INFORMAL_VARIANT}deiner{else}Ihrer{/if} Pinnwand verfasst.]]></item>
                <item name="wcf.user.notification.comment.message.stacked"><![CDATA[{@'wcf.user.notification.stacked.authorList'|language} haben Kommentare an {if LANGUAGE_USE_INFORMAL_VARIANT}deiner{else}Ihrer{/if} Pinnwand verfasst.]]></item>
                <item name="wcf.user.notification.comment.mail.plaintext"><![CDATA[{@$authorList} {if $count == 1 && $guestTimesTriggered < 2 && (!$event->getAuthor()->userID || $guestTimesTriggered == 0)}hat einen Kommentar{else}haben Kommentare{/if} an {if LANGUAGE_USE_INFORMAL_VARIANT}deiner{else}Ihrer{/if} Pinnwand [URL:{@$owner->getLink()}#wall/comment{@$commentID}] verfasst{if $count == 1 && !$guestTimesTriggered}:{else}.{/if}]]></item>
@@ -5403,8 +5395,6 @@ Benachrichtigungen auf <a href="{link isHtmlEmail=true}{/link}">{PAGE_TITLE|phra
                <item name="wcf.user.notification.com.woltlab.wcf.page.response.notification.commentResponse"><![CDATA[Neue Antwort auf einen Kommentar auf einer Seite]]></item>
                <item name="wcf.user.notification.com.woltlab.wcf.page.response.notification.commentResponseOwner"><![CDATA[Neue Antwort auf {if LANGUAGE_USE_INFORMAL_VARIANT}deinen{else}Ihren{/if} Kommentar auf einer Seite]]></item>
                <item name="wcf.user.notification.com.woltlab.wcf.likeableArticle.notification.like"><![CDATA[Reaktion auf {if LANGUAGE_USE_INFORMAL_VARIANT}deinen{else}Ihren{/if} Artikel]]></item>
-               <item name="wcf.user.notification.pageComment.title"><![CDATA[Neuer Kommentar (Seite)]]></item>
-               <item name="wcf.user.notification.pageComment.title.stacked"><![CDATA[{#$timesTriggered} neue Kommentare (Seite)]]></item>
                <item name="wcf.user.notification.pageComment.message"><![CDATA[{if $author->userID}<strong>{$author}</strong>{else}Ein Gast{/if} hat einen Kommentar auf der Seite <strong>{$page->getTitle()}</strong> verfasst.]]></item>
                <item name="wcf.user.notification.pageComment.message.stacked"><![CDATA[{@'wcf.user.notification.stacked.authorList'|language} haben Kommentare auf der Seite <strong>{$page->getTitle()}</strong> verfasst.]]></item>
                <item name="wcf.user.notification.pageComment.mail.plaintext"><![CDATA[{@$authorList} {if $count == 1 && $guestTimesTriggered < 2 && (!$event->getAuthor()->userID || $guestTimesTriggered == 0)}hat einen Kommentar{else}haben Kommentare{/if} auf der Seite „{@$page->getTitle()}“ [URL:{@$page->getLink()}#comment{@$commentID}] verfasst{if $count == 1 && !$guestTimesTriggered}:{else}.{/if}]]></item>
@@ -5424,8 +5414,9 @@ Benachrichtigungen auf <a href="{link isHtmlEmail=true}{/link}">{PAGE_TITLE|phra
                <item name="wcf.user.notification.com.woltlab.wcf.article.comment.notification.comment"><![CDATA[Neuer Kommentar zu {if LANGUAGE_USE_INFORMAL_VARIANT}deinem{else}Ihrem{/if} Artikel]]></item>
                <item name="wcf.user.notification.com.woltlab.wcf.article.comment.response.notification.commentResponse"><![CDATA[Neue Antwort auf einen Kommentar von {if LANGUAGE_USE_INFORMAL_VARIANT}dir{else}Ihnen{/if}]]></item>
                <item name="wcf.user.notification.com.woltlab.wcf.article.comment.response.notification.commentResponseOwner"><![CDATA[Neue Antwort auf einen Kommentar zu {if LANGUAGE_USE_INFORMAL_VARIANT}deinem{else}Ihrem{/if} Artikel]]></item>
-               <item name="wcf.user.notification.articleComment.title"><![CDATA[Neuer Kommentar (Artikel)]]></item>
-               <item name="wcf.user.notification.articleComment.title.stacked"><![CDATA[{#$timesTriggered} neue Kommentare (Artikel)]]></item>
+               <item name="wcf.user.notification.comment.title"><![CDATA[Neuer Kommentar ({$typeName})]]></item>
+               <item name="wcf.user.notification.comment.mail.title"><![CDATA[Neuer Kommentar zu "{@$objectTitle}" ({@$typeName})]]></item>
+               <item name="wcf.user.notification.comment.title.stacked"><![CDATA[{#$timesTriggered} neue Kommentare ({$typeName})]]></item>
                <item name="wcf.user.notification.articleComment.message"><![CDATA[{if $author->userID}<strong>{$author}</strong>{else}Ein Gast{/if} hat einen Kommentar zu dem Artikel <strong>{$article->getTitle()}</strong> verfasst.]]></item>
                <item name="wcf.user.notification.articleComment.message.stacked"><![CDATA[{@'wcf.user.notification.stacked.authorList'|language} haben Kommentare zu dem Artikel <strong>{$article->getTitle()}</strong> verfasst.]]></item>
                <item name="wcf.user.notification.articleComment.mail.plaintext"><![CDATA[{@$authorList} {if $count == 1 && $guestTimesTriggered < 2 && (!$event->getAuthor()->userID || $guestTimesTriggered == 0)}hat einen Kommentar{else}haben Kommentare{/if} zu dem Artikel „{@$article->getTitle()}“ [URL:{@$article->getLink()}#comment{@$commentID}] verfasst{if $count == 1 && !$guestTimesTriggered}:{else}.{/if}]]></item>
index a62028cf96ece8d2731093d7f653ecebf36a7d21..4ad71f21909c854583320052fb555aa66c3b0327 100644 (file)
@@ -4239,8 +4239,6 @@ Attachments:
                <item name="wcf.moderation.lastChangeTime"><![CDATA[Last Change]]></item>
                <item name="wcf.moderation.moderation"><![CDATA[Moderation]]></item>
                <item name="wcf.moderation.noMoreItems"><![CDATA[You have no recent items.]]></item>
-               <item name="wcf.moderation.notification.comment.title"><![CDATA[New comment (Moderation)]]></item>
-               <item name="wcf.moderation.notification.comment.title.stacked"><![CDATA[{#$timesTriggered} new comments (Moderation)]]></item>
                <item name="wcf.moderation.notification.comment.message"><![CDATA[{if $author->userID}<strong>{$author}</strong>{else}A guest{/if} commented on the moderation entry <strong>{$moderationQueue}</strong>.]]></item>
                <item name="wcf.moderation.notification.comment.message.stacked"><![CDATA[{@'wcf.user.notification.stacked.authorList'|language} commented on the moderation entry <strong>{$moderationQueue}</strong>.]]></item>
                <item name="wcf.moderation.notification.comment.mail.plaintext"><![CDATA[{@$authorList} commented on the moderation entry {@$moderationQueue->getTitle()} [URL:{@$moderationQueue->getLink()}]{if $count == 1 && !$guestTimesTriggered}:{else}.{/if}]]></item>
@@ -4287,8 +4285,6 @@ Attachments:
                <item name="wcf.moderation.activation.content"><![CDATA[Content awaiting approval]]></item>
                <item name="wcf.moderation.activation.enableContent"><![CDATA[Approve]]></item>
                <item name="wcf.moderation.activation.enableContent.confirmMessage"><![CDATA[Do you really want to approve {if !$moderationQueueCount|isset || $moderationQueueCount == 1}this content{else}these contents{/if}?]]></item>
-               <item name="wcf.moderation.activation.notification.comment.title"><![CDATA[New comment (Approval)]]></item>
-               <item name="wcf.moderation.activation.notification.comment.title.stacked"><![CDATA[{#$timesTriggered} new comments (Approval)]]></item>
                <item name="wcf.moderation.activation.notification.comment.message"><![CDATA[{if $author->userID}<strong>{$author}</strong>{else}A guest{/if} commented on <strong>{$moderationQueue}</strong> waiting for approval.]]></item>
                <item name="wcf.moderation.activation.notification.comment.message.stacked"><![CDATA[{@'wcf.user.notification.stacked.authorList'|language} commented on <strong>{$moderationQueue}</strong> waiting for approval.]]></item>
                <item name="wcf.moderation.activation.notification.comment.mail.plaintext"><![CDATA[{@$authorList} commented on {@$moderationQueue->getTitle()} [URL:{@$moderationQueue->getLink()}] waiting for approval{if $count == 1 && !$guestTimesTriggered}:{else}.{/if}]]></item>
@@ -4306,8 +4302,6 @@ Attachments:
                <item name="wcf.moderation.report"><![CDATA[Report]]></item>
                <item name="wcf.moderation.report.alreadyReported"><![CDATA[This content has already been reported.]]></item>
                <item name="wcf.moderation.report.details"><![CDATA[Information]]></item>
-               <item name="wcf.moderation.report.notification.comment.title"><![CDATA[New comment (Report)]]></item>
-               <item name="wcf.moderation.report.notification.comment.title.stacked"><![CDATA[{#$timesTriggered} new comments (Report)]]></item>
                <item name="wcf.moderation.report.notification.comment.message"><![CDATA[{if $author->userID}<strong>{$author}</strong>{else}A guest{/if} commented on the report <strong>{$moderationQueue}</strong>.]]></item>
                <item name="wcf.moderation.report.notification.comment.message.stacked"><![CDATA[{@'wcf.user.notification.stacked.authorList'|language} commented on the report <strong>{$moderationQueue}</strong>.]]></item>
                <item name="wcf.moderation.report.notification.comment.mail.plaintext"><![CDATA[{@$authorList} commented on the report {@$moderationQueue->getTitle()} [URL:{@$moderationQueue->getLink()}]{if $count == 1 && !$guestTimesTriggered}:{else}.{/if}]]></item>
@@ -5359,8 +5353,6 @@ your notifications on <a href="{link isHtmlEmail=true}{/link}">{PAGE_TITLE|phras
                <item name="wcf.user.notification.follow.message.stacked"><![CDATA[{@'wcf.user.notification.stacked.authorList'|language} follow you.]]></item>
                <item name="wcf.user.notification.follow.mail.plaintext"><![CDATA[{@$authorList} {if $authors|count == 1}follows{else}follow{/if} you.]]></item>
                <item name="wcf.user.notification.follow.mail.html"><![CDATA[<p>{@$authorList} {if $authors|count == 1}follows{else}follow{/if} you:</p>]]></item>
-               <item name="wcf.user.notification.comment.title"><![CDATA[New Comment (Wall)]]></item>
-               <item name="wcf.user.notification.comment.title.stacked"><![CDATA[{#$timesTriggered} new comments (Wall)]]></item>
                <item name="wcf.user.notification.comment.message"><![CDATA[{if $author->userID}<strong>{$author}</strong>{else}A guest{/if} commented on your wall.]]></item>
                <item name="wcf.user.notification.comment.message.stacked"><![CDATA[{@'wcf.user.notification.stacked.authorList'|language} commented on your wall.]]></item>
                <item name="wcf.user.notification.comment.mail.plaintext"><![CDATA[{@$authorList} commented on your wall [URL:{@$owner->getLink()}#wall/comment{@$commentID}]{if $count == 1 && !$guestTimesTriggered}:{else}.{/if}]]></item>
@@ -5404,8 +5396,6 @@ your notifications on <a href="{link isHtmlEmail=true}{/link}">{PAGE_TITLE|phras
                <item name="wcf.user.notification.com.woltlab.wcf.page.response.notification.commentResponse"><![CDATA[Notify me when new replies to comments are written on pages]]></item>
                <item name="wcf.user.notification.com.woltlab.wcf.page.response.notification.commentResponseOwner"><![CDATA[Notify me when someone replies to my comments on pages]]></item>
                <item name="wcf.user.notification.com.woltlab.wcf.likeableArticle.notification.like"><![CDATA[Notify me when someone reacted to my articles]]></item>
-               <item name="wcf.user.notification.pageComment.title"><![CDATA[New Comment (Page)]]></item>
-               <item name="wcf.user.notification.pageComment.title.stacked"><![CDATA[{#$timesTriggered} new comments (Page)]]></item>
                <item name="wcf.user.notification.pageComment.message"><![CDATA[{if $author->userID}<strong>{$author}</strong>{else}A guest{/if} commented on the page <strong>{$page->getTitle()}</strong>.]]></item>
                <item name="wcf.user.notification.pageComment.message.stacked"><![CDATA[{@'wcf.user.notification.stacked.authorList'|language} commented on the page <strong>{$page->getTitle()}</strong>.]]></item>
                <item name="wcf.user.notification.pageComment.mail.plaintext"><![CDATA[{@$authorList} commented on the page “{@$page->getTitle()}” [URL:{@$page->getLink()}#comment{@$commentID}]{if $count == 1 && !$guestTimesTriggered}:{else}.{/if}]]></item>
@@ -5425,8 +5415,9 @@ your notifications on <a href="{link isHtmlEmail=true}{/link}">{PAGE_TITLE|phras
                <item name="wcf.user.notification.com.woltlab.wcf.article.comment.notification.comment"><![CDATA[Notify me of new comments on my articles]]></item>
                <item name="wcf.user.notification.com.woltlab.wcf.article.comment.response.notification.commentResponse"><![CDATA[Notify me of new replies to my comments]]></item>
                <item name="wcf.user.notification.com.woltlab.wcf.article.comment.response.notification.commentResponseOwner"><![CDATA[Notify me of new replies to comments on my articles]]></item>
-               <item name="wcf.user.notification.articleComment.title"><![CDATA[New Comment (Article)]]></item>
-               <item name="wcf.user.notification.articleComment.title.stacked"><![CDATA[{#$timesTriggered} new Comments (Article)]]></item>
+               <item name="wcf.user.notification.comment.title"><![CDATA[New Comment ({$typeName})]]></item>
+               <item name="wcf.user.notification.comment.mail.title"><![CDATA[New Comment on "{@$objectTitle}" ({@$typeName})]]></item>
+               <item name="wcf.user.notification.comment.title.stacked"><![CDATA[{#$timesTriggered} new Comments ({$typeName})]]></item>
                <item name="wcf.user.notification.articleComment.message"><![CDATA[{if $author->userID}<strong>{$author}</strong>{else}A guest{/if} commented on the article <strong>{$article->getTitle()}</strong>.]]></item>
                <item name="wcf.user.notification.articleComment.message.stacked"><![CDATA[{@'wcf.user.notification.stacked.authorList'|language} commented on the article <strong>{$article->getTitle()}</strong>.]]></item>
                <item name="wcf.user.notification.articleComment.mail.plaintext"><![CDATA[{@$authorList} commented on the article “{@$article->getTitle()}” [URL:{@$article->getLink()}#comment{@$commentID}]{if $count == 1 && !$guestTimesTriggered}:{else}.{/if}]]></item>