Remove MatrixKitL10n from SwiftGen

Uses VectorL10n everywhere.
This commit is contained in:
Doug
2022-03-03 09:32:19 +00:00
parent 18bd0b861d
commit 86c2b4ebb5
97 changed files with 2492 additions and 2605 deletions
@@ -53,7 +53,7 @@
UIAlertController *alert = [UIAlertController alertControllerWithTitle:title message:message preferredStyle:UIAlertControllerStyleAlert];
[alert addAction:[UIAlertAction actionWithTitle:[MatrixKitL10n ok]
[alert addAction:[UIAlertAction actionWithTitle:[VectorL10n ok]
style:UIAlertActionStyleDefault
handler:^(UIAlertAction * _Nonnull action) {
if (handler)
@@ -36,12 +36,12 @@
if (!title)
{
title = [MatrixKitL10n error];
title = [VectorL10n error];
}
if (!message)
{
message = [MatrixKitL10n errorCommonMessage];
message = [VectorL10n errorCommonMessage];
}
return [[MXKErrorViewModel alloc] initWithTitle:title message:message];
@@ -49,8 +49,8 @@
- (id <MXKErrorPresentable>)commonErrorPresentable
{
return [[MXKErrorViewModel alloc] initWithTitle:[MatrixKitL10n error]
message:[MatrixKitL10n errorCommonMessage]];
return [[MXKErrorViewModel alloc] initWithTitle:[VectorL10n error]
message:[VectorL10n errorCommonMessage]];
}
@end
@@ -345,27 +345,27 @@ static NSString *const kHTMLATagRegexPattern = @"<a href=\"(.*?)\">([^<]*)</a>";
{
if ([redactorId isEqualToString:mxSession.myUserId])
{
redactedBy = [NSString stringWithFormat:@"%@%@", [MatrixKitL10n noticeEventRedactedByYou], [MatrixKitL10n noticeEventRedactedReason:redactedReason]];
redactedBy = [NSString stringWithFormat:@"%@%@", [VectorL10n noticeEventRedactedByYou], [VectorL10n noticeEventRedactedReason:redactedReason]];
}
else if (redactedBy.length)
{
redactedBy = [NSString stringWithFormat:@"%@%@", [MatrixKitL10n noticeEventRedactedBy:redactedBy], [MatrixKitL10n noticeEventRedactedReason:redactedReason]];
redactedBy = [NSString stringWithFormat:@"%@%@", [VectorL10n noticeEventRedactedBy:redactedBy], [VectorL10n noticeEventRedactedReason:redactedReason]];
}
else
{
redactedBy = [MatrixKitL10n noticeEventRedactedReason:redactedReason];
redactedBy = [VectorL10n noticeEventRedactedReason:redactedReason];
}
}
else if ([redactorId isEqualToString:mxSession.myUserId])
{
redactedBy = [MatrixKitL10n noticeEventRedactedByYou];
redactedBy = [VectorL10n noticeEventRedactedByYou];
}
else if (redactedBy.length)
{
redactedBy = [MatrixKitL10n noticeEventRedactedBy:redactedBy];
redactedBy = [VectorL10n noticeEventRedactedBy:redactedBy];
}
redactedInfo = [MatrixKitL10n noticeEventRedacted:redactedBy];
redactedInfo = [VectorL10n noticeEventRedacted:redactedBy];
}
}
@@ -401,22 +401,22 @@ static NSString *const kHTMLATagRegexPattern = @"<a href=\"(.*?)\">([^<]*)</a>";
{
if (isRoomDirect)
{
displayText = [MatrixKitL10n noticeRoomNameChangedByYouForDm:roomName];
displayText = [VectorL10n noticeRoomNameChangedByYouForDm:roomName];
}
else
{
displayText = [MatrixKitL10n noticeRoomNameChangedByYou:roomName];
displayText = [VectorL10n noticeRoomNameChangedByYou:roomName];
}
}
else
{
if (isRoomDirect)
{
displayText = [MatrixKitL10n noticeRoomNameChangedForDm:senderDisplayName :roomName];
displayText = [VectorL10n noticeRoomNameChangedForDm:senderDisplayName :roomName];
}
else
{
displayText = [MatrixKitL10n noticeRoomNameChanged:senderDisplayName :roomName];
displayText = [VectorL10n noticeRoomNameChanged:senderDisplayName :roomName];
}
}
}
@@ -426,22 +426,22 @@ static NSString *const kHTMLATagRegexPattern = @"<a href=\"(.*?)\">([^<]*)</a>";
{
if (isRoomDirect)
{
displayText = [MatrixKitL10n noticeRoomNameRemovedByYouForDm];
displayText = [VectorL10n noticeRoomNameRemovedByYouForDm];
}
else
{
displayText = [MatrixKitL10n noticeRoomNameRemovedByYou];
displayText = [VectorL10n noticeRoomNameRemovedByYou];
}
}
else
{
if (isRoomDirect)
{
displayText = [MatrixKitL10n noticeRoomNameRemovedForDm:senderDisplayName];
displayText = [VectorL10n noticeRoomNameRemovedForDm:senderDisplayName];
}
else
{
displayText = [MatrixKitL10n noticeRoomNameRemoved:senderDisplayName];
displayText = [VectorL10n noticeRoomNameRemoved:senderDisplayName];
}
}
}
@@ -466,22 +466,22 @@ static NSString *const kHTMLATagRegexPattern = @"<a href=\"(.*?)\">([^<]*)</a>";
{
if (isEventSenderMyUser)
{
displayText = [MatrixKitL10n noticeTopicChangedByYou:roomTopic];
displayText = [VectorL10n noticeTopicChangedByYou:roomTopic];
}
else
{
displayText = [MatrixKitL10n noticeTopicChanged:senderDisplayName :roomTopic];
displayText = [VectorL10n noticeTopicChanged:senderDisplayName :roomTopic];
}
}
else
{
if (isEventSenderMyUser)
{
displayText = [MatrixKitL10n noticeRoomTopicRemovedByYou];
displayText = [VectorL10n noticeRoomTopicRemovedByYou];
}
else
{
displayText = [MatrixKitL10n noticeRoomTopicRemoved:senderDisplayName];
displayText = [VectorL10n noticeRoomTopicRemoved:senderDisplayName];
}
}
@@ -504,11 +504,11 @@ static NSString *const kHTMLATagRegexPattern = @"<a href=\"(.*?)\">([^<]*)</a>";
}
if (isEventSenderMyUser)
{
displayText = [MatrixKitL10n noticeProfileChangeRedactedByYou:redactedInfo];
displayText = [VectorL10n noticeProfileChangeRedactedByYou:redactedInfo];
}
else
{
displayText = [MatrixKitL10n noticeProfileChangeRedacted:senderDisplayName :redactedInfo];
displayText = [VectorL10n noticeProfileChangeRedacted:senderDisplayName :redactedInfo];
}
}
else
@@ -533,33 +533,33 @@ static NSString *const kHTMLATagRegexPattern = @"<a href=\"(.*?)\">([^<]*)</a>";
{
if (isEventSenderMyUser)
{
displayText = [MatrixKitL10n noticeDisplayNameSetByYou:displayname];
displayText = [VectorL10n noticeDisplayNameSetByYou:displayname];
}
else
{
displayText = [MatrixKitL10n noticeDisplayNameSet:event.sender :displayname];
displayText = [VectorL10n noticeDisplayNameSet:event.sender :displayname];
}
}
else if (!displayname)
{
if (isEventSenderMyUser)
{
displayText = [MatrixKitL10n noticeDisplayNameRemovedByYou];
displayText = [VectorL10n noticeDisplayNameRemovedByYou];
}
else
{
displayText = [MatrixKitL10n noticeDisplayNameRemoved:event.sender];
displayText = [VectorL10n noticeDisplayNameRemoved:event.sender];
}
}
else
{
if (isEventSenderMyUser)
{
displayText = [MatrixKitL10n noticeDisplayNameChangedFromByYou:prevDisplayname :displayname];
displayText = [VectorL10n noticeDisplayNameChangedFromByYou:prevDisplayname :displayname];
}
else
{
displayText = [MatrixKitL10n noticeDisplayNameChangedFrom:event.sender :prevDisplayname :displayname];
displayText = [VectorL10n noticeDisplayNameChangedFrom:event.sender :prevDisplayname :displayname];
}
}
}
@@ -582,17 +582,17 @@ static NSString *const kHTMLATagRegexPattern = @"<a href=\"(.*?)\">([^<]*)</a>";
{
if (displayText)
{
displayText = [NSString stringWithFormat:@"%@ %@", displayText, [MatrixKitL10n noticeAvatarChangedToo]];
displayText = [NSString stringWithFormat:@"%@ %@", displayText, [VectorL10n noticeAvatarChangedToo]];
}
else
{
if (isEventSenderMyUser)
{
displayText = [MatrixKitL10n noticeAvatarUrlChangedByYou];
displayText = [VectorL10n noticeAvatarUrlChangedByYou];
}
else
{
displayText = [MatrixKitL10n noticeAvatarUrlChanged:senderDisplayName];
displayText = [VectorL10n noticeAvatarUrlChanged:senderDisplayName];
}
}
}
@@ -620,11 +620,11 @@ static NSString *const kHTMLATagRegexPattern = @"<a href=\"(.*?)\">([^<]*)</a>";
{
if ([event.stateKey isEqualToString:mxSession.myUserId])
{
displayText = [MatrixKitL10n noticeRoomThirdPartyRegisteredInviteByYou:event.content[@"third_party_invite"][@"display_name"]];
displayText = [VectorL10n noticeRoomThirdPartyRegisteredInviteByYou:event.content[@"third_party_invite"][@"display_name"]];
}
else
{
displayText = [MatrixKitL10n noticeRoomThirdPartyRegisteredInvite:targetDisplayName :event.content[@"third_party_invite"][@"display_name"]];
displayText = [VectorL10n noticeRoomThirdPartyRegisteredInvite:targetDisplayName :event.content[@"third_party_invite"][@"display_name"]];
}
}
else
@@ -633,11 +633,11 @@ static NSString *const kHTMLATagRegexPattern = @"<a href=\"(.*?)\">([^<]*)</a>";
{
if (isEventSenderMyUser)
{
displayText = [MatrixKitL10n noticeConferenceCallRequestByYou];
displayText = [VectorL10n noticeConferenceCallRequestByYou];
}
else
{
displayText = [MatrixKitL10n noticeConferenceCallRequest:senderDisplayName];
displayText = [VectorL10n noticeConferenceCallRequest:senderDisplayName];
}
}
else
@@ -645,11 +645,11 @@ static NSString *const kHTMLATagRegexPattern = @"<a href=\"(.*?)\">([^<]*)</a>";
// The targeted member display name (if any) is available in content
if (isEventSenderMyUser)
{
displayText = [MatrixKitL10n noticeRoomInviteByYou:targetDisplayName];
displayText = [VectorL10n noticeRoomInviteByYou:targetDisplayName];
}
else if ([targetDisplayName isEqualToString:mxSession.myUserId])
{
displayText = [MatrixKitL10n noticeRoomInviteYou:senderDisplayName];
displayText = [VectorL10n noticeRoomInviteYou:senderDisplayName];
}
else
{
@@ -658,7 +658,7 @@ static NSString *const kHTMLATagRegexPattern = @"<a href=\"(.*?)\">([^<]*)</a>";
targetDisplayName = contentDisplayname;
}
displayText = [MatrixKitL10n noticeRoomInvite:senderDisplayName :targetDisplayName];
displayText = [VectorL10n noticeRoomInvite:senderDisplayName :targetDisplayName];
}
}
}
@@ -667,14 +667,14 @@ static NSString *const kHTMLATagRegexPattern = @"<a href=\"(.*?)\">([^<]*)</a>";
{
if ([MXCallManager isConferenceUser:event.stateKey])
{
displayText = [MatrixKitL10n noticeConferenceCallStarted];
displayText = [VectorL10n noticeConferenceCallStarted];
}
else
{
// The targeted member display name (if any) is available in content
if (isEventSenderMyUser)
{
displayText = [MatrixKitL10n noticeRoomJoinByYou];
displayText = [VectorL10n noticeRoomJoinByYou];
}
else
{
@@ -683,7 +683,7 @@ static NSString *const kHTMLATagRegexPattern = @"<a href=\"(.*?)\">([^<]*)</a>";
targetDisplayName = contentDisplayname;
}
displayText = [MatrixKitL10n noticeRoomJoin:targetDisplayName];
displayText = [VectorL10n noticeRoomJoin:targetDisplayName];
}
}
}
@@ -705,7 +705,7 @@ static NSString *const kHTMLATagRegexPattern = @"<a href=\"(.*?)\">([^<]*)</a>";
{
if ([MXCallManager isConferenceUser:event.stateKey])
{
displayText = [MatrixKitL10n noticeConferenceCallFinished];
displayText = [VectorL10n noticeConferenceCallFinished];
}
else
{
@@ -713,22 +713,22 @@ static NSString *const kHTMLATagRegexPattern = @"<a href=\"(.*?)\">([^<]*)</a>";
{
if (isEventSenderMyUser)
{
displayText = [MatrixKitL10n noticeRoomRejectByYou];
displayText = [VectorL10n noticeRoomRejectByYou];
}
else
{
displayText = [MatrixKitL10n noticeRoomReject:targetDisplayName];
displayText = [VectorL10n noticeRoomReject:targetDisplayName];
}
}
else
{
if (isEventSenderMyUser)
{
displayText = [MatrixKitL10n noticeRoomLeaveByYou];
displayText = [VectorL10n noticeRoomLeaveByYou];
}
else
{
displayText = [MatrixKitL10n noticeRoomLeave:targetDisplayName];
displayText = [VectorL10n noticeRoomLeave:targetDisplayName];
}
}
}
@@ -739,15 +739,15 @@ static NSString *const kHTMLATagRegexPattern = @"<a href=\"(.*?)\">([^<]*)</a>";
{
if (isEventSenderMyUser)
{
displayText = [MatrixKitL10n noticeRoomWithdrawByYou:targetDisplayName];
displayText = [VectorL10n noticeRoomWithdrawByYou:targetDisplayName];
}
else
{
displayText = [MatrixKitL10n noticeRoomWithdraw:senderDisplayName :targetDisplayName];
displayText = [VectorL10n noticeRoomWithdraw:senderDisplayName :targetDisplayName];
}
if (event.content[@"reason"])
{
displayText = [displayText stringByAppendingString:[MatrixKitL10n noticeRoomReason:event.content[@"reason"]]];
displayText = [displayText stringByAppendingString:[VectorL10n noticeRoomReason:event.content[@"reason"]]];
}
}
@@ -755,28 +755,28 @@ static NSString *const kHTMLATagRegexPattern = @"<a href=\"(.*?)\">([^<]*)</a>";
{
if (isEventSenderMyUser)
{
displayText = [MatrixKitL10n noticeRoomKickByYou:targetDisplayName];
displayText = [VectorL10n noticeRoomKickByYou:targetDisplayName];
}
else
{
displayText = [MatrixKitL10n noticeRoomKick:senderDisplayName :targetDisplayName];
displayText = [VectorL10n noticeRoomKick:senderDisplayName :targetDisplayName];
}
// add reason if exists
if (event.content[@"reason"])
{
displayText = [displayText stringByAppendingString:[MatrixKitL10n noticeRoomReason:event.content[@"reason"]]];
displayText = [displayText stringByAppendingString:[VectorL10n noticeRoomReason:event.content[@"reason"]]];
}
}
else if ([prevMembership isEqualToString:@"ban"])
{
if (isEventSenderMyUser)
{
displayText = [MatrixKitL10n noticeRoomUnbanByYou:targetDisplayName];
displayText = [VectorL10n noticeRoomUnbanByYou:targetDisplayName];
}
else
{
displayText = [MatrixKitL10n noticeRoomUnban:senderDisplayName :targetDisplayName];
displayText = [VectorL10n noticeRoomUnban:senderDisplayName :targetDisplayName];
}
}
}
@@ -791,15 +791,15 @@ static NSString *const kHTMLATagRegexPattern = @"<a href=\"(.*?)\">([^<]*)</a>";
if (isEventSenderMyUser)
{
displayText = [MatrixKitL10n noticeRoomBanByYou:targetDisplayName];
displayText = [VectorL10n noticeRoomBanByYou:targetDisplayName];
}
else
{
displayText = [MatrixKitL10n noticeRoomBan:senderDisplayName :targetDisplayName];
displayText = [VectorL10n noticeRoomBan:senderDisplayName :targetDisplayName];
}
if (event.content[@"reason"])
{
displayText = [displayText stringByAppendingString:[MatrixKitL10n noticeRoomReason:event.content[@"reason"]]];
displayText = [displayText stringByAppendingString:[VectorL10n noticeRoomReason:event.content[@"reason"]]];
}
}
@@ -827,22 +827,22 @@ static NSString *const kHTMLATagRegexPattern = @"<a href=\"(.*?)\">([^<]*)</a>";
{
if (isRoomDirect)
{
displayText = [MatrixKitL10n noticeRoomCreatedByYouForDm];
displayText = [VectorL10n noticeRoomCreatedByYouForDm];
}
else
{
displayText = [MatrixKitL10n noticeRoomCreatedByYou];
displayText = [VectorL10n noticeRoomCreatedByYou];
}
}
else
{
if (isRoomDirect)
{
displayText = [MatrixKitL10n noticeRoomCreatedForDm:(roomState ? [roomState.members memberName:creatorId] : creatorId)];
displayText = [VectorL10n noticeRoomCreatedForDm:(roomState ? [roomState.members memberName:creatorId] : creatorId)];
}
else
{
displayText = [MatrixKitL10n noticeRoomCreated:(roomState ? [roomState.members memberName:creatorId] : creatorId)];
displayText = [VectorL10n noticeRoomCreated:(roomState ? [roomState.members memberName:creatorId] : creatorId)];
}
}
// Append redacted info if any
@@ -866,22 +866,22 @@ static NSString *const kHTMLATagRegexPattern = @"<a href=\"(.*?)\">([^<]*)</a>";
{
if (isRoomDirect)
{
displayText = [MatrixKitL10n noticeRoomJoinRulePublicByYouForDm];
displayText = [VectorL10n noticeRoomJoinRulePublicByYouForDm];
}
else
{
displayText = [MatrixKitL10n noticeRoomJoinRulePublicByYou];
displayText = [VectorL10n noticeRoomJoinRulePublicByYou];
}
}
else if ([joinRule isEqualToString:kMXRoomJoinRuleInvite])
{
if (isRoomDirect)
{
displayText = [MatrixKitL10n noticeRoomJoinRuleInviteByYouForDm];
displayText = [VectorL10n noticeRoomJoinRuleInviteByYouForDm];
}
else
{
displayText = [MatrixKitL10n noticeRoomJoinRuleInviteByYou];
displayText = [VectorL10n noticeRoomJoinRuleInviteByYou];
}
}
}
@@ -892,22 +892,22 @@ static NSString *const kHTMLATagRegexPattern = @"<a href=\"(.*?)\">([^<]*)</a>";
{
if (isRoomDirect)
{
displayText = [MatrixKitL10n noticeRoomJoinRulePublicForDm:displayName];
displayText = [VectorL10n noticeRoomJoinRulePublicForDm:displayName];
}
else
{
displayText = [MatrixKitL10n noticeRoomJoinRulePublic:displayName];
displayText = [VectorL10n noticeRoomJoinRulePublic:displayName];
}
}
else if ([joinRule isEqualToString:kMXRoomJoinRuleInvite])
{
if (isRoomDirect)
{
displayText = [MatrixKitL10n noticeRoomJoinRuleInviteForDm:displayName];
displayText = [VectorL10n noticeRoomJoinRuleInviteForDm:displayName];
}
else
{
displayText = [MatrixKitL10n noticeRoomJoinRuleInvite:displayName];
displayText = [VectorL10n noticeRoomJoinRuleInvite:displayName];
}
}
}
@@ -915,7 +915,7 @@ static NSString *const kHTMLATagRegexPattern = @"<a href=\"(.*?)\">([^<]*)</a>";
if (!displayText)
{
// use old string for non-handled cases: "knock" and "private"
displayText = [MatrixKitL10n noticeRoomJoinRule:joinRule];
displayText = [VectorL10n noticeRoomJoinRule:joinRule];
}
// Append redacted info if any
@@ -930,11 +930,11 @@ static NSString *const kHTMLATagRegexPattern = @"<a href=\"(.*?)\">([^<]*)</a>";
{
if (isRoomDirect)
{
displayText = [MatrixKitL10n noticeRoomPowerLevelIntroForDm];
displayText = [VectorL10n noticeRoomPowerLevelIntroForDm];
}
else
{
displayText = [MatrixKitL10n noticeRoomPowerLevelIntro];
displayText = [VectorL10n noticeRoomPowerLevelIntro];
}
NSDictionary *users;
MXJSONModelSetDictionary(users, event.content[@"users"]);
@@ -945,10 +945,10 @@ static NSString *const kHTMLATagRegexPattern = @"<a href=\"(.*?)\">([^<]*)</a>";
}
if (event.content[@"users_default"])
{
displayText = [NSString stringWithFormat:@"%@\n\u2022 %@: %@", displayText, [MatrixKitL10n default], event.content[@"users_default"]];
displayText = [NSString stringWithFormat:@"%@\n\u2022 %@: %@", displayText, [VectorL10n default], event.content[@"users_default"]];
}
displayText = [NSString stringWithFormat:@"%@\n%@", displayText, [MatrixKitL10n noticeRoomPowerLevelActingRequirement]];
displayText = [NSString stringWithFormat:@"%@\n%@", displayText, [VectorL10n noticeRoomPowerLevelActingRequirement]];
if (event.content[@"ban"])
{
displayText = [NSString stringWithFormat:@"%@\n\u2022 ban: %@", displayText, event.content[@"ban"]];
@@ -966,7 +966,7 @@ static NSString *const kHTMLATagRegexPattern = @"<a href=\"(.*?)\">([^<]*)</a>";
displayText = [NSString stringWithFormat:@"%@\n\u2022 invite: %@", displayText, event.content[@"invite"]];
}
displayText = [NSString stringWithFormat:@"%@\n%@", displayText, [MatrixKitL10n noticeRoomPowerLevelEventRequirement]];
displayText = [NSString stringWithFormat:@"%@\n%@", displayText, [VectorL10n noticeRoomPowerLevelEventRequirement]];
NSDictionary *events;
MXJSONModelSetDictionary(events, event.content[@"events"]);
@@ -998,11 +998,11 @@ static NSString *const kHTMLATagRegexPattern = @"<a href=\"(.*?)\">([^<]*)</a>";
{
if (isRoomDirect)
{
displayText = [MatrixKitL10n noticeRoomAliasesForDm:[aliases componentsJoinedByString:@", "]];
displayText = [VectorL10n noticeRoomAliasesForDm:[aliases componentsJoinedByString:@", "]];
}
else
{
displayText = [MatrixKitL10n noticeRoomAliases:[aliases componentsJoinedByString:@", "]];
displayText = [VectorL10n noticeRoomAliases:[aliases componentsJoinedByString:@", "]];
}
// Append redacted info if any
if (redactedInfo)
@@ -1018,7 +1018,7 @@ static NSString *const kHTMLATagRegexPattern = @"<a href=\"(.*?)\">([^<]*)</a>";
MXJSONModelSetArray(groups, event.content[@"groups"]);
if (groups)
{
displayText = [MatrixKitL10n noticeRoomRelatedGroups:[groups componentsJoinedByString:@", "]];
displayText = [VectorL10n noticeRoomRelatedGroups:[groups componentsJoinedByString:@", "]];
// Append redacted info if any
if (redactedInfo)
{
@@ -1057,7 +1057,7 @@ static NSString *const kHTMLATagRegexPattern = @"<a href=\"(.*?)\">([^<]*)</a>";
&& event.decryptionError.code == MXDecryptingErrorUnknownInboundSessionIdCode)
{
// Make the unknown inbound session id error description more user friendly
errorDescription = [MatrixKitL10n noticeCryptoErrorUnknownInboundSessionId];
errorDescription = [VectorL10n noticeCryptoErrorUnknownInboundSessionId];
}
else if ([event.decryptionError.domain isEqualToString:MXDecryptingErrorDomain]
&& event.decryptionError.code == MXDecryptingErrorDuplicateMessageIndexCode)
@@ -1073,12 +1073,12 @@ static NSString *const kHTMLATagRegexPattern = @"<a href=\"(.*?)\">([^<]*)</a>";
if (errorDescription)
{
displayText = [MatrixKitL10n noticeCryptoUnableToDecrypt:errorDescription];
displayText = [VectorL10n noticeCryptoUnableToDecrypt:errorDescription];
}
}
else
{
displayText = [MatrixKitL10n noticeEncryptedMessage];
displayText = [VectorL10n noticeEncryptedMessage];
}
}
@@ -1103,22 +1103,22 @@ static NSString *const kHTMLATagRegexPattern = @"<a href=\"(.*?)\">([^<]*)</a>";
{
if (isEventSenderMyUser)
{
displayText = [MatrixKitL10n noticeEncryptionEnabledOkByYou];
displayText = [VectorL10n noticeEncryptionEnabledOkByYou];
}
else
{
displayText = [MatrixKitL10n noticeEncryptionEnabledOk:senderDisplayName];
displayText = [VectorL10n noticeEncryptionEnabledOk:senderDisplayName];
}
}
else
{
if (isEventSenderMyUser)
{
displayText = [MatrixKitL10n noticeEncryptionEnabledUnknownAlgorithmByYou:algorithm];
displayText = [VectorL10n noticeEncryptionEnabledUnknownAlgorithmByYou:algorithm];
}
else
{
displayText = [MatrixKitL10n noticeEncryptionEnabledUnknownAlgorithm:senderDisplayName :algorithm];
displayText = [VectorL10n noticeEncryptionEnabledUnknownAlgorithm:senderDisplayName :algorithm];
}
}
@@ -1143,11 +1143,11 @@ static NSString *const kHTMLATagRegexPattern = @"<a href=\"(.*?)\">([^<]*)</a>";
{
if (isEventSenderMyUser)
{
displayText = [MatrixKitL10n noticeRoomHistoryVisibleToAnyoneByYou];
displayText = [VectorL10n noticeRoomHistoryVisibleToAnyoneByYou];
}
else
{
displayText = [MatrixKitL10n noticeRoomHistoryVisibleToAnyone:senderDisplayName];
displayText = [VectorL10n noticeRoomHistoryVisibleToAnyone:senderDisplayName];
}
}
}
@@ -1157,22 +1157,22 @@ static NSString *const kHTMLATagRegexPattern = @"<a href=\"(.*?)\">([^<]*)</a>";
{
if (isRoomDirect)
{
displayText = [MatrixKitL10n noticeRoomHistoryVisibleToMembersByYouForDm];
displayText = [VectorL10n noticeRoomHistoryVisibleToMembersByYouForDm];
}
else
{
displayText = [MatrixKitL10n noticeRoomHistoryVisibleToMembersByYou];
displayText = [VectorL10n noticeRoomHistoryVisibleToMembersByYou];
}
}
else
{
if (isRoomDirect)
{
displayText = [MatrixKitL10n noticeRoomHistoryVisibleToMembersForDm:senderDisplayName];
displayText = [VectorL10n noticeRoomHistoryVisibleToMembersForDm:senderDisplayName];
}
else
{
displayText = [MatrixKitL10n noticeRoomHistoryVisibleToMembers:senderDisplayName];
displayText = [VectorL10n noticeRoomHistoryVisibleToMembers:senderDisplayName];
}
}
}
@@ -1182,22 +1182,22 @@ static NSString *const kHTMLATagRegexPattern = @"<a href=\"(.*?)\">([^<]*)</a>";
{
if (isRoomDirect)
{
displayText = [MatrixKitL10n noticeRoomHistoryVisibleToMembersFromInvitedPointByYouForDm];
displayText = [VectorL10n noticeRoomHistoryVisibleToMembersFromInvitedPointByYouForDm];
}
else
{
displayText = [MatrixKitL10n noticeRoomHistoryVisibleToMembersFromInvitedPointByYou];
displayText = [VectorL10n noticeRoomHistoryVisibleToMembersFromInvitedPointByYou];
}
}
else
{
if (isRoomDirect)
{
displayText = [MatrixKitL10n noticeRoomHistoryVisibleToMembersFromInvitedPointForDm:senderDisplayName];
displayText = [VectorL10n noticeRoomHistoryVisibleToMembersFromInvitedPointForDm:senderDisplayName];
}
else
{
displayText = [MatrixKitL10n noticeRoomHistoryVisibleToMembersFromInvitedPoint:senderDisplayName];
displayText = [VectorL10n noticeRoomHistoryVisibleToMembersFromInvitedPoint:senderDisplayName];
}
}
}
@@ -1207,22 +1207,22 @@ static NSString *const kHTMLATagRegexPattern = @"<a href=\"(.*?)\">([^<]*)</a>";
{
if (isRoomDirect)
{
displayText = [MatrixKitL10n noticeRoomHistoryVisibleToMembersFromJoinedPointByYouForDm];
displayText = [VectorL10n noticeRoomHistoryVisibleToMembersFromJoinedPointByYouForDm];
}
else
{
displayText = [MatrixKitL10n noticeRoomHistoryVisibleToMembersFromJoinedPointByYou];
displayText = [VectorL10n noticeRoomHistoryVisibleToMembersFromJoinedPointByYou];
}
}
else
{
if (isRoomDirect)
{
displayText = [MatrixKitL10n noticeRoomHistoryVisibleToMembersFromJoinedPointForDm:senderDisplayName];
displayText = [VectorL10n noticeRoomHistoryVisibleToMembersFromJoinedPointForDm:senderDisplayName];
}
else
{
displayText = [MatrixKitL10n noticeRoomHistoryVisibleToMembersFromJoinedPoint:senderDisplayName];
displayText = [VectorL10n noticeRoomHistoryVisibleToMembersFromJoinedPoint:senderDisplayName];
}
}
}
@@ -1288,57 +1288,57 @@ static NSString *const kHTMLATagRegexPattern = @"<a href=\"(.*?)\">([^<]*)</a>";
{
if ([msgtype isEqualToString:kMXMessageTypeImage])
{
body = body? body : [MatrixKitL10n noticeImageAttachment];
body = body? body : [VectorL10n noticeImageAttachment];
// Check attachment validity
if (![self isSupportedAttachment:event])
{
MXLogDebug(@"[MXKEventFormatter] Warning: Unsupported attachment %@", event.description);
body = [MatrixKitL10n noticeInvalidAttachment];
body = [VectorL10n noticeInvalidAttachment];
*error = MXKEventFormatterErrorUnsupported;
}
}
else if ([msgtype isEqualToString:kMXMessageTypeAudio])
{
body = body? body : [MatrixKitL10n noticeAudioAttachment];
body = body? body : [VectorL10n noticeAudioAttachment];
if (![self isSupportedAttachment:event])
{
MXLogDebug(@"[MXKEventFormatter] Warning: Unsupported attachment %@", event.description);
if (_isForSubtitle || !_settings.showUnsupportedEventsInRoomHistory)
{
body = [MatrixKitL10n noticeInvalidAttachment];
body = [VectorL10n noticeInvalidAttachment];
}
else
{
body = [MatrixKitL10n noticeUnsupportedAttachment:event.description];
body = [VectorL10n noticeUnsupportedAttachment:event.description];
}
*error = MXKEventFormatterErrorUnsupported;
}
}
else if ([msgtype isEqualToString:kMXMessageTypeVideo])
{
body = body? body : [MatrixKitL10n noticeVideoAttachment];
body = body? body : [VectorL10n noticeVideoAttachment];
if (![self isSupportedAttachment:event])
{
MXLogDebug(@"[MXKEventFormatter] Warning: Unsupported attachment %@", event.description);
if (_isForSubtitle || !_settings.showUnsupportedEventsInRoomHistory)
{
body = [MatrixKitL10n noticeInvalidAttachment];
body = [VectorL10n noticeInvalidAttachment];
}
else
{
body = [MatrixKitL10n noticeUnsupportedAttachment:event.description];
body = [VectorL10n noticeUnsupportedAttachment:event.description];
}
*error = MXKEventFormatterErrorUnsupported;
}
}
else if ([msgtype isEqualToString:kMXMessageTypeFile])
{
body = body? body : [MatrixKitL10n noticeFileAttachment];
body = body? body : [VectorL10n noticeFileAttachment];
// Check attachment validity
if (![self isSupportedAttachment:event])
{
MXLogDebug(@"[MXKEventFormatter] Warning: Unsupported attachment %@", event.description);
body = [MatrixKitL10n noticeInvalidAttachment];
body = [VectorL10n noticeInvalidAttachment];
*error = MXKEventFormatterErrorUnsupported;
}
}
@@ -1402,7 +1402,7 @@ static NSString *const kHTMLATagRegexPattern = @"<a href=\"(.*?)\">([^<]*)</a>";
if (type && eventId)
{
displayText = [MatrixKitL10n noticeFeedback:eventId :type];
displayText = [VectorL10n noticeFeedback:eventId :type];
// Append redacted info if any
if (redactedInfo)
{
@@ -1416,11 +1416,11 @@ static NSString *const kHTMLATagRegexPattern = @"<a href=\"(.*?)\">([^<]*)</a>";
NSString *eventId = event.redacts;
if (isEventSenderMyUser)
{
displayText = [MatrixKitL10n noticeRedactionByYou:eventId];
displayText = [VectorL10n noticeRedactionByYou:eventId];
}
else
{
displayText = [MatrixKitL10n noticeRedaction:senderDisplayName :eventId];
displayText = [VectorL10n noticeRedaction:senderDisplayName :eventId];
}
break;
}
@@ -1434,22 +1434,22 @@ static NSString *const kHTMLATagRegexPattern = @"<a href=\"(.*?)\">([^<]*)</a>";
{
if (isRoomDirect)
{
displayText = [MatrixKitL10n noticeRoomThirdPartyInviteByYouForDm:displayname];
displayText = [VectorL10n noticeRoomThirdPartyInviteByYouForDm:displayname];
}
else
{
displayText = [MatrixKitL10n noticeRoomThirdPartyInviteByYou:displayname];
displayText = [VectorL10n noticeRoomThirdPartyInviteByYou:displayname];
}
}
else
{
if (isRoomDirect)
{
displayText = [MatrixKitL10n noticeRoomThirdPartyInviteForDm:senderDisplayName :displayname];
displayText = [VectorL10n noticeRoomThirdPartyInviteForDm:senderDisplayName :displayname];
}
else
{
displayText = [MatrixKitL10n noticeRoomThirdPartyInvite:senderDisplayName :displayname];
displayText = [VectorL10n noticeRoomThirdPartyInvite:senderDisplayName :displayname];
}
}
}
@@ -1461,22 +1461,22 @@ static NSString *const kHTMLATagRegexPattern = @"<a href=\"(.*?)\">([^<]*)</a>";
{
if (isRoomDirect)
{
displayText = [MatrixKitL10n noticeRoomThirdPartyRevokedInviteByYouForDm:displayname];
displayText = [VectorL10n noticeRoomThirdPartyRevokedInviteByYouForDm:displayname];
}
else
{
displayText = [MatrixKitL10n noticeRoomThirdPartyRevokedInviteByYou:displayname];
displayText = [VectorL10n noticeRoomThirdPartyRevokedInviteByYou:displayname];
}
}
else
{
if (isRoomDirect)
{
displayText = [MatrixKitL10n noticeRoomThirdPartyRevokedInviteForDm:senderDisplayName :displayname];
displayText = [VectorL10n noticeRoomThirdPartyRevokedInviteForDm:senderDisplayName :displayname];
}
else
{
displayText = [MatrixKitL10n noticeRoomThirdPartyRevokedInvite:senderDisplayName :displayname];
displayText = [VectorL10n noticeRoomThirdPartyRevokedInvite:senderDisplayName :displayname];
}
}
}
@@ -1490,22 +1490,22 @@ static NSString *const kHTMLATagRegexPattern = @"<a href=\"(.*?)\">([^<]*)</a>";
{
if (isEventSenderMyUser)
{
displayText = [MatrixKitL10n noticePlacedVideoCallByYou];
displayText = [VectorL10n noticePlacedVideoCallByYou];
}
else
{
displayText = [MatrixKitL10n noticePlacedVideoCall:senderDisplayName];
displayText = [VectorL10n noticePlacedVideoCall:senderDisplayName];
}
}
else
{
if (isEventSenderMyUser)
{
displayText = [MatrixKitL10n noticePlacedVoiceCallByYou];
displayText = [VectorL10n noticePlacedVoiceCallByYou];
}
else
{
displayText = [MatrixKitL10n noticePlacedVoiceCall:senderDisplayName];
displayText = [VectorL10n noticePlacedVoiceCall:senderDisplayName];
}
}
break;
@@ -1514,11 +1514,11 @@ static NSString *const kHTMLATagRegexPattern = @"<a href=\"(.*?)\">([^<]*)</a>";
{
if (isEventSenderMyUser)
{
displayText = [MatrixKitL10n noticeAnsweredVideoCallByYou];
displayText = [VectorL10n noticeAnsweredVideoCallByYou];
}
else
{
displayText = [MatrixKitL10n noticeAnsweredVideoCall:senderDisplayName];
displayText = [VectorL10n noticeAnsweredVideoCall:senderDisplayName];
}
break;
}
@@ -1526,11 +1526,11 @@ static NSString *const kHTMLATagRegexPattern = @"<a href=\"(.*?)\">([^<]*)</a>";
{
if (isEventSenderMyUser)
{
displayText = [MatrixKitL10n noticeEndedVideoCallByYou];
displayText = [VectorL10n noticeEndedVideoCallByYou];
}
else
{
displayText = [MatrixKitL10n noticeEndedVideoCall:senderDisplayName];
displayText = [VectorL10n noticeEndedVideoCall:senderDisplayName];
}
break;
}
@@ -1538,11 +1538,11 @@ static NSString *const kHTMLATagRegexPattern = @"<a href=\"(.*?)\">([^<]*)</a>";
{
if (isEventSenderMyUser)
{
displayText = [MatrixKitL10n noticeDeclinedVideoCallByYou];
displayText = [VectorL10n noticeDeclinedVideoCallByYou];
}
else
{
displayText = [MatrixKitL10n noticeDeclinedVideoCall:senderDisplayName];
displayText = [VectorL10n noticeDeclinedVideoCall:senderDisplayName];
}
break;
}
@@ -1567,11 +1567,11 @@ static NSString *const kHTMLATagRegexPattern = @"<a href=\"(.*?)\">([^<]*)</a>";
if (![self isSupportedAttachment:event])
{
MXLogDebug(@"[MXKEventFormatter] Warning: Unsupported sticker %@", event.description);
body = [MatrixKitL10n noticeInvalidAttachment];
body = [VectorL10n noticeInvalidAttachment];
*error = MXKEventFormatterErrorUnsupported;
}
displayText = body? body : [MatrixKitL10n noticeSticker];
displayText = body? body : [VectorL10n noticeSticker];
}
break;
}
@@ -1611,13 +1611,13 @@ static NSString *const kHTMLATagRegexPattern = @"<a href=\"(.*?)\">([^<]*)</a>";
switch (*error)
{
case MXKEventFormatterErrorUnsupported:
shortDescription = [MatrixKitL10n noticeErrorUnsupportedEvent];
shortDescription = [VectorL10n noticeErrorUnsupportedEvent];
break;
case MXKEventFormatterErrorUnexpected:
shortDescription = [MatrixKitL10n noticeErrorUnexpectedEvent];
shortDescription = [VectorL10n noticeErrorUnexpectedEvent];
break;
case MXKEventFormatterErrorUnknownEventType:
shortDescription = [MatrixKitL10n noticeErrorUnknownEventType];
shortDescription = [VectorL10n noticeErrorUnknownEventType];
break;
default:
@@ -1862,7 +1862,7 @@ static NSString *const kHTMLATagRegexPattern = @"<a href=\"(.*?)\">([^<]*)</a>";
if (inReplyToTextRange.location != NSNotFound)
{
html = [html stringByReplacingCharactersInRange:inReplyToTextRange withString:[MatrixKitL10n noticeInReplyTo]];
html = [html stringByReplacingCharactersInRange:inReplyToTextRange withString:[VectorL10n noticeInReplyTo]];
}
if (inReplyToLinkRange.location != NSNotFound)
@@ -21,22 +21,22 @@
- (NSString *)emptyRoom
{
return [MatrixKitL10n roomDisplaynameEmptyRoom];
return [VectorL10n roomDisplaynameEmptyRoom];
}
- (NSString *)twoMembers:(NSString *)firstMember second:(NSString *)secondMember
{
return [MatrixKitL10n roomDisplaynameTwoMembers:firstMember :secondMember];
return [VectorL10n roomDisplaynameTwoMembers:firstMember :secondMember];
}
- (NSString *)moreThanTwoMembers:(NSString *)firstMember count:(NSNumber *)memberCount
{
return [MatrixKitL10n roomDisplaynameMoreThanTwoMembers:firstMember :memberCount.stringValue];
return [VectorL10n roomDisplaynameMoreThanTwoMembers:firstMember :memberCount.stringValue];
}
- (NSString *)allOtherMembersLeft:(NSString *)member
{
return [MatrixKitL10n roomDisplaynameAllOtherMembersLeft:member];
return [VectorL10n roomDisplaynameAllOtherMembersLeft:member];
}
@end
+22 -22
View File
@@ -187,22 +187,22 @@ static NSRegularExpression *htmlTagsRegex;
if (secondsInterval < 1)
{
[formattedString appendFormat:@"< 1%@", [MatrixKitL10n formatTimeS]];
[formattedString appendFormat:@"< 1%@", [VectorL10n formatTimeS]];
}
else if (secondsInterval < 60)
{
[formattedString appendFormat:@"%d%@", (int)secondsInterval, [MatrixKitL10n formatTimeS]];
[formattedString appendFormat:@"%d%@", (int)secondsInterval, [VectorL10n formatTimeS]];
}
else if (secondsInterval < 3600)
{
[formattedString appendFormat:@"%d%@ %2d%@", (int)(secondsInterval/60), [MatrixKitL10n formatTimeM],
((int)secondsInterval) % 60, [MatrixKitL10n formatTimeS]];
[formattedString appendFormat:@"%d%@ %2d%@", (int)(secondsInterval/60), [VectorL10n formatTimeM],
((int)secondsInterval) % 60, [VectorL10n formatTimeS]];
}
else if (secondsInterval >= 3600)
{
[formattedString appendFormat:@"%d%@ %d%@ %d%@", (int)(secondsInterval / 3600), [MatrixKitL10n formatTimeH],
((int)(secondsInterval) % 3600) / 60, [MatrixKitL10n formatTimeM],
(int)(secondsInterval) % 60, [MatrixKitL10n formatTimeS]];
[formattedString appendFormat:@"%d%@ %d%@ %d%@", (int)(secondsInterval / 3600), [VectorL10n formatTimeH],
((int)(secondsInterval) % 3600) / 60, [VectorL10n formatTimeM],
(int)(secondsInterval) % 60, [VectorL10n formatTimeS]];
}
[formattedString appendString:@" left"];
@@ -215,26 +215,26 @@ static NSRegularExpression *htmlTagsRegex;
if (secondsInterval < 0)
{
formattedString = [NSString stringWithFormat:@"0%@", [MatrixKitL10n formatTimeS]];
formattedString = [NSString stringWithFormat:@"0%@", [VectorL10n formatTimeS]];
}
else
{
NSUInteger seconds = secondsInterval;
if (seconds < 60)
{
formattedString = [NSString stringWithFormat:@"%tu%@", seconds, [MatrixKitL10n formatTimeS]];
formattedString = [NSString stringWithFormat:@"%tu%@", seconds, [VectorL10n formatTimeS]];
}
else if (secondsInterval < 3600)
{
formattedString = [NSString stringWithFormat:@"%tu%@", seconds / 60, [MatrixKitL10n formatTimeM]];
formattedString = [NSString stringWithFormat:@"%tu%@", seconds / 60, [VectorL10n formatTimeM]];
}
else if (secondsInterval < 86400)
{
formattedString = [NSString stringWithFormat:@"%tu%@", seconds / 3600, [MatrixKitL10n formatTimeH]];
formattedString = [NSString stringWithFormat:@"%tu%@", seconds / 3600, [VectorL10n formatTimeH]];
}
else
{
formattedString = [NSString stringWithFormat:@"%tu%@", seconds / 86400, [MatrixKitL10n formatTimeD]];
formattedString = [NSString stringWithFormat:@"%tu%@", seconds / 86400, [VectorL10n formatTimeD]];
}
}
@@ -715,15 +715,15 @@ static NSMutableDictionary* backgroundByImageNameDict;
+ (UIAlertController*)videoConversionPromptForVideoAsset:(AVAsset *)videoAsset
withCompletion:(void (^)(NSString * _Nullable presetName))completion
{
UIAlertController *compressionPrompt = [UIAlertController alertControllerWithTitle:[MatrixKitL10n attachmentSizePromptTitle]
message:[MatrixKitL10n attachmentSizePromptMessage]
UIAlertController *compressionPrompt = [UIAlertController alertControllerWithTitle:[VectorL10n attachmentSizePromptTitle]
message:[VectorL10n attachmentSizePromptMessage]
preferredStyle:UIAlertControllerStyleActionSheet];
CGSize naturalSize = [videoAsset tracksWithMediaType:AVMediaTypeVideo].firstObject.naturalSize;
// Provide 480p as the baseline preset.
NSString *fileSizeString = [MXKTools estimatedFileSizeStringForVideoAsset:videoAsset withPresetName:AVAssetExportPreset640x480];
NSString *title = [MatrixKitL10n attachmentSmallWithResolution:@"480p" :fileSizeString];
NSString *title = [VectorL10n attachmentSmallWithResolution:@"480p" :fileSizeString];
[compressionPrompt addAction:[UIAlertAction actionWithTitle:title
style:UIAlertActionStyleDefault
handler:^(UIAlertAction * action) {
@@ -735,7 +735,7 @@ static NSMutableDictionary* backgroundByImageNameDict;
if (naturalSize.height > 480)
{
NSString *fileSizeString = [MXKTools estimatedFileSizeStringForVideoAsset:videoAsset withPresetName:AVAssetExportPreset1280x720];
NSString *title = [MatrixKitL10n attachmentMediumWithResolution:@"720p" :fileSizeString];
NSString *title = [VectorL10n attachmentMediumWithResolution:@"720p" :fileSizeString];
[compressionPrompt addAction:[UIAlertAction actionWithTitle:title
style:UIAlertActionStyleDefault
handler:^(UIAlertAction * action) {
@@ -748,7 +748,7 @@ static NSMutableDictionary* backgroundByImageNameDict;
if (naturalSize.height > 720)
{
NSString *fileSizeString = [MXKTools estimatedFileSizeStringForVideoAsset:videoAsset withPresetName:AVAssetExportPreset1920x1080];
NSString *title = [MatrixKitL10n attachmentLargeWithResolution:@"1080p" :fileSizeString];
NSString *title = [VectorL10n attachmentLargeWithResolution:@"1080p" :fileSizeString];
[compressionPrompt addAction:[UIAlertAction actionWithTitle:title
style:UIAlertActionStyleDefault
handler:^(UIAlertAction * action) {
@@ -757,7 +757,7 @@ static NSMutableDictionary* backgroundByImageNameDict;
}]];
}
[compressionPrompt addAction:[UIAlertAction actionWithTitle:[MatrixKitL10n cancel]
[compressionPrompt addAction:[UIAlertAction actionWithTitle:[VectorL10n cancel]
style:UIAlertActionStyleCancel
handler:^(UIAlertAction * action) {
// Cancelled. Call the completion with nil.
@@ -800,7 +800,7 @@ static NSMutableDictionary* backgroundByImageNameDict;
UIApplication *sharedApplication = [UIApplication performSelector:@selector(sharedApplication)];
if (sharedApplication && UIApplicationOpenSettingsURLString)
{
[alert addAction:[UIAlertAction actionWithTitle:[MatrixKitL10n settings]
[alert addAction:[UIAlertAction actionWithTitle:[VectorL10n settings]
style:UIAlertActionStyleDefault
handler:^(UIAlertAction * action) {
@@ -814,7 +814,7 @@ static NSMutableDictionary* backgroundByImageNameDict;
}]];
}
[alert addAction:[UIAlertAction actionWithTitle:[MatrixKitL10n ok]
[alert addAction:[UIAlertAction actionWithTitle:[VectorL10n ok]
style:UIAlertActionStyleDefault
handler:^(UIAlertAction * action) {
@@ -898,7 +898,7 @@ manualChangeMessageForVideo:(NSString*)manualChangeMessageForVideo
// Display manualChangeMessage
UIAlertController *alert = [UIAlertController alertControllerWithTitle:manualChangeTitle message:manualChangeMessage preferredStyle:UIAlertControllerStyleAlert];
[alert addAction:[UIAlertAction actionWithTitle:MatrixKitL10n.cancel
[alert addAction:[UIAlertAction actionWithTitle:VectorL10n.cancel
style:UIAlertActionStyleDefault
handler:^(UIAlertAction * action) {
@@ -910,7 +910,7 @@ manualChangeMessageForVideo:(NSString*)manualChangeMessageForVideo
UIApplication *sharedApplication = [UIApplication performSelector:@selector(sharedApplication)];
if (sharedApplication)
{
UIAlertAction *settingsAction = [UIAlertAction actionWithTitle:MatrixKitL10n.settings
UIAlertAction *settingsAction = [UIAlertAction actionWithTitle:VectorL10n.settings
style:UIAlertActionStyleDefault
handler:^(UIAlertAction * action) {
[MXKAppSettings standardAppSettings].syncLocalContactsPermissionOpenedSystemSettings = YES;