2
2
mirror of https://github.com/mastodon/mastodon-ios synced 2025-04-11 22:58:02 +02:00

Prepare to handle grouped adminSignUp notifications

This commit is contained in:
shannon 2025-03-28 12:02:17 -04:00
parent 3b8f1f6fae
commit a9b7e5a341
5 changed files with 14 additions and 2 deletions

View File

@ -765,6 +765,7 @@
"multiple_people_boosted": "%@ boosted:",
"multiple_people_favourited": "%@ favorited:",
"multiple_people_followed_you": "%@ followed you",
"mulitple_people_signed_up": "%@ new signups",
"single_name_signed_up": "%@ signed up",
"someone_reported_account_for_rule_violation": "Someone reported %@ for rule violation.",
"someone_reported_posts_from_account_for_rule_violation": "Someone reported %@ from %@ for rule violation."

View File

@ -142,6 +142,8 @@ extension GroupedNotificationType {
plainString = L10n.Plural.Count.peopleFollowedYou(totalAuthorCount)
case .reblog:
plainString = L10n.Plural.Count.peopleBoosted(totalAuthorCount)
case .adminSignUp:
plainString = L10n.Scene.Notification.GroupedNotificationDescription.multiplePeopleSignedUp(totalAuthorCount)
default:
plainString = L10n.Plural.Count.others(totalAuthorCount)
}

View File

@ -785,10 +785,14 @@ extension NotificationRowViewModel {
} else if let primaryAccount {
return .profile(primaryAccount)
}
case .followRequest, .adminSignUp:
case .followRequest:
if let primaryAccount {
return .profile(primaryAccount)
}
case .adminSignUp:
if !isGrouped, let primaryAccount {
return .profile(primaryAccount)
}
case .adminReport:
break
case .severedRelationships(_, let url):

View File

@ -972,6 +972,10 @@ public enum L10n {
public static func multiplePeopleFollowedYou(_ p1: Any) -> String {
return L10n.tr("Localizable", "Scene.Notification.GroupedNotificationDescription.MultiplePeopleFollowedYou", String(describing: p1), fallback: "%@ followed you")
}
/// %@ new signups
public static func multiplePeopleSignedUp(_ p1: Any) -> String {
return L10n.tr("Localizable", "Scene.Notification.GroupedNotificationDescription.MultiplePeopleSignedUp", String(describing: p1), fallback: "%@ new signups")
}
/// %@ boosted:
public static func singleNameBoosted(_ p1: Any) -> String {
return L10n.tr("Localizable", "Scene.Notification.GroupedNotificationDescription.SingleNameBoosted", String(describing: p1), fallback: "%@ boosted:")

View File

@ -345,6 +345,7 @@ Please retry in a few minutes.";
"Scene.Notification.GroupedNotificationDescription.MultiplePeopleBoosted" = "%@ boosted:";
"Scene.Notification.GroupedNotificationDescription.MultiplePeopleFavourited" = "%@ favorited:";
"Scene.Notification.GroupedNotificationDescription.MultiplePeopleFollowedYou" = "%@ followed you";
"Scene.Notification.GroupedNotificationDescription.MultiplePeopleSignedUp" = "%@ new signups";
"Scene.Notification.GroupedNotificationDescription.SingleNameBoosted" = "%@ boosted:";
"Scene.Notification.GroupedNotificationDescription.SingleNameEditedAPost" = "%@ edited a post you interacted with";
"Scene.Notification.GroupedNotificationDescription.SingleNameFavourited" = "%@ favorited:";
@ -682,4 +683,4 @@ If you disagree with the policy for **%@**, you can go back and pick a different
"Widget.MultipleFollowers.ConfigurationDescription" = "Show number of followers for multiple accounts.";
"Widget.MultipleFollowers.ConfigurationDisplayName" = "Multiple followers";
"Widget.MultipleFollowers.MockUser.AccountName" = "another@follower.social";
"Widget.MultipleFollowers.MockUser.DisplayName" = "Another follower";
"Widget.MultipleFollowers.MockUser.DisplayName" = "Another follower";