diff --git a/Signal/src/ViewControllers/AppSettings/BlockListViewController.m b/Signal/src/ViewControllers/AppSettings/BlockListViewController.m index 3f3127f83..e54d794c9 100644 --- a/Signal/src/ViewControllers/AppSettings/BlockListViewController.m +++ b/Signal/src/ViewControllers/AppSettings/BlockListViewController.m @@ -61,7 +61,7 @@ NS_ASSUME_NONNULL_BEGIN OWSTableSection *addSection = [OWSTableSection new]; addSection.footerTitle = NSLocalizedString( - @"BLOCK_BEHAVIOR_EXPLANATION", @"An explanation of the consequences of blocking another user."); + @"BLOCK_USER_BEHAVIOR_EXPLANATION", @"An explanation of the consequences of blocking another user."); [addSection addItem:[OWSTableItem diff --git a/Signal/src/ViewControllers/ThreadSettings/OWSConversationSettingsViewController.m b/Signal/src/ViewControllers/ThreadSettings/OWSConversationSettingsViewController.m index 807c517cc..65dacd486 100644 --- a/Signal/src/ViewControllers/ThreadSettings/OWSConversationSettingsViewController.m +++ b/Signal/src/ViewControllers/ThreadSettings/OWSConversationSettingsViewController.m @@ -622,10 +622,10 @@ const CGFloat kIconViewLength = 24; OWSTableSection *section = [OWSTableSection new]; if (self.thread.isGroupThread) { section.footerTitle = NSLocalizedString( - @"BLOCK_GROUP_BEHAVIOR_EXPLANATION", @"An explanation of the consequences of blocking another user."); + @"BLOCK_GROUP_BEHAVIOR_EXPLANATION", @"An explanation of the consequences of blocking a group."); } else { section.footerTitle = NSLocalizedString( - @"BLOCK_USER_BEHAVIOR_EXPLANATION", @"An explanation of the consequences of blocking a group."); + @"BLOCK_USER_BEHAVIOR_EXPLANATION", @"An explanation of the consequences of blocking another user."); } [section addItem:[OWSTableItem diff --git a/Signal/translations/en.lproj/Localizable.strings b/Signal/translations/en.lproj/Localizable.strings index 60c675758..3ada0223f 100644 --- a/Signal/translations/en.lproj/Localizable.strings +++ b/Signal/translations/en.lproj/Localizable.strings @@ -224,22 +224,28 @@ /* Indicates that the backup import data is being restored. */ "BACKUP_IMPORT_PHASE_RESTORING_FILES" = "Restoring Files"; -/* An explanation of the consequences of blocking another user. */ -"BLOCK_BEHAVIOR_EXPLANATION" = "Blocked users will not be able to call you or send you messages."; - -/* An explanation of the consequences of blocking another user. */ -"BLOCK_GROUP_BEHAVIOR_EXPLANATION" = "BLOCK_GROUP_BEHAVIOR_EXPLANATION"; +/* An explanation of the consequences of blocking a group. */ +"BLOCK_GROUP_BEHAVIOR_EXPLANATION" = "You will not be able to send or receive messages in a blocked group. If you later unblock the group, you'll need to be re-added to the group before you can once again send or receive messages in that group."; /* Button label for the 'block' button */ "BLOCK_LIST_BLOCK_BUTTON" = "Block"; +/* A format for the 'block group' action sheet title. Embeds the {{group name}}. */ +"BLOCK_LIST_BLOCK_GROUP_TITLE_FORMAT" = "Block and Leave the \"%@\" group?"; + /* A format for the 'block user' action sheet title. Embeds {{the blocked user's name or phone number}}. */ -"BLOCK_LIST_BLOCK_TITLE_FORMAT" = "Block %@?"; +"BLOCK_LIST_BLOCK_USER_TITLE_FORMAT" = "Block %@?"; /* Button label for the 'unblock' button */ "BLOCK_LIST_UNBLOCK_BUTTON" = "Unblock"; -/* A format for the 'unblock user' action sheet title. Embeds {{the blocked user's name or phone number}}. */ +/* Action sheet body when confirming you want to unblock a group */ +"BLOCK_LIST_UNBLOCK_GROUP_BODY" = "You will need to be added to the group by another member to be able to message."; + +/* Action sheet title when confirming you want to unblock a group. Embeds the {{conversation title}}. */ +"BLOCK_LIST_UNBLOCK_GROUP_TITLE_FORMAT" = "Unblock this Group?"; + +/* A format for the 'unblock conversation' action sheet title. Embeds the {{conversation title}}. */ "BLOCK_LIST_UNBLOCK_TITLE_FORMAT" = "Unblock %@?"; /* A label for the block button in the block list view */ @@ -251,12 +257,15 @@ /* The title of the 'block user failed' alert. */ "BLOCK_LIST_VIEW_BLOCK_FAILED_ALERT_TITLE" = "Error"; -/* The message format of the 'user blocked' alert. Embeds {{the blocked user's name or phone number}}. */ +/* The message format of the 'conversation blocked' alert. Embeds the {{conversation title}}. */ "BLOCK_LIST_VIEW_BLOCKED_ALERT_MESSAGE_FORMAT" = "%@ has been blocked"; /* The title of the 'user blocked' alert. */ "BLOCK_LIST_VIEW_BLOCKED_ALERT_TITLE" = "User Blocked"; +/* The title of the 'group blocked' alert. */ +"BLOCK_LIST_VIEW_BLOCKED_GROUP_ALERT_TITLE" = "Group Blocked"; + /* The message of the 'You can't block yourself' alert. */ "BLOCK_LIST_VIEW_CANT_BLOCK_SELF_ALERT_MESSAGE" = "You can't block yourself."; @@ -269,11 +278,11 @@ /* The title of the 'unblock user failed' alert. */ "BLOCK_LIST_VIEW_UNBLOCK_FAILED_ALERT_TITLE" = "Error"; -/* The message format of the 'user unblocked' alert. Embeds {{the blocked user's name or phone number}}. */ +/* Alert body after unblocking a group or 1:1 chat. Embeds the conversation title. */ "BLOCK_LIST_VIEW_UNBLOCKED_ALERT_MESSAGE_FORMAT" = "%@ has been unblocked."; -/* The title of the 'user unblocked' alert. */ -"BLOCK_LIST_VIEW_UNBLOCKED_ALERT_TITLE" = "User Unblocked"; +/* Alert title after unblocking a group or 1:1 chat. */ +"BLOCK_LIST_VIEW_UNBLOCKED_ALERT_TITLE" = "Unblocked"; /* Action sheet that will block an unknown user. */ "BLOCK_OFFER_ACTIONSHEET_BLOCK_ACTION" = "Block"; @@ -281,8 +290,8 @@ /* Title format for action sheet that offers to block an unknown user.Embeds {{the unknown user's name or phone number}}. */ "BLOCK_OFFER_ACTIONSHEET_TITLE_FORMAT" = "Block %@?"; -/* An explanation of the consequences of blocking a group. */ -"BLOCK_USER_BEHAVIOR_EXPLANATION" = "BLOCK_USER_BEHAVIOR_EXPLANATION"; +/* An explanation of the consequences of blocking another user. */ +"BLOCK_USER_BEHAVIOR_EXPLANATION" = "Blocked users will not be able to call you or send you messages."; /* Label for 'continue' button. */ "BUTTON_CONTINUE" = "Continue"; @@ -519,7 +528,7 @@ "CONVERSATION_SETTINGS_ADD_TO_EXISTING_CONTACT" = "Add to Existing Contact"; /* table cell label in conversation settings */ -"CONVERSATION_SETTINGS_BLOCK_THIS_GROUP" = "CONVERSATION_SETTINGS_BLOCK_THIS_GROUP"; +"CONVERSATION_SETTINGS_BLOCK_THIS_GROUP" = "Block this Group"; /* table cell label in conversation settings */ "CONVERSATION_SETTINGS_BLOCK_THIS_USER" = "Block this user"; @@ -1275,6 +1284,9 @@ /* Indicates that a single member of this group has been blocked. */ "MESSAGES_VIEW_GROUP_1_MEMBER_BLOCKED" = "You Blocked 1 Member of this Group"; +/* Indicates that this group conversation has been blocked. */ +"MESSAGES_VIEW_GROUP_BLOCKED" = "You Blocked this Group"; + /* Indicates that some members of this group has been blocked. Embeds {{the number of blocked users in this group}}. */ "MESSAGES_VIEW_GROUP_N_MEMBERS_BLOCKED_FORMAT" = "You Blocked %@ Members of this Group"; diff --git a/SignalMessaging/utils/BlockListUIUtils.m b/SignalMessaging/utils/BlockListUIUtils.m index 514263ccf..061c610a7 100644 --- a/SignalMessaging/utils/BlockListUIUtils.m +++ b/SignalMessaging/utils/BlockListUIUtils.m @@ -103,14 +103,14 @@ typedef void (^BlockAlertCompletionBlock)(UIAlertAction *action); } } - NSString *title = [NSString stringWithFormat:NSLocalizedString(@"BLOCK_LIST_BLOCK_TITLE_FORMAT", + NSString *title = [NSString stringWithFormat:NSLocalizedString(@"BLOCK_LIST_BLOCK_USER_TITLE_FORMAT", @"A format for the 'block user' action sheet title. Embeds {{the " @"blocked user's name or phone number}}."), [self formatDisplayNameForAlertTitle:displayName]]; UIAlertController *actionSheetController = [UIAlertController alertControllerWithTitle:title - message:NSLocalizedString(@"BLOCK_BEHAVIOR_EXPLANATION", + message:NSLocalizedString(@"BLOCK_USER_BEHAVIOR_EXPLANATION", @"An explanation of the consequences of blocking another user.") preferredStyle:UIAlertControllerStyleActionSheet]; @@ -152,10 +152,10 @@ typedef void (^BlockAlertCompletionBlock)(UIAlertAction *action); OWSAssert(fromViewController); OWSAssert(blockingManager); - NSString *title = [NSString stringWithFormat:NSLocalizedString(@"BLOCK_LIST_BLOCK_GROUP_TITLE_FORMAT", - @"A format for the 'block group' action sheet title. Embeds {{the " - @"blocked group's name}}."), - [self formatDisplayNameForAlertTitle:displayName]]; + NSString *title = [NSString + stringWithFormat:NSLocalizedString(@"BLOCK_LIST_BLOCK_GROUP_TITLE_FORMAT", + @"A format for the 'block group' action sheet title. Embeds the {{group name}}."), + [self formatDisplayNameForAlertTitle:displayName]]; UIAlertController *actionSheetController = [UIAlertController alertControllerWithTitle:title @@ -211,8 +211,8 @@ typedef void (^BlockAlertCompletionBlock)(UIAlertAction *action); @"BLOCK_LIST_VIEW_BLOCKED_ALERT_TITLE", @"The title of the 'user blocked' alert.") message:[NSString stringWithFormat:NSLocalizedString(@"BLOCK_LIST_VIEW_BLOCKED_ALERT_MESSAGE_FORMAT", - @"The message format of the 'user blocked' " - @"alert. Embeds {{the blocked user's name or phone number}}."), + @"The message format of the 'conversation blocked' alert. " + @"Embeds the {{conversation title}}."), [self formatDisplayNameForAlertMessage:displayName]] fromViewController:fromViewController completionBlock:completionBlock]; @@ -234,8 +234,8 @@ typedef void (^BlockAlertCompletionBlock)(UIAlertAction *action); @"The title of the 'group blocked' alert.") message:[NSString stringWithFormat:NSLocalizedString(@"BLOCK_LIST_VIEW_BLOCKED_ALERT_MESSAGE_FORMAT", - @"The message format of the 'user blocked' " - @"alert. Embeds {{the blocked group's name}}."), + @"The message format of the 'conversation blocked' alert. " + @"Embeds the {{conversation title}}."), [self formatDisplayNameForAlertMessage:displayName]] fromViewController:fromViewController completionBlock:completionBlock]; @@ -307,10 +307,11 @@ typedef void (^BlockAlertCompletionBlock)(UIAlertAction *action); OWSAssert(fromViewController); OWSAssert(blockingManager); - NSString *title = [NSString stringWithFormat:NSLocalizedString(@"BLOCK_LIST_UNBLOCK_TITLE_FORMAT", - @"A format for the 'unblock user' action sheet title. Embeds " - @"{{the blocked user's name or phone number}}."), - [self formatDisplayNameForAlertTitle:displayName]]; + NSString *title = [NSString + stringWithFormat: + NSLocalizedString(@"BLOCK_LIST_UNBLOCK_TITLE_FORMAT", + @"A format for the 'unblock conversation' action sheet title. Embeds the {{conversation title}}."), + [self formatDisplayNameForAlertTitle:displayName]]; UIAlertController *actionSheetController = [UIAlertController alertControllerWithTitle:title message:nil preferredStyle:UIAlertControllerStyleActionSheet]; @@ -360,11 +361,11 @@ typedef void (^BlockAlertCompletionBlock)(UIAlertAction *action); } [self showOkAlertWithTitle:NSLocalizedString(@"BLOCK_LIST_VIEW_UNBLOCKED_ALERT_TITLE", - @"The title of the 'user unblocked' alert.") + @"Alert title after unblocking a group or 1:1 chat.") message:[NSString stringWithFormat:NSLocalizedString(@"BLOCK_LIST_VIEW_UNBLOCKED_ALERT_MESSAGE_FORMAT", - @"The message format of the 'user unblocked' " - @"alert. Embeds {{the blocked user's name or phone number}}."), + @"Alert body after unblocking a group or 1:1 chat. Embeds the " + @"conversation title."), [self formatDisplayNameForAlertMessage:displayName]] fromViewController:fromViewController completionBlock:completionBlock]; @@ -380,13 +381,19 @@ typedef void (^BlockAlertCompletionBlock)(UIAlertAction *action); OWSAssert(fromViewController); OWSAssert(blockingManager); - NSString *title = [NSString stringWithFormat:NSLocalizedString(@"BLOCK_LIST_UNBLOCK_GROUP_TITLE_FORMAT", - @"A format for the 'unblock group' action sheet title. Embeds " - @"{{the blocked groups's name}}."), - [self formatDisplayNameForAlertTitle:displayName]]; + NSString *title = [NSString + stringWithFormat: + NSLocalizedString(@"BLOCK_LIST_UNBLOCK_GROUP_TITLE_FORMAT", + @"Action sheet title when confirming you want to unblock a group. Embeds the {{conversation title}}."), + [self formatDisplayNameForAlertTitle:displayName]]; + + NSString *message = NSLocalizedString( + @"BLOCK_LIST_UNBLOCK_GROUP_BODY", @"Action sheet body when confirming you want to unblock a group"); UIAlertController *actionSheetController = - [UIAlertController alertControllerWithTitle:title message:nil preferredStyle:UIAlertControllerStyleActionSheet]; + [UIAlertController alertControllerWithTitle:title + message:message + preferredStyle:UIAlertControllerStyleActionSheet]; UIAlertAction *unblockAction = [UIAlertAction actionWithTitle:NSLocalizedString(@"BLOCK_LIST_UNBLOCK_BUTTON", @"Button label for the 'unblock' button") @@ -428,13 +435,13 @@ typedef void (^BlockAlertCompletionBlock)(UIAlertAction *action); [blockingManager removeBlockedGroupId:groupModel.groupId]; - [self showOkAlertWithTitle:NSLocalizedString(@"BLOCK_LIST_VIEW_UNBLOCKED_USER_ALERT_TITLE", - @"The title of the 'group unblocked' alert.") - message:[NSString stringWithFormat:NSLocalizedString( - @"BLOCK_LIST_VIEW_UNBLOCKED_USER_ALERT_MESSAGE_FORMAT", - @"The message format of the 'group unblocked' " - @"alert. Embeds {{the blocked group's name}}."), - [self formatDisplayNameForAlertMessage:displayName]] + [self showOkAlertWithTitle:NSLocalizedString(@"BLOCK_LIST_VIEW_UNBLOCKED_ALERT_TITLE", + @"Alert title after unblocking a group or 1:1 chat.") + message:[NSString + stringWithFormat:NSLocalizedString(@"BLOCK_LIST_VIEW_UNBLOCKED_ALERT_MESSAGE_FORMAT", + @"Alert body after unblocking a group or 1:1 chat. Embeds the " + @"conversation title."), + [self formatDisplayNameForAlertMessage:displayName]] fromViewController:fromViewController completionBlock:completionBlock]; }