diff --git a/Signal/src/Calls/UserInterface/CallHeader.swift b/Signal/src/Calls/UserInterface/CallHeader.swift index 63894d12d3..836a3a6c69 100644 --- a/Signal/src/Calls/UserInterface/CallHeader.swift +++ b/Signal/src/Calls/UserInterface/CallHeader.swift @@ -224,12 +224,6 @@ class CallHeader: UIView { comment: "Text explaining that there are two people in the group call. Embeds {{ %1$@ participant1, %2$@ participant2 }}" ) callTitleText = String(format: formatString, memberNames[0], memberNames[1]) - case 3: - let formatString = NSLocalizedString( - "GROUP_CALL_THREE_PEOPLE_HERE_FORMAT", - comment: "Text explaining that there are three people in the group call. Embeds {{ %1$@ participant1, %2$@ participant2 }}" - ) - callTitleText = String(format: formatString, memberNames[0], memberNames[1]) default: let formatString = NSLocalizedString( "GROUP_CALL_MANY_PEOPLE_HERE_%d", tableName: "PluralAware", diff --git a/Signal/translations/en.lproj/Localizable.strings b/Signal/translations/en.lproj/Localizable.strings index d41f338a4b..7ea82ceb6f 100644 --- a/Signal/translations/en.lproj/Localizable.strings +++ b/Signal/translations/en.lproj/Localizable.strings @@ -2242,9 +2242,6 @@ /* Button to leave a group call */ "GROUP_CALL_LEAVE_BUTTON" = "Leave Call"; -/* Text explaining that there are more than three people in the group call. Embeds {{ %1$@ participant1, %2$@ participant2, %3$@ participantCount-2 }} */ -"GROUP_CALL_MANY_PEOPLE_HERE_FORMAT" = "%1$@, %2$@, and %3$@ others are in this call"; - /* String displayed in cell when media from a user can't be displayed in group call grid. Embeds {user's name} */ "GROUP_CALL_MISSING_MEDIA_KEYS_FORMAT" = "Can't receive audio & video from %@"; @@ -2305,9 +2302,6 @@ /* Text explaining that someone started a group call. Embeds {{call creator display name}} */ "GROUP_CALL_STARTED_MESSAGE_FORMAT" = "%@ started a group call"; -/* Text explaining that there are three people in the group call. Embeds {{ %1$@ participant1, %2$@ participant2 }} */ -"GROUP_CALL_THREE_PEOPLE_HERE_FORMAT" = "%1$@, %2$@, and 1 other is in this call"; - /* Text explaining that there are two people in the group call. Embeds {{ %1$@ participant1, %2$@ participant2 }} */ "GROUP_CALL_TWO_PEOPLE_HERE_FORMAT" = "%1$@ and %2$@ are in this call"; diff --git a/SignalServiceKit/src/Messages/OWSGroupCallMessage.m b/SignalServiceKit/src/Messages/OWSGroupCallMessage.m index e07f9befd3..46fd1db561 100644 --- a/SignalServiceKit/src/Messages/OWSGroupCallMessage.m +++ b/SignalServiceKit/src/Messages/OWSGroupCallMessage.m @@ -167,12 +167,11 @@ NS_ASSUME_NONNULL_BEGIN - (NSString *)systemTextWithTransaction:(SDSAnyReadTransaction *)transaction { - NSString *moreThanThreeFormat = OWSLocalizedString(@"GROUP_CALL_MANY_PEOPLE_HERE_FORMAT", - @"Text explaining that there are more than three people in the group call. Embeds {{ %1$@ participant1, %2$@ " - @"participant2, %3$@ participantCount-2 }}"); - NSString *threeFormat = OWSLocalizedString(@"GROUP_CALL_THREE_PEOPLE_HERE_FORMAT", - @"Text explaining that there are three people in the group call. Embeds {{ %1$@ participant1, %2$@ " - @"participant2 }}"); + NSString *threeOrMoreFormat = NSLocalizedStringFromTableInBundle(@"GROUP_CALL_MANY_PEOPLE_HERE_%d", + @"PluralAware", + NSBundle.mainBundle.appBundle, + @"Text explaining that there are three or more people in the group call. Embeds {{ %1$@ participantCount-2, " + @"%2$@ participant1, %3$@ participant2 }}"); NSString *twoFormat = OWSLocalizedString(@"GROUP_CALL_TWO_PEOPLE_HERE_FORMAT", @"Text explaining that there are two people in the group call. Embeds {{ %1$@ participant1, %2$@ participant2 " @"}}"); @@ -209,16 +208,10 @@ NS_ASSUME_NONNULL_BEGIN if (self.hasEnded) { return endedString; - } else if (sortedAddresses.count >= 4) { + } else if (sortedAddresses.count >= 3) { NSString *firstName = [self participantNameForAddress:sortedAddresses[0] transaction:transaction]; NSString *secondName = [self participantNameForAddress:sortedAddresses[1] transaction:transaction]; - NSString *remainingCount = [OWSFormat formatInt:(sortedAddresses.count - 2)]; - return [NSString stringWithFormat:moreThanThreeFormat, firstName, secondName, remainingCount]; - - } else if (sortedAddresses.count == 3) { - NSString *firstName = [self participantNameForAddress:sortedAddresses[0] transaction:transaction]; - NSString *secondName = [self participantNameForAddress:sortedAddresses[1] transaction:transaction]; - return [NSString stringWithFormat:threeFormat, firstName, secondName]; + return [NSString localizedStringWithFormat:threeOrMoreFormat, sortedAddresses.count - 2, firstName, secondName]; } else if (sortedAddresses.count == 2) { NSString *firstName = [self participantNameForAddress:sortedAddresses[0] transaction:transaction];