]> git.mxchange.org Git - friendica.git/commitdiff
Distinguish between comment likes and post likes.
authorMarek Bachmann <marek.bachmann@comtec.eecs.uni-kassel.de>
Fri, 23 Dec 2022 01:38:00 +0000 (02:38 +0100)
committerMarek Bachmann <marek.bachmann@comtec.eecs.uni-kassel.de>
Fri, 23 Dec 2022 01:38:00 +0000 (02:38 +0100)
src/Navigation/Notifications/Repository/Notify.php
view/lang/C/messages.po

index 7af61d0b68af6290f40e790187b6630b0ca2c227..e2eb6cbf699c13ebaa361c627ff02c5059d21ec5 100644 (file)
@@ -784,14 +784,19 @@ class Notify extends BaseRepository
                } else {
                        $params['type'] = Model\Notification\Type::COMMENT;
                        if ($params['verb'] = Activity::LIKE) {
-                               $subject    = $l10n->t('%1$s Like in conversation #%2$d by %3$s', $subjectPrefix, $item['parent'], $contact['name']);
+                               switch ($Notification->type) {
+                                       case Model\Post\UserNotification::TYPE_DIRECT_COMMENT:
+                                               $subject    = $l10n->t('%1$s %2$s liked your post #%3$d', $subjectPrefix, $contact['name'], $item['parent']);
+                                               break;
+                                       case Model\Post\UserNotification::TYPE_DIRECT_THREAD_COMMENT:
+                                               $subject    = $l10n->t('%1$s %2$s liked your comment on #%3$d', $subjectPrefix, $contact['name'], $item['parent']);
+                                               break;
+                               }
                        } else {
                                $subject    = $l10n->t('%1$s Comment to conversation #%2$d by %3$s', $subjectPrefix, $item['parent'], $contact['name']);
                        }
                }
 
-
-
                $msg = $this->notification->getMessageFromNotification($Notification);
                if (empty($msg)) {
                        $this->logger->info('No notification message, quitting', ['uid' => $Notification->uid, 'id' => $Notification->id, 'type' => $Notification->type]);
index e4d20b57e52f499afa63b72e7496b6148cd22ee4..a086ec4c13de60e5979ae0d815a82acc55659728 100644 (file)
@@ -8,7 +8,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: 2023.03-dev\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2022-12-23 01:05+0100\n"
+"POT-Creation-Date: 2022-12-23 02:32+0100\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
@@ -10793,7 +10793,7 @@ msgid "%1$s commented on their %2$s %3$s"
 msgstr ""
 
 #: src/Navigation/Notifications/Repository/Notify.php:341
-#: src/Navigation/Notifications/Repository/Notify.php:789
+#: src/Navigation/Notifications/Repository/Notify.php:796
 #, php-format
 msgid "%1$s Comment to conversation #%2$d by %3$s"
 msgstr ""
@@ -10805,7 +10805,7 @@ msgstr ""
 
 #: src/Navigation/Notifications/Repository/Notify.php:347
 #: src/Navigation/Notifications/Repository/Notify.php:362
-#: src/Navigation/Notifications/Repository/Notify.php:807
+#: src/Navigation/Notifications/Repository/Notify.php:812
 #, php-format
 msgid "Please visit %s to view and/or reply to the conversation."
 msgstr ""
@@ -11008,9 +11008,14 @@ msgstr ""
 msgid "%s %s shared a new post"
 msgstr ""
 
-#: src/Navigation/Notifications/Repository/Notify.php:787
+#: src/Navigation/Notifications/Repository/Notify.php:789
+#, php-format
+msgid "%1$s %2$s liked your post #%3$d"
+msgstr ""
+
+#: src/Navigation/Notifications/Repository/Notify.php:792
 #, php-format
-msgid "%1$s Like in conversation #%2$d by %3$s"
+msgid "%1$s %2$s liked your comment on #%3$d"
 msgstr ""
 
 #: src/Object/EMail/ItemCCEMail.php:42