Merge pull request #11584 from annando/follow-notification

Fix: Use correct follow notification texts
This commit is contained in:
Tobias Diekershoff 2022-05-31 16:30:59 +02:00 committed by GitHub
commit d6d826329f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 98 additions and 89 deletions

View file

@ -127,12 +127,18 @@ class FormattedNavNotification extends BaseFactory
public function createFromIntro(\Friendica\Contact\Introduction\Entity\Introduction $intro): ValueObject\FormattedNavNotification public function createFromIntro(\Friendica\Contact\Introduction\Entity\Introduction $intro): ValueObject\FormattedNavNotification
{ {
if (!isset(self::$contacts[$intro->cid])) { if (!isset(self::$contacts[$intro->cid])) {
self::$contacts[$intro->cid] = Contact::getById($intro->cid, ['name', 'url']); self::$contacts[$intro->cid] = Contact::getById($intro->cid, ['name', 'url', 'pending']);
}
if (self::$contacts[$intro->cid]['pending']) {
$msg = $this->l10n->t('{0} wants to follow you');
} else {
$msg = $this->l10n->t('{0} has started following you');
} }
return $this->createFromParams( return $this->createFromParams(
self::$contacts[$intro->cid], self::$contacts[$intro->cid],
$this->l10n->t('{0} wants to follow you'), $msg,
$intro->datetime, $intro->datetime,
new Uri($this->baseUrl->get() . '/notifications/intros/' . $intro->id) new Uri($this->baseUrl->get() . '/notifications/intros/' . $intro->id)
); );

View file

@ -126,8 +126,7 @@ class Notification extends BaseFactory implements ICanCreateFromTableRow
} }
if ($Notification->type === Post\UserNotification::TYPE_NONE) { if ($Notification->type === Post\UserNotification::TYPE_NONE) {
$localRelationship = $this->localRelationshipRepo->getForUserContact($Notification->uid, $Notification->actorId); if ($causer['pending']) {
if ($localRelationship->pending) {
$msg = $this->l10n->t('%1$s wants to follow you'); $msg = $this->l10n->t('%1$s wants to follow you');
} else { } else {
$msg = $this->l10n->t('%1$s has started following you'); $msg = $this->l10n->t('%1$s has started following you');

View file

@ -8,7 +8,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: 2022.05-rc\n" "Project-Id-Version: 2022.05-rc\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2022-05-29 13:18-0400\n" "POT-Creation-Date: 2022-05-31 13:27+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"
@ -467,7 +467,7 @@ msgid "OStatus support is disabled. Contact can't be added."
msgstr "" msgstr ""
#: mod/follow.php:138 src/Content/Item.php:443 src/Content/Widget.php:78 #: mod/follow.php:138 src/Content/Item.php:443 src/Content/Widget.php:78
#: src/Model/Contact.php:1101 src/Model/Contact.php:1113 #: src/Model/Contact.php:1102 src/Model/Contact.php:1114
#: view/theme/vier/theme.php:172 #: view/theme/vier/theme.php:172
msgid "Connect/Follow" msgid "Connect/Follow"
msgstr "" msgstr ""
@ -1006,27 +1006,27 @@ msgstr ""
msgid "Delete Photo" msgid "Delete Photo"
msgstr "" msgstr ""
#: mod/photos.php:1200 #: mod/photos.php:1202
msgid "View photo" msgid "View photo"
msgstr "" msgstr ""
#: mod/photos.php:1202 #: mod/photos.php:1204
msgid "Edit photo" msgid "Edit photo"
msgstr "" msgstr ""
#: mod/photos.php:1203 #: mod/photos.php:1205
msgid "Delete photo" msgid "Delete photo"
msgstr "" msgstr ""
#: mod/photos.php:1204 #: mod/photos.php:1206
msgid "Use as profile photo" msgid "Use as profile photo"
msgstr "" msgstr ""
#: mod/photos.php:1211 #: mod/photos.php:1213
msgid "Private Photo" msgid "Private Photo"
msgstr "" msgstr ""
#: mod/photos.php:1217 #: mod/photos.php:1219
msgid "View Full Size" msgid "View Full Size"
msgstr "" msgstr ""
@ -2220,31 +2220,31 @@ msgstr ""
msgid "Follow Thread" msgid "Follow Thread"
msgstr "" msgstr ""
#: src/Content/Item.php:423 src/Model/Contact.php:1106 #: src/Content/Item.php:423 src/Model/Contact.php:1107
msgid "View Status" msgid "View Status"
msgstr "" msgstr ""
#: src/Content/Item.php:424 src/Content/Item.php:446 src/Model/Contact.php:1040 #: src/Content/Item.php:424 src/Content/Item.php:446 src/Model/Contact.php:1041
#: src/Model/Contact.php:1098 src/Model/Contact.php:1107 #: src/Model/Contact.php:1099 src/Model/Contact.php:1108
#: src/Module/Directory.php:158 src/Module/Settings/Profile/Index.php:225 #: src/Module/Directory.php:158 src/Module/Settings/Profile/Index.php:225
msgid "View Profile" msgid "View Profile"
msgstr "" msgstr ""
#: src/Content/Item.php:425 src/Model/Contact.php:1108 #: src/Content/Item.php:425 src/Model/Contact.php:1109
msgid "View Photos" msgid "View Photos"
msgstr "" msgstr ""
#: src/Content/Item.php:426 src/Model/Contact.php:1099 #: src/Content/Item.php:426 src/Model/Contact.php:1100
#: src/Model/Contact.php:1109 #: src/Model/Contact.php:1110
msgid "Network Posts" msgid "Network Posts"
msgstr "" msgstr ""
#: src/Content/Item.php:427 src/Model/Contact.php:1100 #: src/Content/Item.php:427 src/Model/Contact.php:1101
#: src/Model/Contact.php:1110 #: src/Model/Contact.php:1111
msgid "View Contact" msgid "View Contact"
msgstr "" msgstr ""
#: src/Content/Item.php:428 src/Model/Contact.php:1111 #: src/Content/Item.php:428 src/Model/Contact.php:1112
msgid "Send PM" msgid "Send PM"
msgstr "" msgstr ""
@ -2267,7 +2267,7 @@ msgstr ""
msgid "Languages" msgid "Languages"
msgstr "" msgstr ""
#: src/Content/Item.php:438 src/Model/Contact.php:1112 #: src/Content/Item.php:438 src/Model/Contact.php:1113
msgid "Poke" msgid "Poke"
msgstr "" msgstr ""
@ -2719,7 +2719,7 @@ msgstr ""
msgid "Organisations" msgid "Organisations"
msgstr "" msgstr ""
#: src/Content/Widget.php:521 src/Model/Contact.php:1536 #: src/Content/Widget.php:521 src/Model/Contact.php:1537
msgid "News" msgid "News"
msgstr "" msgstr ""
@ -3547,81 +3547,81 @@ msgstr ""
msgid "Legacy module file not found: %s" msgid "Legacy module file not found: %s"
msgstr "" msgstr ""
#: src/Model/Contact.php:1102 src/Model/Contact.php:1114 #: src/Model/Contact.php:1103 src/Model/Contact.php:1115
msgid "UnFollow" msgid "UnFollow"
msgstr "" msgstr ""
#: src/Model/Contact.php:1120 src/Module/Admin/Users/Pending.php:107 #: src/Model/Contact.php:1121 src/Module/Admin/Users/Pending.php:107
#: src/Module/Notifications/Introductions.php:130 #: src/Module/Notifications/Introductions.php:130
#: src/Module/Notifications/Introductions.php:202 #: src/Module/Notifications/Introductions.php:202
msgid "Approve" msgid "Approve"
msgstr "" msgstr ""
#: src/Model/Contact.php:1532 #: src/Model/Contact.php:1533
msgid "Organisation" msgid "Organisation"
msgstr "" msgstr ""
#: src/Model/Contact.php:1540 #: src/Model/Contact.php:1541
msgid "Forum" msgid "Forum"
msgstr "" msgstr ""
#: src/Model/Contact.php:2516 #: src/Model/Contact.php:2517
msgid "Disallowed profile URL." msgid "Disallowed profile URL."
msgstr "" msgstr ""
#: src/Model/Contact.php:2521 src/Module/Friendica.php:81 #: src/Model/Contact.php:2522 src/Module/Friendica.php:81
msgid "Blocked domain" msgid "Blocked domain"
msgstr "" msgstr ""
#: src/Model/Contact.php:2526 #: src/Model/Contact.php:2527
msgid "Connect URL missing." msgid "Connect URL missing."
msgstr "" msgstr ""
#: src/Model/Contact.php:2535 #: src/Model/Contact.php:2536
msgid "" msgid ""
"The contact could not be added. Please check the relevant network " "The contact could not be added. Please check the relevant network "
"credentials in your Settings -> Social Networks page." "credentials in your Settings -> Social Networks page."
msgstr "" msgstr ""
#: src/Model/Contact.php:2577 #: src/Model/Contact.php:2578
msgid "The profile address specified does not provide adequate information." msgid "The profile address specified does not provide adequate information."
msgstr "" msgstr ""
#: src/Model/Contact.php:2579 #: src/Model/Contact.php:2580
msgid "No compatible communication protocols or feeds were discovered." msgid "No compatible communication protocols or feeds were discovered."
msgstr "" msgstr ""
#: src/Model/Contact.php:2582 #: src/Model/Contact.php:2583
msgid "An author or name was not found." msgid "An author or name was not found."
msgstr "" msgstr ""
#: src/Model/Contact.php:2585 #: src/Model/Contact.php:2586
msgid "No browser URL could be matched to this address." msgid "No browser URL could be matched to this address."
msgstr "" msgstr ""
#: src/Model/Contact.php:2588 #: src/Model/Contact.php:2589
msgid "" msgid ""
"Unable to match @-style Identity Address with a known protocol or email " "Unable to match @-style Identity Address with a known protocol or email "
"contact." "contact."
msgstr "" msgstr ""
#: src/Model/Contact.php:2589 #: src/Model/Contact.php:2590
msgid "Use mailto: in front of address to force email check." msgid "Use mailto: in front of address to force email check."
msgstr "" msgstr ""
#: src/Model/Contact.php:2595 #: src/Model/Contact.php:2596
msgid "" msgid ""
"The profile address specified belongs to a network which has been disabled " "The profile address specified belongs to a network which has been disabled "
"on this site." "on this site."
msgstr "" msgstr ""
#: src/Model/Contact.php:2600 #: src/Model/Contact.php:2601
msgid "" msgid ""
"Limited profile. This person will be unable to receive direct/personal " "Limited profile. This person will be unable to receive direct/personal "
"notifications from you." "notifications from you."
msgstr "" msgstr ""
#: src/Model/Contact.php:2659 #: src/Model/Contact.php:2660
msgid "Unable to retrieve contact information." msgid "Unable to retrieve contact information."
msgstr "" msgstr ""
@ -3860,83 +3860,83 @@ msgstr ""
msgid "OpenWebAuth: %1$s welcomes %2$s" msgid "OpenWebAuth: %1$s welcomes %2$s"
msgstr "" msgstr ""
#: src/Model/Profile.php:986 #: src/Model/Profile.php:980
msgid "Hometown:" msgid "Hometown:"
msgstr "" msgstr ""
#: src/Model/Profile.php:987 #: src/Model/Profile.php:981
msgid "Marital Status:" msgid "Marital Status:"
msgstr "" msgstr ""
#: src/Model/Profile.php:988 #: src/Model/Profile.php:982
msgid "With:" msgid "With:"
msgstr "" msgstr ""
#: src/Model/Profile.php:989 #: src/Model/Profile.php:983
msgid "Since:" msgid "Since:"
msgstr "" msgstr ""
#: src/Model/Profile.php:990 #: src/Model/Profile.php:984
msgid "Sexual Preference:" msgid "Sexual Preference:"
msgstr "" msgstr ""
#: src/Model/Profile.php:991 #: src/Model/Profile.php:985
msgid "Political Views:" msgid "Political Views:"
msgstr "" msgstr ""
#: src/Model/Profile.php:992 #: src/Model/Profile.php:986
msgid "Religious Views:" msgid "Religious Views:"
msgstr "" msgstr ""
#: src/Model/Profile.php:993 #: src/Model/Profile.php:987
msgid "Likes:" msgid "Likes:"
msgstr "" msgstr ""
#: src/Model/Profile.php:994 #: src/Model/Profile.php:988
msgid "Dislikes:" msgid "Dislikes:"
msgstr "" msgstr ""
#: src/Model/Profile.php:995 #: src/Model/Profile.php:989
msgid "Title/Description:" msgid "Title/Description:"
msgstr "" msgstr ""
#: src/Model/Profile.php:996 src/Module/Admin/Summary.php:234 #: src/Model/Profile.php:990 src/Module/Admin/Summary.php:234
msgid "Summary" msgid "Summary"
msgstr "" msgstr ""
#: src/Model/Profile.php:997 #: src/Model/Profile.php:991
msgid "Musical interests" msgid "Musical interests"
msgstr "" msgstr ""
#: src/Model/Profile.php:998 #: src/Model/Profile.php:992
msgid "Books, literature" msgid "Books, literature"
msgstr "" msgstr ""
#: src/Model/Profile.php:999 #: src/Model/Profile.php:993
msgid "Television" msgid "Television"
msgstr "" msgstr ""
#: src/Model/Profile.php:1000 #: src/Model/Profile.php:994
msgid "Film/dance/culture/entertainment" msgid "Film/dance/culture/entertainment"
msgstr "" msgstr ""
#: src/Model/Profile.php:1001 #: src/Model/Profile.php:995
msgid "Hobbies/Interests" msgid "Hobbies/Interests"
msgstr "" msgstr ""
#: src/Model/Profile.php:1002 #: src/Model/Profile.php:996
msgid "Love/romance" msgid "Love/romance"
msgstr "" msgstr ""
#: src/Model/Profile.php:1003 #: src/Model/Profile.php:997
msgid "Work/employment" msgid "Work/employment"
msgstr "" msgstr ""
#: src/Model/Profile.php:1004 #: src/Model/Profile.php:998
msgid "School/education" msgid "School/education"
msgstr "" msgstr ""
#: src/Model/Profile.php:1005 #: src/Model/Profile.php:999
msgid "Contact information and Social Networks" msgid "Contact information and Social Networks"
msgstr "" msgstr ""
@ -10016,10 +10016,14 @@ msgid ""
"features and resources." "features and resources."
msgstr "" msgstr ""
#: src/Navigation/Notifications/Factory/FormattedNavNotification.php:135 #: src/Navigation/Notifications/Factory/FormattedNavNotification.php:134
msgid "{0} wants to follow you" msgid "{0} wants to follow you"
msgstr "" msgstr ""
#: src/Navigation/Notifications/Factory/FormattedNavNotification.php:136
msgid "{0} has started following you"
msgstr ""
#: src/Navigation/Notifications/Factory/FormattedNotify.php:91 #: src/Navigation/Notifications/Factory/FormattedNotify.php:91
#, php-format #, php-format
msgid "%s liked %s's post" msgid "%s liked %s's post"
@ -10073,126 +10077,126 @@ msgstr ""
msgid "New Follower" msgid "New Follower"
msgstr "" msgstr ""
#: src/Navigation/Notifications/Factory/Notification.php:131 #: src/Navigation/Notifications/Factory/Notification.php:130
#, php-format #, php-format
msgid "%1$s wants to follow you" msgid "%1$s wants to follow you"
msgstr "" msgstr ""
#: src/Navigation/Notifications/Factory/Notification.php:133 #: src/Navigation/Notifications/Factory/Notification.php:132
#, php-format #, php-format
msgid "%1$s has started following you" msgid "%1$s has started following you"
msgstr "" msgstr ""
#: src/Navigation/Notifications/Factory/Notification.php:197 #: src/Navigation/Notifications/Factory/Notification.php:196
#, php-format #, php-format
msgid "%1$s liked your comment on %2$s" msgid "%1$s liked your comment on %2$s"
msgstr "" msgstr ""
#: src/Navigation/Notifications/Factory/Notification.php:200 #: src/Navigation/Notifications/Factory/Notification.php:199
#, php-format #, php-format
msgid "%1$s liked your post %2$s" msgid "%1$s liked your post %2$s"
msgstr "" msgstr ""
#: src/Navigation/Notifications/Factory/Notification.php:207 #: src/Navigation/Notifications/Factory/Notification.php:206
#, php-format #, php-format
msgid "%1$s disliked your comment on %2$s" msgid "%1$s disliked your comment on %2$s"
msgstr "" msgstr ""
#: src/Navigation/Notifications/Factory/Notification.php:210 #: src/Navigation/Notifications/Factory/Notification.php:209
#, php-format #, php-format
msgid "%1$s disliked your post %2$s" msgid "%1$s disliked your post %2$s"
msgstr "" msgstr ""
#: src/Navigation/Notifications/Factory/Notification.php:217 #: src/Navigation/Notifications/Factory/Notification.php:216
#, php-format #, php-format
msgid "%1$s shared your comment %2$s" msgid "%1$s shared your comment %2$s"
msgstr "" msgstr ""
#: src/Navigation/Notifications/Factory/Notification.php:220 #: src/Navigation/Notifications/Factory/Notification.php:219
#, php-format #, php-format
msgid "%1$s shared your post %2$s" msgid "%1$s shared your post %2$s"
msgstr "" msgstr ""
#: src/Navigation/Notifications/Factory/Notification.php:224 #: src/Navigation/Notifications/Factory/Notification.php:223
#: src/Navigation/Notifications/Factory/Notification.php:293 #: src/Navigation/Notifications/Factory/Notification.php:292
#, php-format #, php-format
msgid "%1$s shared the post %2$s from %3$s" msgid "%1$s shared the post %2$s from %3$s"
msgstr "" msgstr ""
#: src/Navigation/Notifications/Factory/Notification.php:226 #: src/Navigation/Notifications/Factory/Notification.php:225
#: src/Navigation/Notifications/Factory/Notification.php:295 #: src/Navigation/Notifications/Factory/Notification.php:294
#, php-format #, php-format
msgid "%1$s shared a post from %3$s" msgid "%1$s shared a post from %3$s"
msgstr "" msgstr ""
#: src/Navigation/Notifications/Factory/Notification.php:228 #: src/Navigation/Notifications/Factory/Notification.php:227
#: src/Navigation/Notifications/Factory/Notification.php:297 #: src/Navigation/Notifications/Factory/Notification.php:296
#, php-format #, php-format
msgid "%1$s shared the post %2$s" msgid "%1$s shared the post %2$s"
msgstr "" msgstr ""
#: src/Navigation/Notifications/Factory/Notification.php:230 #: src/Navigation/Notifications/Factory/Notification.php:229
#: src/Navigation/Notifications/Factory/Notification.php:299 #: src/Navigation/Notifications/Factory/Notification.php:298
#, php-format #, php-format
msgid "%1$s shared a post" msgid "%1$s shared a post"
msgstr "" msgstr ""
#: src/Navigation/Notifications/Factory/Notification.php:238 #: src/Navigation/Notifications/Factory/Notification.php:237
#, php-format #, php-format
msgid "%1$s wants to attend your event %2$s" msgid "%1$s wants to attend your event %2$s"
msgstr "" msgstr ""
#: src/Navigation/Notifications/Factory/Notification.php:245 #: src/Navigation/Notifications/Factory/Notification.php:244
#, php-format #, php-format
msgid "%1$s does not want to attend your event %2$s" msgid "%1$s does not want to attend your event %2$s"
msgstr "" msgstr ""
#: src/Navigation/Notifications/Factory/Notification.php:252 #: src/Navigation/Notifications/Factory/Notification.php:251
#, php-format #, php-format
msgid "%1$s maybe wants to attend your event %2$s" msgid "%1$s maybe wants to attend your event %2$s"
msgstr "" msgstr ""
#: src/Navigation/Notifications/Factory/Notification.php:259 #: src/Navigation/Notifications/Factory/Notification.php:258
#, php-format #, php-format
msgid "%1$s tagged you on %2$s" msgid "%1$s tagged you on %2$s"
msgstr "" msgstr ""
#: src/Navigation/Notifications/Factory/Notification.php:263 #: src/Navigation/Notifications/Factory/Notification.php:262
#, php-format #, php-format
msgid "%1$s replied to you on %2$s" msgid "%1$s replied to you on %2$s"
msgstr "" msgstr ""
#: src/Navigation/Notifications/Factory/Notification.php:267 #: src/Navigation/Notifications/Factory/Notification.php:266
#, php-format #, php-format
msgid "%1$s commented in your thread %2$s" msgid "%1$s commented in your thread %2$s"
msgstr "" msgstr ""
#: src/Navigation/Notifications/Factory/Notification.php:271 #: src/Navigation/Notifications/Factory/Notification.php:270
#, php-format #, php-format
msgid "%1$s commented on your comment %2$s" msgid "%1$s commented on your comment %2$s"
msgstr "" msgstr ""
#: src/Navigation/Notifications/Factory/Notification.php:277 #: src/Navigation/Notifications/Factory/Notification.php:276
#, php-format #, php-format
msgid "%1$s commented in their thread %2$s" msgid "%1$s commented in their thread %2$s"
msgstr "" msgstr ""
#: src/Navigation/Notifications/Factory/Notification.php:279 #: src/Navigation/Notifications/Factory/Notification.php:278
#, php-format #, php-format
msgid "%1$s commented in their thread" msgid "%1$s commented in their thread"
msgstr "" msgstr ""
#: src/Navigation/Notifications/Factory/Notification.php:281 #: src/Navigation/Notifications/Factory/Notification.php:280
#, php-format #, php-format
msgid "%1$s commented in the thread %2$s from %3$s" msgid "%1$s commented in the thread %2$s from %3$s"
msgstr "" msgstr ""
#: src/Navigation/Notifications/Factory/Notification.php:283 #: src/Navigation/Notifications/Factory/Notification.php:282
#, php-format #, php-format
msgid "%1$s commented in the thread from %3$s" msgid "%1$s commented in the thread from %3$s"
msgstr "" msgstr ""
#: src/Navigation/Notifications/Factory/Notification.php:288 #: src/Navigation/Notifications/Factory/Notification.php:287
#, php-format #, php-format
msgid "%1$s commented on your thread %2$s" msgid "%1$s commented on your thread %2$s"
msgstr "" msgstr ""