WIP: Localizations

pull/1/head
Michael Kirk 7 years ago
parent b1da5e93d9
commit c6de8c579c

@ -61,7 +61,7 @@ NS_ASSUME_NONNULL_BEGIN
OWSTableSection *addSection = [OWSTableSection new]; OWSTableSection *addSection = [OWSTableSection new];
addSection.footerTitle = NSLocalizedString( 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 [addSection
addItem:[OWSTableItem addItem:[OWSTableItem

@ -622,10 +622,10 @@ const CGFloat kIconViewLength = 24;
OWSTableSection *section = [OWSTableSection new]; OWSTableSection *section = [OWSTableSection new];
if (self.thread.isGroupThread) { if (self.thread.isGroupThread) {
section.footerTitle = NSLocalizedString( 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 { } else {
section.footerTitle = NSLocalizedString( 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 [section addItem:[OWSTableItem

@ -224,22 +224,28 @@
/* Indicates that the backup import data is being restored. */ /* Indicates that the backup import data is being restored. */
"BACKUP_IMPORT_PHASE_RESTORING_FILES" = "Restoring Files"; "BACKUP_IMPORT_PHASE_RESTORING_FILES" = "Restoring Files";
/* An explanation of the consequences of blocking another user. */ /* An explanation of the consequences of blocking a group. */
"BLOCK_BEHAVIOR_EXPLANATION" = "Blocked users will not be able to call you or send you messages."; "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.";
/* An explanation of the consequences of blocking another user. */
"BLOCK_GROUP_BEHAVIOR_EXPLANATION" = "BLOCK_GROUP_BEHAVIOR_EXPLANATION";
/* Button label for the 'block' button */ /* Button label for the 'block' button */
"BLOCK_LIST_BLOCK_BUTTON" = "Block"; "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}}. */ /* 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 */ /* Button label for the 'unblock' button */
"BLOCK_LIST_UNBLOCK_BUTTON" = "Unblock"; "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 %@?"; "BLOCK_LIST_UNBLOCK_TITLE_FORMAT" = "Unblock %@?";
/* A label for the block button in the block list view */ /* A label for the block button in the block list view */
@ -251,12 +257,15 @@
/* The title of the 'block user failed' alert. */ /* The title of the 'block user failed' alert. */
"BLOCK_LIST_VIEW_BLOCK_FAILED_ALERT_TITLE" = "Error"; "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"; "BLOCK_LIST_VIEW_BLOCKED_ALERT_MESSAGE_FORMAT" = "%@ has been blocked";
/* The title of the 'user blocked' alert. */ /* The title of the 'user blocked' alert. */
"BLOCK_LIST_VIEW_BLOCKED_ALERT_TITLE" = "User Blocked"; "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. */ /* The message of the 'You can't block yourself' alert. */
"BLOCK_LIST_VIEW_CANT_BLOCK_SELF_ALERT_MESSAGE" = "You can't block yourself."; "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. */ /* The title of the 'unblock user failed' alert. */
"BLOCK_LIST_VIEW_UNBLOCK_FAILED_ALERT_TITLE" = "Error"; "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."; "BLOCK_LIST_VIEW_UNBLOCKED_ALERT_MESSAGE_FORMAT" = "%@ has been unblocked.";
/* The title of the 'user unblocked' alert. */ /* Alert title after unblocking a group or 1:1 chat. */
"BLOCK_LIST_VIEW_UNBLOCKED_ALERT_TITLE" = "User Unblocked"; "BLOCK_LIST_VIEW_UNBLOCKED_ALERT_TITLE" = "Unblocked";
/* Action sheet that will block an unknown user. */ /* Action sheet that will block an unknown user. */
"BLOCK_OFFER_ACTIONSHEET_BLOCK_ACTION" = "Block"; "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}}. */ /* 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 %@?"; "BLOCK_OFFER_ACTIONSHEET_TITLE_FORMAT" = "Block %@?";
/* An explanation of the consequences of blocking a group. */ /* An explanation of the consequences of blocking another user. */
"BLOCK_USER_BEHAVIOR_EXPLANATION" = "BLOCK_USER_BEHAVIOR_EXPLANATION"; "BLOCK_USER_BEHAVIOR_EXPLANATION" = "Blocked users will not be able to call you or send you messages.";
/* Label for 'continue' button. */ /* Label for 'continue' button. */
"BUTTON_CONTINUE" = "Continue"; "BUTTON_CONTINUE" = "Continue";
@ -519,7 +528,7 @@
"CONVERSATION_SETTINGS_ADD_TO_EXISTING_CONTACT" = "Add to Existing Contact"; "CONVERSATION_SETTINGS_ADD_TO_EXISTING_CONTACT" = "Add to Existing Contact";
/* table cell label in conversation settings */ /* 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 */ /* table cell label in conversation settings */
"CONVERSATION_SETTINGS_BLOCK_THIS_USER" = "Block this user"; "CONVERSATION_SETTINGS_BLOCK_THIS_USER" = "Block this user";
@ -1275,6 +1284,9 @@
/* Indicates that a single member of this group has been blocked. */ /* Indicates that a single member of this group has been blocked. */
"MESSAGES_VIEW_GROUP_1_MEMBER_BLOCKED" = "You Blocked 1 Member of this Group"; "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}}. */ /* 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"; "MESSAGES_VIEW_GROUP_N_MEMBERS_BLOCKED_FORMAT" = "You Blocked %@ Members of this Group";

@ -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 " @"A format for the 'block user' action sheet title. Embeds {{the "
@"blocked user's name or phone number}}."), @"blocked user's name or phone number}}."),
[self formatDisplayNameForAlertTitle:displayName]]; [self formatDisplayNameForAlertTitle:displayName]];
UIAlertController *actionSheetController = UIAlertController *actionSheetController =
[UIAlertController alertControllerWithTitle:title [UIAlertController alertControllerWithTitle:title
message:NSLocalizedString(@"BLOCK_BEHAVIOR_EXPLANATION", message:NSLocalizedString(@"BLOCK_USER_BEHAVIOR_EXPLANATION",
@"An explanation of the consequences of blocking another user.") @"An explanation of the consequences of blocking another user.")
preferredStyle:UIAlertControllerStyleActionSheet]; preferredStyle:UIAlertControllerStyleActionSheet];
@ -152,10 +152,10 @@ typedef void (^BlockAlertCompletionBlock)(UIAlertAction *action);
OWSAssert(fromViewController); OWSAssert(fromViewController);
OWSAssert(blockingManager); OWSAssert(blockingManager);
NSString *title = [NSString stringWithFormat:NSLocalizedString(@"BLOCK_LIST_BLOCK_GROUP_TITLE_FORMAT", NSString *title = [NSString
@"A format for the 'block group' action sheet title. Embeds {{the " stringWithFormat:NSLocalizedString(@"BLOCK_LIST_BLOCK_GROUP_TITLE_FORMAT",
@"blocked group's name}}."), @"A format for the 'block group' action sheet title. Embeds the {{group name}}."),
[self formatDisplayNameForAlertTitle:displayName]]; [self formatDisplayNameForAlertTitle:displayName]];
UIAlertController *actionSheetController = UIAlertController *actionSheetController =
[UIAlertController alertControllerWithTitle:title [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.") @"BLOCK_LIST_VIEW_BLOCKED_ALERT_TITLE", @"The title of the 'user blocked' alert.")
message:[NSString message:[NSString
stringWithFormat:NSLocalizedString(@"BLOCK_LIST_VIEW_BLOCKED_ALERT_MESSAGE_FORMAT", stringWithFormat:NSLocalizedString(@"BLOCK_LIST_VIEW_BLOCKED_ALERT_MESSAGE_FORMAT",
@"The message format of the 'user blocked' " @"The message format of the 'conversation blocked' alert. "
@"alert. Embeds {{the blocked user's name or phone number}}."), @"Embeds the {{conversation title}}."),
[self formatDisplayNameForAlertMessage:displayName]] [self formatDisplayNameForAlertMessage:displayName]]
fromViewController:fromViewController fromViewController:fromViewController
completionBlock:completionBlock]; completionBlock:completionBlock];
@ -234,8 +234,8 @@ typedef void (^BlockAlertCompletionBlock)(UIAlertAction *action);
@"The title of the 'group blocked' alert.") @"The title of the 'group blocked' alert.")
message:[NSString message:[NSString
stringWithFormat:NSLocalizedString(@"BLOCK_LIST_VIEW_BLOCKED_ALERT_MESSAGE_FORMAT", stringWithFormat:NSLocalizedString(@"BLOCK_LIST_VIEW_BLOCKED_ALERT_MESSAGE_FORMAT",
@"The message format of the 'user blocked' " @"The message format of the 'conversation blocked' alert. "
@"alert. Embeds {{the blocked group's name}}."), @"Embeds the {{conversation title}}."),
[self formatDisplayNameForAlertMessage:displayName]] [self formatDisplayNameForAlertMessage:displayName]]
fromViewController:fromViewController fromViewController:fromViewController
completionBlock:completionBlock]; completionBlock:completionBlock];
@ -307,10 +307,11 @@ typedef void (^BlockAlertCompletionBlock)(UIAlertAction *action);
OWSAssert(fromViewController); OWSAssert(fromViewController);
OWSAssert(blockingManager); OWSAssert(blockingManager);
NSString *title = [NSString stringWithFormat:NSLocalizedString(@"BLOCK_LIST_UNBLOCK_TITLE_FORMAT", NSString *title = [NSString
@"A format for the 'unblock user' action sheet title. Embeds " stringWithFormat:
@"{{the blocked user's name or phone number}}."), NSLocalizedString(@"BLOCK_LIST_UNBLOCK_TITLE_FORMAT",
[self formatDisplayNameForAlertTitle:displayName]]; @"A format for the 'unblock conversation' action sheet title. Embeds the {{conversation title}}."),
[self formatDisplayNameForAlertTitle:displayName]];
UIAlertController *actionSheetController = UIAlertController *actionSheetController =
[UIAlertController alertControllerWithTitle:title message:nil preferredStyle:UIAlertControllerStyleActionSheet]; [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", [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 message:[NSString
stringWithFormat:NSLocalizedString(@"BLOCK_LIST_VIEW_UNBLOCKED_ALERT_MESSAGE_FORMAT", stringWithFormat:NSLocalizedString(@"BLOCK_LIST_VIEW_UNBLOCKED_ALERT_MESSAGE_FORMAT",
@"The message format of the 'user unblocked' " @"Alert body after unblocking a group or 1:1 chat. Embeds the "
@"alert. Embeds {{the blocked user's name or phone number}}."), @"conversation title."),
[self formatDisplayNameForAlertMessage:displayName]] [self formatDisplayNameForAlertMessage:displayName]]
fromViewController:fromViewController fromViewController:fromViewController
completionBlock:completionBlock]; completionBlock:completionBlock];
@ -380,13 +381,19 @@ typedef void (^BlockAlertCompletionBlock)(UIAlertAction *action);
OWSAssert(fromViewController); OWSAssert(fromViewController);
OWSAssert(blockingManager); OWSAssert(blockingManager);
NSString *title = [NSString stringWithFormat:NSLocalizedString(@"BLOCK_LIST_UNBLOCK_GROUP_TITLE_FORMAT", NSString *title = [NSString
@"A format for the 'unblock group' action sheet title. Embeds " stringWithFormat:
@"{{the blocked groups's name}}."), NSLocalizedString(@"BLOCK_LIST_UNBLOCK_GROUP_TITLE_FORMAT",
[self formatDisplayNameForAlertTitle:displayName]]; @"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 *actionSheetController =
[UIAlertController alertControllerWithTitle:title message:nil preferredStyle:UIAlertControllerStyleActionSheet]; [UIAlertController alertControllerWithTitle:title
message:message
preferredStyle:UIAlertControllerStyleActionSheet];
UIAlertAction *unblockAction = [UIAlertAction UIAlertAction *unblockAction = [UIAlertAction
actionWithTitle:NSLocalizedString(@"BLOCK_LIST_UNBLOCK_BUTTON", @"Button label for the 'unblock' button") 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]; [blockingManager removeBlockedGroupId:groupModel.groupId];
[self showOkAlertWithTitle:NSLocalizedString(@"BLOCK_LIST_VIEW_UNBLOCKED_USER_ALERT_TITLE", [self showOkAlertWithTitle:NSLocalizedString(@"BLOCK_LIST_VIEW_UNBLOCKED_ALERT_TITLE",
@"The title of the 'group unblocked' alert.") @"Alert title after unblocking a group or 1:1 chat.")
message:[NSString stringWithFormat:NSLocalizedString( message:[NSString
@"BLOCK_LIST_VIEW_UNBLOCKED_USER_ALERT_MESSAGE_FORMAT", stringWithFormat:NSLocalizedString(@"BLOCK_LIST_VIEW_UNBLOCKED_ALERT_MESSAGE_FORMAT",
@"The message format of the 'group unblocked' " @"Alert body after unblocking a group or 1:1 chat. Embeds the "
@"alert. Embeds {{the blocked group's name}}."), @"conversation title."),
[self formatDisplayNameForAlertMessage:displayName]] [self formatDisplayNameForAlertMessage:displayName]]
fromViewController:fromViewController fromViewController:fromViewController
completionBlock:completionBlock]; completionBlock:completionBlock];
} }

Loading…
Cancel
Save