From: Alexander Ebert Date: Fri, 20 Jun 2014 11:13:38 +0000 (+0200) Subject: Improved stacking of wall comments X-Git-Tag: 2.1.0_Alpha_1~669^2~5 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=e5b813057220f25bb08037111a5779fe481f2f7c;p=GitHub%2FWoltLab%2FWCF.git Improved stacking of wall comments --- diff --git a/wcfsetup/install/files/lib/system/user/notification/event/UserProfileCommentResponseOwnerUserNotificationEvent.class.php b/wcfsetup/install/files/lib/system/user/notification/event/UserProfileCommentResponseOwnerUserNotificationEvent.class.php index b024727c1c..1cac2542bc 100644 --- a/wcfsetup/install/files/lib/system/user/notification/event/UserProfileCommentResponseOwnerUserNotificationEvent.class.php +++ b/wcfsetup/install/files/lib/system/user/notification/event/UserProfileCommentResponseOwnerUserNotificationEvent.class.php @@ -56,6 +56,7 @@ class UserProfileCommentResponseOwnerUserNotificationEvent extends AbstractUserN $count = count($authors); if ($count > 1) { return $this->getLanguage()->getDynamicVariable('wcf.user.notification.commentResponseOwner.message.stacked', array( + 'author' => $commentAuthor, 'authors' => $authors, 'count' => $count, 'others' => max($count - 1, 0) diff --git a/wcfsetup/install/files/lib/system/user/notification/event/UserProfileCommentResponseUserNotificationEvent.class.php b/wcfsetup/install/files/lib/system/user/notification/event/UserProfileCommentResponseUserNotificationEvent.class.php index b5e54101b2..224e647b8a 100644 --- a/wcfsetup/install/files/lib/system/user/notification/event/UserProfileCommentResponseUserNotificationEvent.class.php +++ b/wcfsetup/install/files/lib/system/user/notification/event/UserProfileCommentResponseUserNotificationEvent.class.php @@ -55,7 +55,7 @@ class UserProfileCommentResponseUserNotificationEvent extends AbstractUserNotifi $authors = array_values($this->getAuthors()); $count = count($authors); if ($count > 1) { - return $this->getLanguage()->getDynamicVariable('wcf.user.notification.commentResponseOwner.message.stacked', array( + return $this->getLanguage()->getDynamicVariable('wcf.user.notification.commentResponse.message.stacked', array( 'authors' => $authors, 'count' => $count, 'others' => max($count - 1, 0), @@ -94,4 +94,11 @@ class UserProfileCommentResponseUserNotificationEvent extends AbstractUserNotifi return LinkHandler::getInstance()->getLink('User', array('object' => $user), '#wall'); } + + /** + * @see \wcf\system\user\notification\event\IUserNotificationEvent::getEventHash() + */ + public function getEventHash() { + return sha1($this->eventID . '-' . $this->userNotificationObject->commentID); + } } diff --git a/wcfsetup/install/lang/de.xml b/wcfsetup/install/lang/de.xml index 21510b23f8..535a14b8e7 100644 --- a/wcfsetup/install/lang/de.xml +++ b/wcfsetup/install/lang/de.xml @@ -2868,7 +2868,7 @@ Möchten Sie diese E-Mail-Benachrichtigung in Zukunft nicht mehr erhalten, könn username} verfasst.]]> - getAnchorTag()}{if $count == 2} und {else}, {/if}{@$authors[1]->getAnchorTag()}{if $count == 3} und {@$authors[2]->getAnchorTag()}{/if}{else}{@$authors[0]->getAnchorTag()} und {#$count} weitere{/if} haben auf Ihren Kommentare an der Pinnwand von {$owner->username} geantwortet.]]> + getAnchorTag()}{if $count == 2} und {else}, {/if}{@$authors[1]->getAnchorTag()}{if $count == 3} und {@$authors[2]->getAnchorTag()}{/if}{else}{@$authors[0]->getAnchorTag()} und {#$count} weitere{/if} haben auf Ihren Kommentar an der Pinnwand von {$owner->username} geantwortet.]]> username} hat eine Antwort zu Ihrem Kommentar an der Pinnwand von "{@$owner->username}" verfasst: {if $notificationType == 'instant'} --------------------------------- @@ -2876,9 +2876,9 @@ Möchten Sie diese E-Mail-Benachrichtigung in Zukunft nicht mehr erhalten, könn --------------------------------- {/if}{link controller='User' object=$owner isEmail=true}{/link}#wall]]> - + username} an Ihrer Pinnwand verfasst.]]> - getAnchorTag()}{if $count == 2} und {else}, {/if}{@$authors[1]->getAnchorTag()}{if $count == 3} und {@$authors[2]->getAnchorTag()}{/if}{else}{@$authors[0]->getAnchorTag()} und {#$count} weitere{/if} haben auf Kommentare an Ihrer Pinnwand geantwortet.]]> + getAnchorTag()}{if $count == 2} und {else}, {/if}{@$authors[1]->getAnchorTag()}{if $count == 3} und {@$authors[2]->getAnchorTag()}{/if}{else}{@$authors[0]->getAnchorTag()} und {#$count} weitere{/if} haben auf den Kommentar von {if $author->userID}{$author->username}{else}{$author->username}{/if} an Ihrer Pinnwand geantwortet.]]> username} hat eine Antwort zum Kommentar von "{@$commentAuthor->username}" an Ihrer Pinnwand verfasst: {if $notificationType == 'instant'} --------------------------------- diff --git a/wcfsetup/install/lang/en.xml b/wcfsetup/install/lang/en.xml index 1a6d29c89c..dee5ef8f39 100644 --- a/wcfsetup/install/lang/en.xml +++ b/wcfsetup/install/lang/en.xml @@ -2711,7 +2711,9 @@ If you do not want to receive further email notifications for this event, you ca + + getAnchorTag()}{if $count == 2} and {else}, {/if}{@$authors[1]->getAnchorTag()}{if $count == 3} and {@$authors[2]->getAnchorTag()}{/if}{else}{@$authors[0]->getAnchorTag()} and {#$count} others{/if} wrote comments on your wall.]]> username} wrote a comment on your wall: {if $notificationType == 'instant'} --------------------------------- @@ -2719,7 +2721,9 @@ If you do not want to receive further email notifications for this event, you ca --------------------------------- {/if}{link controller='User' object=$owner isEmail=true}#wall{/link}]]> + username}’s wall.]]> + getAnchorTag()}{if $count == 2} and {else}, {/if}{@$authors[1]->getAnchorTag()}{if $count == 3} and {@$authors[2]->getAnchorTag()}{/if}{else}{@$authors[0]->getAnchorTag()} and {#$count} others{/if} replied to your comment on {$owner->username}’s wall.]]> username} wrote a reply to your comment on {@$owner->username}’s wall: {if $notificationType == 'instant'} --------------------------------- @@ -2727,7 +2731,9 @@ If you do not want to receive further email notifications for this event, you ca --------------------------------- {/if}{link controller='User' object=$owner isEmail=true}{/link}#wall]]> + username}’s comment on your wall.]]> + getAnchorTag()}{if $count == 2} and {else}, {/if}{@$authors[1]->getAnchorTag()}{if $count == 3} and {@$authors[2]->getAnchorTag()}{/if}{else}{@$authors[0]->getAnchorTag()} and {#$count} others{/if} replied to the comment by {if $author->userID}{$author->username}{else}{$author->username}{/if} on your wall.]]> username} wrote a reply to {@$commentAuthor->username}’s comment on your wall: {if $notificationType == 'instant'} ---------------------------------