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
@@ -115,8 +115,8 @@ NSString* const kMXKAccountDetailsLinkedEmailCellId = @"kMXKAccountDetailsLinked
[userPictureButton.layer setCornerRadius:userPictureButton.frame.size.width / 2];
userPictureButton.clipsToBounds = YES;
[saveUserInfoButton setTitle:[MatrixKitL10n accountSaveChanges] forState:UIControlStateNormal];
[saveUserInfoButton setTitle:[MatrixKitL10n accountSaveChanges] forState:UIControlStateHighlighted];
[saveUserInfoButton setTitle:[VectorL10n accountSaveChanges] forState:UIControlStateNormal];
[saveUserInfoButton setTitle:[VectorL10n accountSaveChanges] forState:UIControlStateHighlighted];
// Force refresh
self.mxAccount = _mxAccount;
@@ -250,10 +250,10 @@ NSString* const kMXKAccountDetailsLinkedEmailCellId = @"kMXKAccountDetailsLinked
{
dispatch_async(dispatch_get_main_queue(), ^{
UIAlertController *alert = [UIAlertController alertControllerWithTitle:nil message:[MatrixKitL10n messageUnsavedChanges] preferredStyle:UIAlertControllerStyleAlert];
UIAlertController *alert = [UIAlertController alertControllerWithTitle:nil message:[VectorL10n messageUnsavedChanges] preferredStyle:UIAlertControllerStyleAlert];
[self->alertsArray addObject:alert];
[alert addAction:[UIAlertAction actionWithTitle:[MatrixKitL10n discard]
[alert addAction:[UIAlertAction actionWithTitle:[VectorL10n discard]
style:UIAlertActionStyleDefault
handler:^(UIAlertAction * action) {
@@ -271,7 +271,7 @@ NSString* const kMXKAccountDetailsLinkedEmailCellId = @"kMXKAccountDetailsLinked
}]];
[alert addAction:[UIAlertAction actionWithTitle:[MatrixKitL10n save]
[alert addAction:[UIAlertAction actionWithTitle:[VectorL10n save]
style:UIAlertActionStyleDefault
handler:^(UIAlertAction * action) {
@@ -443,7 +443,7 @@ NSString* const kMXKAccountDetailsLinkedEmailCellId = @"kMXKAccountDetailsLinked
NSString *title = [error.userInfo valueForKey:NSLocalizedFailureReasonErrorKey];
if (!title)
{
title = [MatrixKitL10n accountErrorDisplayNameChangeFailed];
title = [VectorL10n accountErrorDisplayNameChangeFailed];
}
NSString *msg = [error.userInfo valueForKey:NSLocalizedDescriptionKey];
@@ -451,7 +451,7 @@ NSString* const kMXKAccountDetailsLinkedEmailCellId = @"kMXKAccountDetailsLinked
[self->alertsArray addObject:alert];
[alert addAction:[UIAlertAction actionWithTitle:[MatrixKitL10n abort]
[alert addAction:[UIAlertAction actionWithTitle:[VectorL10n abort]
style:UIAlertActionStyleDefault
handler:^(UIAlertAction * action) {
@@ -464,7 +464,7 @@ NSString* const kMXKAccountDetailsLinkedEmailCellId = @"kMXKAccountDetailsLinked
}]];
[alert addAction:[UIAlertAction actionWithTitle:[MatrixKitL10n retry]
[alert addAction:[UIAlertAction actionWithTitle:[VectorL10n retry]
style:UIAlertActionStyleDefault
handler:^(UIAlertAction * action) {
@@ -552,14 +552,14 @@ NSString* const kMXKAccountDetailsLinkedEmailCellId = @"kMXKAccountDetailsLinked
NSString *title = [error.userInfo valueForKey:NSLocalizedFailureReasonErrorKey];
if (!title)
{
title = [MatrixKitL10n accountErrorPictureChangeFailed];
title = [VectorL10n accountErrorPictureChangeFailed];
}
NSString *msg = [error.userInfo valueForKey:NSLocalizedDescriptionKey];
UIAlertController *alert = [UIAlertController alertControllerWithTitle:title message:msg preferredStyle:UIAlertControllerStyleAlert];
[alertsArray addObject:alert];
[alert addAction:[UIAlertAction actionWithTitle:[MatrixKitL10n abort]
[alert addAction:[UIAlertAction actionWithTitle:[VectorL10n abort]
style:UIAlertActionStyleDefault
handler:^(UIAlertAction * action) {
@@ -573,7 +573,7 @@ NSString* const kMXKAccountDetailsLinkedEmailCellId = @"kMXKAccountDetailsLinked
}]];
[alert addAction:[UIAlertAction actionWithTitle:[MatrixKitL10n retry]
[alert addAction:[UIAlertAction actionWithTitle:[VectorL10n retry]
style:UIAlertActionStyleDefault
handler:^(UIAlertAction * action) {
@@ -731,10 +731,10 @@ NSString* const kMXKAccountDetailsLinkedEmailCellId = @"kMXKAccountDetailsLinked
- (void)showValidationEmailDialogWithMessage:(NSString*)message
{
UIAlertController *alert = [UIAlertController alertControllerWithTitle:[MatrixKitL10n accountEmailValidationTitle] message:message preferredStyle:UIAlertControllerStyleAlert];
UIAlertController *alert = [UIAlertController alertControllerWithTitle:[VectorL10n accountEmailValidationTitle] message:message preferredStyle:UIAlertControllerStyleAlert];
[alertsArray addObject:alert];
[alert addAction:[UIAlertAction actionWithTitle:[MatrixKitL10n abort]
[alert addAction:[UIAlertAction actionWithTitle:[VectorL10n abort]
style:UIAlertActionStyleDefault
handler:^(UIAlertAction * action) {
@@ -744,7 +744,7 @@ NSString* const kMXKAccountDetailsLinkedEmailCellId = @"kMXKAccountDetailsLinked
}]];
[alert addAction:[UIAlertAction actionWithTitle:[MatrixKitL10n continue]
[alert addAction:[UIAlertAction actionWithTitle:[VectorL10n continue]
style:UIAlertActionStyleDefault
handler:^(UIAlertAction * action) {
@@ -779,7 +779,7 @@ NSString* const kMXKAccountDetailsLinkedEmailCellId = @"kMXKAccountDetailsLinked
MXError *mxError = [[MXError alloc] initWithNSError:error];
if (mxError && [mxError.errcode isEqualToString:kMXErrCodeStringThreePIDAuthFailed])
{
[self showValidationEmailDialogWithMessage:[MatrixKitL10n accountEmailValidationError]];
[self showValidationEmailDialogWithMessage:[VectorL10n accountEmailValidationError]];
}
else
{
@@ -841,10 +841,10 @@ NSString* const kMXKAccountDetailsLinkedEmailCellId = @"kMXKAccountDetailsLinked
// Email check
if (![MXTools isEmailAddress:emailTextField.text])
{
UIAlertController *alert = [UIAlertController alertControllerWithTitle:[MatrixKitL10n accountErrorEmailWrongTitle] message:[MatrixKitL10n accountErrorEmailWrongDescription] preferredStyle:UIAlertControllerStyleAlert];
UIAlertController *alert = [UIAlertController alertControllerWithTitle:[VectorL10n accountErrorEmailWrongTitle] message:[VectorL10n accountErrorEmailWrongDescription] preferredStyle:UIAlertControllerStyleAlert];
[alertsArray addObject:alert];
[alert addAction:[UIAlertAction actionWithTitle:[MatrixKitL10n ok]
[alert addAction:[UIAlertAction actionWithTitle:[VectorL10n ok]
style:UIAlertActionStyleDefault
handler:^(UIAlertAction * action) {
@@ -870,7 +870,7 @@ NSString* const kMXKAccountDetailsLinkedEmailCellId = @"kMXKAccountDetailsLinked
if (weakSelf)
{
typeof(self) self = weakSelf;
[self showValidationEmailDialogWithMessage:[MatrixKitL10n accountEmailValidationMessage]];
[self showValidationEmailDialogWithMessage:[VectorL10n accountEmailValidationMessage]];
}
} failure:^(NSError *error) {
@@ -985,7 +985,7 @@ NSString* const kMXKAccountDetailsLinkedEmailCellId = @"kMXKAccountDetailsLinked
{
UITextView *textView = [[UITextView alloc] initWithFrame:CGRectMake(0, 0, tableView.frame.size.width, MAXFLOAT)];
textView.font = [UIFont systemFontOfSize:14];
textView.text = [NSString stringWithFormat:@"%@\n%@\n%@", [MatrixKitL10n settingsConfigHomeServer:_mxAccount.mxCredentials.homeServer], [MatrixKitL10n settingsConfigIdentityServer:_mxAccount.identityServerURL], [MatrixKitL10n settingsConfigUserId:_mxAccount.mxCredentials.userId]];
textView.text = [NSString stringWithFormat:@"%@\n%@\n%@", [VectorL10n settingsConfigHomeServer:_mxAccount.mxCredentials.homeServer], [VectorL10n settingsConfigIdentityServer:_mxAccount.identityServerURL], [VectorL10n settingsConfigUserId:_mxAccount.mxCredentials.userId]];
CGSize contentSize = [textView sizeThatFits:textView.frame.size];
return contentSize.height + 1;
@@ -1030,8 +1030,8 @@ NSString* const kMXKAccountDetailsLinkedEmailCellId = @"kMXKAccountDetailsLinked
submittedEmailCell.mxkTextField.text = currentEmail;
submittedEmailCell.mxkTextField.keyboardType = UIKeyboardTypeEmailAddress;
submittedEmailCell.mxkButton.enabled = (currentEmail.length != 0);
[submittedEmailCell.mxkButton setTitle:[MatrixKitL10n accountLinkEmail] forState:UIControlStateNormal];
[submittedEmailCell.mxkButton setTitle:[MatrixKitL10n accountLinkEmail] forState:UIControlStateHighlighted];
[submittedEmailCell.mxkButton setTitle:[VectorL10n accountLinkEmail] forState:UIControlStateNormal];
[submittedEmailCell.mxkButton setTitle:[VectorL10n accountLinkEmail] forState:UIControlStateHighlighted];
[submittedEmailCell.mxkButton addTarget:self action:@selector(onButtonPressed:) forControlEvents:UIControlEventTouchUpInside];
emailSubmitButton = submittedEmailCell.mxkButton;
@@ -1057,13 +1057,13 @@ NSString* const kMXKAccountDetailsLinkedEmailCellId = @"kMXKAccountDetailsLinked
if (indexPath.row == enableInAppNotifRowIndex)
{
notificationsCell.mxkLabel.text = [MatrixKitL10n settingsEnableInappNotifications];
notificationsCell.mxkLabel.text = [VectorL10n settingsEnableInappNotifications];
notificationsCell.mxkSwitch.on = _mxAccount.enableInAppNotifications;
inAppNotificationsSwitch = notificationsCell.mxkSwitch;
}
else /* enablePushNotifRowIndex */
{
notificationsCell.mxkLabel.text = [MatrixKitL10n settingsEnablePushNotifications];
notificationsCell.mxkLabel.text = [VectorL10n settingsEnablePushNotifications];
notificationsCell.mxkSwitch.on = _mxAccount.pushNotificationServiceIsActive;
notificationsCell.mxkSwitch.enabled = YES;
apnsNotificationsSwitch = notificationsCell.mxkSwitch;
@@ -1081,7 +1081,7 @@ NSString* const kMXKAccountDetailsLinkedEmailCellId = @"kMXKAccountDetailsLinked
configCell = [[MXKTableViewCellWithTextView alloc] init];
}
configCell.mxkTextView.text = [NSString stringWithFormat:@"%@\n%@\n%@", [MatrixKitL10n settingsConfigHomeServer:_mxAccount.mxCredentials.homeServer], [MatrixKitL10n settingsConfigIdentityServer:_mxAccount.identityServerURL], [MatrixKitL10n settingsConfigUserId:_mxAccount.mxCredentials.userId]];
configCell.mxkTextView.text = [NSString stringWithFormat:@"%@\n%@\n%@", [VectorL10n settingsConfigHomeServer:_mxAccount.mxCredentials.homeServer], [VectorL10n settingsConfigIdentityServer:_mxAccount.identityServerURL], [VectorL10n settingsConfigUserId:_mxAccount.mxCredentials.userId]];
cell = configCell;
}
@@ -1092,8 +1092,8 @@ NSString* const kMXKAccountDetailsLinkedEmailCellId = @"kMXKAccountDetailsLinked
{
logoutBtnCell = [[MXKTableViewCellWithButton alloc] init];
}
[logoutBtnCell.mxkButton setTitle:[MatrixKitL10n actionLogout] forState:UIControlStateNormal];
[logoutBtnCell.mxkButton setTitle:[MatrixKitL10n actionLogout] forState:UIControlStateHighlighted];
[logoutBtnCell.mxkButton setTitle:[VectorL10n actionLogout] forState:UIControlStateNormal];
[logoutBtnCell.mxkButton setTitle:[VectorL10n actionLogout] forState:UIControlStateHighlighted];
[logoutBtnCell.mxkButton addTarget:self action:@selector(onButtonPressed:) forControlEvents:UIControlEventTouchUpInside];
logoutButton = logoutBtnCell.mxkButton;
@@ -1133,15 +1133,15 @@ NSString* const kMXKAccountDetailsLinkedEmailCellId = @"kMXKAccountDetailsLinked
if (section == linkedEmailsSection)
{
sectionLabel.text = [MatrixKitL10n accountLinkedEmails];
sectionLabel.text = [VectorL10n accountLinkedEmails];
}
else if (section == notificationsSection)
{
sectionLabel.text = [MatrixKitL10n settingsTitleNotifications];
sectionLabel.text = [VectorL10n settingsTitleNotifications];
}
else if (section == configurationSection)
{
sectionLabel.text = [MatrixKitL10n settingsTitleConfig];
sectionLabel.text = [VectorL10n settingsTitleConfig];
}
return sectionHeader;
@@ -1188,7 +1188,7 @@
if ([MXKAppSettings standardAppSettings].messageDetailsAllowSaving)
{
[currentAlert addAction:[UIAlertAction actionWithTitle:[MatrixKitL10n save]
[currentAlert addAction:[UIAlertAction actionWithTitle:[VectorL10n save]
style:UIAlertActionStyleDefault
handler:^(UIAlertAction * action) {
@@ -1217,7 +1217,7 @@
if ([MXKAppSettings standardAppSettings].messageDetailsAllowCopyingMedia)
{
[currentAlert addAction:[UIAlertAction actionWithTitle:[MatrixKitL10n copyButtonName]
[currentAlert addAction:[UIAlertAction actionWithTitle:[VectorL10n copyButtonName]
style:UIAlertActionStyleDefault
handler:^(UIAlertAction * action) {
@@ -1246,7 +1246,7 @@
if ([MXKAppSettings standardAppSettings].messageDetailsAllowSharing)
{
[currentAlert addAction:[UIAlertAction actionWithTitle:[MatrixKitL10n share]
[currentAlert addAction:[UIAlertAction actionWithTitle:[VectorL10n share]
style:UIAlertActionStyleDefault
handler:^(UIAlertAction * action) {
@@ -1289,7 +1289,7 @@
if ([MXMediaManager existingDownloaderWithIdentifier:attachment.downloadId])
{
[currentAlert addAction:[UIAlertAction actionWithTitle:[MatrixKitL10n cancelDownload]
[currentAlert addAction:[UIAlertAction actionWithTitle:[VectorL10n cancelDownload]
style:UIAlertActionStyleDefault
handler:^(UIAlertAction * action) {
@@ -1308,7 +1308,7 @@
if (currentAlert.actions.count)
{
[currentAlert addAction:[UIAlertAction actionWithTitle:[MatrixKitL10n cancel]
[currentAlert addAction:[UIAlertAction actionWithTitle:[VectorL10n cancel]
style:UIAlertActionStyleCancel
handler:^(UIAlertAction * action) {
@@ -166,14 +166,14 @@
[self updateRESTClient];
// Localize labels
_homeServerLabel.text = [MatrixKitL10n loginHomeServerTitle];
_homeServerTextField.placeholder = [MatrixKitL10n loginServerUrlPlaceholder];
_homeServerInfoLabel.text = [MatrixKitL10n loginHomeServerInfo];
_identityServerLabel.text = [MatrixKitL10n loginIdentityServerTitle];
_identityServerTextField.placeholder = [MatrixKitL10n loginServerUrlPlaceholder];
_identityServerInfoLabel.text = [MatrixKitL10n loginIdentityServerInfo];
[_cancelAuthFallbackButton setTitle:[MatrixKitL10n cancel] forState:UIControlStateNormal];
[_cancelAuthFallbackButton setTitle:[MatrixKitL10n cancel] forState:UIControlStateHighlighted];
_homeServerLabel.text = [VectorL10n loginHomeServerTitle];
_homeServerTextField.placeholder = [VectorL10n loginServerUrlPlaceholder];
_homeServerInfoLabel.text = [VectorL10n loginHomeServerInfo];
_identityServerLabel.text = [VectorL10n loginIdentityServerTitle];
_identityServerTextField.placeholder = [VectorL10n loginServerUrlPlaceholder];
_identityServerInfoLabel.text = [VectorL10n loginIdentityServerInfo];
[_cancelAuthFallbackButton setTitle:[VectorL10n cancel] forState:UIControlStateNormal];
[_cancelAuthFallbackButton setTitle:[VectorL10n cancel] forState:UIControlStateHighlighted];
}
- (void)didReceiveMemoryWarning
@@ -305,10 +305,10 @@
if (authType == MXKAuthenticationTypeLogin)
{
_subTitleLabel.hidden = YES;
[_submitButton setTitle:[MatrixKitL10n login] forState:UIControlStateNormal];
[_submitButton setTitle:[MatrixKitL10n login] forState:UIControlStateHighlighted];
[_authSwitchButton setTitle:[MatrixKitL10n createAccount] forState:UIControlStateNormal];
[_authSwitchButton setTitle:[MatrixKitL10n createAccount] forState:UIControlStateHighlighted];
[_submitButton setTitle:[VectorL10n login] forState:UIControlStateNormal];
[_submitButton setTitle:[VectorL10n login] forState:UIControlStateHighlighted];
[_authSwitchButton setTitle:[VectorL10n createAccount] forState:UIControlStateNormal];
[_authSwitchButton setTitle:[VectorL10n createAccount] forState:UIControlStateHighlighted];
// Update supported authentication flow and associated information (defined in authentication session)
[self refreshAuthenticationSession];
@@ -316,11 +316,11 @@
else if (authType == MXKAuthenticationTypeRegister)
{
_subTitleLabel.hidden = NO;
_subTitleLabel.text = [MatrixKitL10n loginCreateAccount];
[_submitButton setTitle:[MatrixKitL10n signUp] forState:UIControlStateNormal];
[_submitButton setTitle:[MatrixKitL10n signUp] forState:UIControlStateHighlighted];
[_authSwitchButton setTitle:[MatrixKitL10n back] forState:UIControlStateNormal];
[_authSwitchButton setTitle:[MatrixKitL10n back] forState:UIControlStateHighlighted];
_subTitleLabel.text = [VectorL10n loginCreateAccount];
[_submitButton setTitle:[VectorL10n signUp] forState:UIControlStateNormal];
[_submitButton setTitle:[VectorL10n signUp] forState:UIControlStateHighlighted];
[_authSwitchButton setTitle:[VectorL10n back] forState:UIControlStateNormal];
[_authSwitchButton setTitle:[VectorL10n back] forState:UIControlStateHighlighted];
// Update supported authentication flow and associated information (defined in authentication session)
[self refreshAuthenticationSession];
@@ -331,19 +331,19 @@
if (isPasswordReseted)
{
[_submitButton setTitle:[MatrixKitL10n back] forState:UIControlStateNormal];
[_submitButton setTitle:[MatrixKitL10n back] forState:UIControlStateHighlighted];
[_submitButton setTitle:[VectorL10n back] forState:UIControlStateNormal];
[_submitButton setTitle:[VectorL10n back] forState:UIControlStateHighlighted];
}
else
{
[_submitButton setTitle:[MatrixKitL10n submit] forState:UIControlStateNormal];
[_submitButton setTitle:[MatrixKitL10n submit] forState:UIControlStateHighlighted];
[_submitButton setTitle:[VectorL10n submit] forState:UIControlStateNormal];
[_submitButton setTitle:[VectorL10n submit] forState:UIControlStateHighlighted];
[self refreshForgotPasswordSession];
}
[_authSwitchButton setTitle:[MatrixKitL10n back] forState:UIControlStateNormal];
[_authSwitchButton setTitle:[MatrixKitL10n back] forState:UIControlStateHighlighted];
[_authSwitchButton setTitle:[VectorL10n back] forState:UIControlStateNormal];
[_authSwitchButton setTitle:[VectorL10n back] forState:UIControlStateHighlighted];
}
[self checkIdentityServer];
@@ -754,7 +754,7 @@
}
else
{
[self onFailureDuringAuthRequest:[NSError errorWithDomain:MXKAuthErrorDomain code:0 userInfo:@{NSLocalizedDescriptionKey:[MatrixKitL10n notSupportedYet]}]];
[self onFailureDuringAuthRequest:[NSError errorWithDomain:MXKAuthErrorDomain code:0 userInfo:@{NSLocalizedDescriptionKey:[VectorL10n notSupportedYet]}]];
_externalRegistrationParameters = nil;
@@ -779,23 +779,23 @@
// Notify user that no flow is supported
if (_authType == MXKAuthenticationTypeLogin)
{
_noFlowLabel.text = [MatrixKitL10n loginErrorDoNotSupportLoginFlows];
_noFlowLabel.text = [VectorL10n loginErrorDoNotSupportLoginFlows];
}
else
{
_noFlowLabel.text = [MatrixKitL10n loginErrorRegistrationIsNotSupported];
_noFlowLabel.text = [VectorL10n loginErrorRegistrationIsNotSupported];
}
MXLogDebug(@"[MXKAuthenticationVC] Warning: %@", _noFlowLabel.text);
if (authenticationFallback.length)
{
[_retryButton setTitle:[MatrixKitL10n loginUseFallback] forState:UIControlStateNormal];
[_retryButton setTitle:[MatrixKitL10n loginUseFallback] forState:UIControlStateNormal];
[_retryButton setTitle:[VectorL10n loginUseFallback] forState:UIControlStateNormal];
[_retryButton setTitle:[VectorL10n loginUseFallback] forState:UIControlStateNormal];
}
else
{
[_retryButton setTitle:[MatrixKitL10n retry] forState:UIControlStateNormal];
[_retryButton setTitle:[MatrixKitL10n retry] forState:UIControlStateNormal];
[_retryButton setTitle:[VectorL10n retry] forState:UIControlStateNormal];
[_retryButton setTitle:[VectorL10n retry] forState:UIControlStateNormal];
}
_noFlowLabel.hidden = NO;
@@ -1006,7 +1006,7 @@
// Sanity check
if (!credentials.userId || !credentials.accessToken)
{
[self onFailureDuringAuthRequest:[NSError errorWithDomain:MXKAuthErrorDomain code:0 userInfo:@{NSLocalizedDescriptionKey:[MatrixKitL10n notSupportedYet]}]];
[self onFailureDuringAuthRequest:[NSError errorWithDomain:MXKAuthErrorDomain code:0 userInfo:@{NSLocalizedDescriptionKey:[VectorL10n notSupportedYet]}]];
}
else
{
@@ -1067,7 +1067,7 @@
if (isUserNameInUse)
{
MXLogDebug(@"[MXKAuthenticationVC] User name is already use");
[self onFailureDuringAuthRequest:[NSError errorWithDomain:MXKAuthErrorDomain code:0 userInfo:@{NSLocalizedDescriptionKey:[MatrixKitL10n authUsernameInUse]}]];
[self onFailureDuringAuthRequest:[NSError errorWithDomain:MXKAuthErrorDomain code:0 userInfo:@{NSLocalizedDescriptionKey:[VectorL10n authUsernameInUse]}]];
}
else
{
@@ -1114,7 +1114,7 @@
else
{
MXLogDebug(@"[MXKAuthenticationVC] User name is missing");
[self onFailureDuringAuthRequest:[NSError errorWithDomain:MXKAuthErrorDomain code:0 userInfo:@{NSLocalizedDescriptionKey:[MatrixKitL10n authInvalidUserName]}]];
[self onFailureDuringAuthRequest:[NSError errorWithDomain:MXKAuthErrorDomain code:0 userInfo:@{NSLocalizedDescriptionKey:[VectorL10n authInvalidUserName]}]];
}
}
else if (_authType == MXKAuthenticationTypeForgotPassword)
@@ -1229,15 +1229,15 @@
{
if (self.authType == MXKAuthenticationTypeLogin)
{
title = [MatrixKitL10n loginErrorTitle];
title = [VectorL10n loginErrorTitle];
}
else if (self.authType == MXKAuthenticationTypeRegister)
{
title = [MatrixKitL10n registerErrorTitle];
title = [VectorL10n registerErrorTitle];
}
else
{
title = [MatrixKitL10n error];
title = [VectorL10n error];
}
}
NSString* message = error.localizedDescription;
@@ -1258,31 +1258,31 @@
{
if ([errCode isEqualToString:kMXErrCodeStringForbidden])
{
message = [MatrixKitL10n loginErrorForbidden];
message = [VectorL10n loginErrorForbidden];
}
else if ([errCode isEqualToString:kMXErrCodeStringUnknownToken])
{
message = [MatrixKitL10n loginErrorUnknownToken];
message = [VectorL10n loginErrorUnknownToken];
}
else if ([errCode isEqualToString:kMXErrCodeStringBadJSON])
{
message = [MatrixKitL10n loginErrorBadJson];
message = [VectorL10n loginErrorBadJson];
}
else if ([errCode isEqualToString:kMXErrCodeStringNotJSON])
{
message = [MatrixKitL10n loginErrorNotJson];
message = [VectorL10n loginErrorNotJson];
}
else if ([errCode isEqualToString:kMXErrCodeStringLimitExceeded])
{
message = [MatrixKitL10n loginErrorLimitExceeded];
message = [VectorL10n loginErrorLimitExceeded];
}
else if ([errCode isEqualToString:kMXErrCodeStringUserInUse])
{
message = [MatrixKitL10n loginErrorUserInUse];
message = [VectorL10n loginErrorUserInUse];
}
else if ([errCode isEqualToString:kMXErrCodeStringLoginEmailURLNotYet])
{
message = [MatrixKitL10n loginErrorLoginEmailNotYet];
message = [VectorL10n loginErrorLoginEmailNotYet];
}
else if ([errCode isEqualToString:kMXErrCodeStringResourceLimitExceeded])
{
@@ -1304,7 +1304,7 @@
alert = [UIAlertController alertControllerWithTitle:title message:message preferredStyle:UIAlertControllerStyleAlert];
[alert addAction:[UIAlertAction actionWithTitle:[MatrixKitL10n ok]
[alert addAction:[UIAlertAction actionWithTitle:[VectorL10n ok]
style:UIAlertActionStyleDefault
handler:^(UIAlertAction * action) {
@@ -1347,20 +1347,20 @@
adminContact = [NSURL URLWithString:adminContactString];
}
NSString *title = [MatrixKitL10n loginErrorResourceLimitExceededTitle];
NSString *title = [VectorL10n loginErrorResourceLimitExceededTitle];
// Build the message content
NSMutableString *message = [NSMutableString new];
if ([limitType isEqualToString:kMXErrorResourceLimitExceededLimitTypeMonthlyActiveUserValue])
{
[message appendString:[MatrixKitL10n loginErrorResourceLimitExceededMessageMonthlyActiveUser]];
[message appendString:[VectorL10n loginErrorResourceLimitExceededMessageMonthlyActiveUser]];
}
else
{
[message appendString:[MatrixKitL10n loginErrorResourceLimitExceededMessageDefault]];
[message appendString:[VectorL10n loginErrorResourceLimitExceededMessageDefault]];
}
[message appendString:[MatrixKitL10n loginErrorResourceLimitExceededMessageContact]];
[message appendString:[VectorL10n loginErrorResourceLimitExceededMessageContact]];
// Build the alert
alert = [UIAlertController alertControllerWithTitle:title message:message preferredStyle:UIAlertControllerStyleAlert];
@@ -1368,7 +1368,7 @@
MXWeakify(self);
if (adminContact && onAdminContactTapped)
{
[alert addAction:[UIAlertAction actionWithTitle:[MatrixKitL10n loginErrorResourceLimitExceededContactButton]
[alert addAction:[UIAlertAction actionWithTitle:[VectorL10n loginErrorResourceLimitExceededContactButton]
style:UIAlertActionStyleDefault
handler:^(UIAlertAction * action)
{
@@ -1381,7 +1381,7 @@
}]];
}
[alert addAction:[UIAlertAction actionWithTitle:[MatrixKitL10n cancel]
[alert addAction:[UIAlertAction actionWithTitle:[VectorL10n cancel]
style:UIAlertActionStyleDefault
handler:^(UIAlertAction * action)
{
@@ -1423,9 +1423,9 @@
[alert dismissViewControllerAnimated:NO completion:nil];
}
alert = [UIAlertController alertControllerWithTitle:[MatrixKitL10n loginErrorAlreadyLoggedIn] message:nil preferredStyle:UIAlertControllerStyleAlert];
alert = [UIAlertController alertControllerWithTitle:[VectorL10n loginErrorAlreadyLoggedIn] message:nil preferredStyle:UIAlertControllerStyleAlert];
[alert addAction:[UIAlertAction actionWithTitle:[MatrixKitL10n ok]
[alert addAction:[UIAlertAction actionWithTitle:[VectorL10n ok]
style:UIAlertActionStyleDefault
handler:^(UIAlertAction * action) {
@@ -1544,9 +1544,9 @@
}
#if TARGET_OS_IPHONE
NSString *deviceName = [[UIDevice currentDevice].model isEqualToString:@"iPad"] ? [MatrixKitL10n loginTabletDevice] : [MatrixKitL10n loginMobileDevice];
NSString *deviceName = [[UIDevice currentDevice].model isEqualToString:@"iPad"] ? [VectorL10n loginTabletDevice] : [VectorL10n loginMobileDevice];
#elif TARGET_OS_OSX
NSString *deviceName = [MatrixKitL10n loginDesktopDevice];
NSString *deviceName = [VectorL10n loginDesktopDevice];
#endif
return deviceName;
@@ -1591,7 +1591,7 @@
// Remove the potential auth inputs view
self.authInputsView = nil;
_noFlowLabel.text = [MatrixKitL10n loginErrorForgotPasswordIsNotSupported];
_noFlowLabel.text = [VectorL10n loginErrorForgotPasswordIsNotSupported];
MXLogDebug(@"[MXKAuthenticationVC] Warning: %@", _noFlowLabel.text);
@@ -1620,12 +1620,12 @@
__block BOOL isTrusted;
dispatch_semaphore_t semaphore = dispatch_semaphore_create(0);
NSString *title = [MatrixKitL10n sslCouldNotVerify];
NSString *homeserverURLStr = [MatrixKitL10n sslHomeserverUrl:homeserverURL];
NSString *fingerprint = [MatrixKitL10n sslFingerprintHash:@"SHA256"];
NSString *title = [VectorL10n sslCouldNotVerify];
NSString *homeserverURLStr = [VectorL10n sslHomeserverUrl:homeserverURL];
NSString *fingerprint = [VectorL10n sslFingerprintHash:@"SHA256"];
NSString *certFingerprint = [certificate mx_SHA256AsHexString];
NSString *msg = [NSString stringWithFormat:@"%@\n\n%@\n\n%@\n\n%@\n\n%@\n\n%@", [MatrixKitL10n sslCertNotTrust], [MatrixKitL10n sslCertNewAccountExpl], homeserverURLStr, fingerprint, certFingerprint, [MatrixKitL10n sslOnlyAccept]];
NSString *msg = [NSString stringWithFormat:@"%@\n\n%@\n\n%@\n\n%@\n\n%@\n\n%@", [VectorL10n sslCertNotTrust], [VectorL10n sslCertNewAccountExpl], homeserverURLStr, fingerprint, certFingerprint, [VectorL10n sslOnlyAccept]];
if (self->alert)
{
@@ -1634,7 +1634,7 @@
self->alert = [UIAlertController alertControllerWithTitle:title message:msg preferredStyle:UIAlertControllerStyleAlert];
[self->alert addAction:[UIAlertAction actionWithTitle:[MatrixKitL10n cancel]
[self->alert addAction:[UIAlertAction actionWithTitle:[VectorL10n cancel]
style:UIAlertActionStyleDefault
handler:^(UIAlertAction * action) {
@@ -1644,7 +1644,7 @@
}]];
[self->alert addAction:[UIAlertAction actionWithTitle:[MatrixKitL10n sslTrust]
[self->alert addAction:[UIAlertAction actionWithTitle:[VectorL10n sslTrust]
style:UIAlertActionStyleDefault
handler:^(UIAlertAction * action) {
@@ -1703,7 +1703,7 @@
// Sanity check
if (!credentials.userId || !credentials.accessToken)
{
[self onFailureDuringAuthRequest:[NSError errorWithDomain:MXKAuthErrorDomain code:0 userInfo:@{NSLocalizedDescriptionKey:[MatrixKitL10n notSupportedYet]}]];
[self onFailureDuringAuthRequest:[NSError errorWithDomain:MXKAuthErrorDomain code:0 userInfo:@{NSLocalizedDescriptionKey:[VectorL10n notSupportedYet]}]];
}
else
{
@@ -1745,7 +1745,7 @@
// Sanity check
if (!credentials.userId || !credentials.accessToken)
{
[self onFailureDuringAuthRequest:[NSError errorWithDomain:MXKAuthErrorDomain code:0 userInfo:@{NSLocalizedDescriptionKey:[MatrixKitL10n notSupportedYet]}]];
[self onFailureDuringAuthRequest:[NSError errorWithDomain:MXKAuthErrorDomain code:0 userInfo:@{NSLocalizedDescriptionKey:[VectorL10n notSupportedYet]}]];
}
else
{
@@ -1811,7 +1811,7 @@
return;
}
[self onFailureDuringAuthRequest:[NSError errorWithDomain:MXKAuthErrorDomain code:0 userInfo:@{NSLocalizedDescriptionKey:[MatrixKitL10n notSupportedYet]}]];
[self onFailureDuringAuthRequest:[NSError errorWithDomain:MXKAuthErrorDomain code:0 userInfo:@{NSLocalizedDescriptionKey:[VectorL10n notSupportedYet]}]];
}
else
{
@@ -1862,9 +1862,9 @@
[self->alert dismissViewControllerAnimated:NO completion:nil];
}
self->alert = [UIAlertController alertControllerWithTitle:[MatrixKitL10n error] message:[MatrixKitL10n authResetPasswordErrorUnauthorized] preferredStyle:UIAlertControllerStyleAlert];
self->alert = [UIAlertController alertControllerWithTitle:[VectorL10n error] message:[VectorL10n authResetPasswordErrorUnauthorized] preferredStyle:UIAlertControllerStyleAlert];
[self->alert addAction:[UIAlertAction actionWithTitle:[MatrixKitL10n ok]
[self->alert addAction:[UIAlertAction actionWithTitle:[VectorL10n ok]
style:UIAlertActionStyleDefault
handler:^(UIAlertAction * action) {
@@ -1888,7 +1888,7 @@
{
userInfo = [NSMutableDictionary dictionary];
}
userInfo[NSLocalizedDescriptionKey] = [MatrixKitL10n authResetPasswordErrorNotFound];
userInfo[NSLocalizedDescriptionKey] = [VectorL10n authResetPasswordErrorNotFound];
[self onFailureDuringAuthRequest:[NSError errorWithDomain:kMXNSErrorDomain code:0 userInfo:userInfo]];
}
@@ -1922,7 +1922,7 @@
NSString *title = [error.userInfo valueForKey:NSLocalizedFailureReasonErrorKey];
if (!title)
{
title = [MatrixKitL10n error];
title = [VectorL10n error];
}
NSString *msg = [error.userInfo valueForKey:NSLocalizedDescriptionKey];
@@ -1933,7 +1933,7 @@
alert = [UIAlertController alertControllerWithTitle:title message:msg preferredStyle:UIAlertControllerStyleAlert];
[alert addAction:[UIAlertAction actionWithTitle:[MatrixKitL10n dismiss]
[alert addAction:[UIAlertAction actionWithTitle:[VectorL10n dismiss]
style:UIAlertActionStyleDefault
handler:^(UIAlertAction * action) {
@@ -1979,10 +1979,10 @@
_noFlowLabel.text = [error.userInfo valueForKey:NSLocalizedDescriptionKey];
if (!_noFlowLabel.text.length)
{
_noFlowLabel.text = [MatrixKitL10n loginErrorNoLoginFlow];
_noFlowLabel.text = [VectorL10n loginErrorNoLoginFlow];
}
[_retryButton setTitle:[MatrixKitL10n retry] forState:UIControlStateNormal];
[_retryButton setTitle:[MatrixKitL10n retry] forState:UIControlStateNormal];
[_retryButton setTitle:[VectorL10n retry] forState:UIControlStateNormal];
[_retryButton setTitle:[VectorL10n retry] forState:UIControlStateNormal];
_retryButton.hidden = NO;
}
}
@@ -2000,7 +2000,7 @@
}
else if (status == AFNetworkReachabilityStatusNotReachable)
{
_noFlowLabel.text = [MatrixKitL10n networkErrorNotReachable];
_noFlowLabel.text = [VectorL10n networkErrorNotReachable];
}
}
@@ -2113,7 +2113,7 @@
{
if (!cancelFallbackBarButton)
{
cancelFallbackBarButton = [[UIBarButtonItem alloc] initWithTitle:[MatrixKitL10n loginLeaveFallback] style:UIBarButtonItemStylePlain target:self action:@selector(hideRegistrationFallbackView)];
cancelFallbackBarButton = [[UIBarButtonItem alloc] initWithTitle:[VectorL10n loginLeaveFallback] style:UIBarButtonItemStylePlain target:self action:@selector(hideRegistrationFallbackView)];
}
// Add cancel button in right bar items
@@ -151,14 +151,14 @@ static const CGFloat kLocalPreviewMargin = 20;
[self.speakerButton setImage:[NSBundle mxk_imageFromMXKAssetsBundleWithName:@"icon_speaker_on"] forState:UIControlStateSelected];
// Localize string
[answerCallButton setTitle:[MatrixKitL10n answerCall] forState:UIControlStateNormal];
[answerCallButton setTitle:[MatrixKitL10n answerCall] forState:UIControlStateHighlighted];
[rejectCallButton setTitle:[MatrixKitL10n rejectCall] forState:UIControlStateNormal];
[rejectCallButton setTitle:[MatrixKitL10n rejectCall] forState:UIControlStateHighlighted];
[endCallButton setTitle:[MatrixKitL10n endCall] forState:UIControlStateNormal];
[endCallButton setTitle:[MatrixKitL10n endCall] forState:UIControlStateHighlighted];
[_resumeButton setTitle:[MatrixKitL10n resumeCall] forState:UIControlStateNormal];
[_resumeButton setTitle:[MatrixKitL10n resumeCall] forState:UIControlStateHighlighted];
[answerCallButton setTitle:[VectorL10n answerCall] forState:UIControlStateNormal];
[answerCallButton setTitle:[VectorL10n answerCall] forState:UIControlStateHighlighted];
[rejectCallButton setTitle:[VectorL10n rejectCall] forState:UIControlStateNormal];
[rejectCallButton setTitle:[VectorL10n rejectCall] forState:UIControlStateHighlighted];
[endCallButton setTitle:[VectorL10n endCall] forState:UIControlStateNormal];
[endCallButton setTitle:[VectorL10n endCall] forState:UIControlStateHighlighted];
[_resumeButton setTitle:[VectorL10n resumeCall] forState:UIControlStateNormal];
[_resumeButton setTitle:[VectorL10n resumeCall] forState:UIControlStateHighlighted];
// Refresh call information
self.mxCall = mxCall;
@@ -364,7 +364,7 @@ static const CGFloat kLocalPreviewMargin = 20;
// Check the permission right now
NSString *appDisplayName = [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleDisplayName"];
[MXKTools checkAccessForMediaType:AVMediaTypeVideo
manualChangeMessage:[MatrixKitL10n cameraAccessNotGrantedForCall:appDisplayName]
manualChangeMessage:[VectorL10n cameraAccessNotGrantedForCall:appDisplayName]
showPopUpInViewController:self completionHandler:^(BOOL granted) {
@@ -509,17 +509,17 @@ static const CGFloat kLocalPreviewMargin = 20;
if (mxCall.isConsulting)
{
callerNameLabel.text = [MatrixKitL10n callConsultingWithUser:peerDisplayName];
callerNameLabel.text = [VectorL10n callConsultingWithUser:peerDisplayName];
}
else
{
if (mxCall.isVideoCall)
{
callerNameLabel.text = [MatrixKitL10n callVideoWithUser:peerDisplayName];
callerNameLabel.text = [VectorL10n callVideoWithUser:peerDisplayName];
}
else
{
callerNameLabel.text = [MatrixKitL10n callVoiceWithUser:peerDisplayName];
callerNameLabel.text = [VectorL10n callVoiceWithUser:peerDisplayName];
}
}
@@ -641,8 +641,8 @@ static const CGFloat kLocalPreviewMargin = 20;
NSString *appDisplayName = [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleDisplayName"];
[MXKTools checkAccessForCall:mxCall.isVideoCall
manualChangeMessageForAudio:[MatrixKitL10n microphoneAccessNotGrantedForCall:appDisplayName]
manualChangeMessageForVideo:[MatrixKitL10n cameraAccessNotGrantedForCall:appDisplayName]
manualChangeMessageForAudio:[VectorL10n microphoneAccessNotGrantedForCall:appDisplayName]
manualChangeMessageForVideo:[VectorL10n cameraAccessNotGrantedForCall:appDisplayName]
showPopUpInViewController:self completionHandler:^(BOOL granted) {
if (granted)
@@ -687,7 +687,7 @@ static const CGFloat kLocalPreviewMargin = 20;
if (self.speakerButton == nil)
{
// audio device action
UIAlertAction *audioDeviceAction = [UIAlertAction actionWithTitle:[MatrixKitL10n callMoreActionsChangeAudioDevice]
UIAlertAction *audioDeviceAction = [UIAlertAction actionWithTitle:[VectorL10n callMoreActionsChangeAudioDevice]
style:UIAlertActionStyleDefault
handler:^(UIAlertAction * action) {
@@ -705,7 +705,7 @@ static const CGFloat kLocalPreviewMargin = 20;
// check the call can send DTMF tones
if (self.mxCall.supportsDTMF)
{
UIAlertAction *dialpadAction = [UIAlertAction actionWithTitle:[MatrixKitL10n callMoreActionsDialpad]
UIAlertAction *dialpadAction = [UIAlertAction actionWithTitle:[VectorL10n callMoreActionsDialpad]
style:UIAlertActionStyleDefault
handler:^(UIAlertAction * action) {
@@ -721,7 +721,7 @@ static const CGFloat kLocalPreviewMargin = 20;
// check the call be holded/unholded
if (mxCall.supportsHolding)
{
NSString *actionLocKey = (mxCall.state == MXCallStateOnHold) ? [MatrixKitL10n callMoreActionsUnhold] : [MatrixKitL10n callMoreActionsHold];
NSString *actionLocKey = (mxCall.state == MXCallStateOnHold) ? [VectorL10n callMoreActionsUnhold] : [VectorL10n callMoreActionsHold];
UIAlertAction *holdAction = [UIAlertAction actionWithTitle:actionLocKey
style:UIAlertActionStyleDefault
@@ -739,7 +739,7 @@ static const CGFloat kLocalPreviewMargin = 20;
// check the call be transferred
if (mxCall.supportsTransferring && self.peer)
{
UIAlertAction *transferAction = [UIAlertAction actionWithTitle:[MatrixKitL10n callMoreActionsTransfer]
UIAlertAction *transferAction = [UIAlertAction actionWithTitle:[VectorL10n callMoreActionsTransfer]
style:UIAlertActionStyleDefault
handler:^(UIAlertAction * action) {
@@ -765,7 +765,7 @@ static const CGFloat kLocalPreviewMargin = 20;
}];
// add cancel action always
[currentAlert addAction:[UIAlertAction actionWithTitle:[MatrixKitL10n cancel]
[currentAlert addAction:[UIAlertAction actionWithTitle:[VectorL10n cancel]
style:UIAlertActionStyleCancel
handler:^(UIAlertAction * action) {
@@ -833,7 +833,7 @@ static const CGFloat kLocalPreviewMargin = 20;
NSString *name = route.name;
if (route.routeType == MXiOSAudioOutputRouteTypeLoudSpeakers)
{
name = [MatrixKitL10n callMoreActionsAudioUseDevice];
name = [VectorL10n callMoreActionsAudioUseDevice];
}
MXWeakify(self);
UIAlertAction *routeAction = [UIAlertAction actionWithTitle:name
@@ -863,7 +863,7 @@ static const CGFloat kLocalPreviewMargin = 20;
// add cancel action
MXWeakify(self);
[currentAlert addAction:[UIAlertAction actionWithTitle:[MatrixKitL10n cancel]
[currentAlert addAction:[UIAlertAction actionWithTitle:[VectorL10n cancel]
style:UIAlertActionStyleCancel
handler:^(UIAlertAction * action) {
@@ -911,7 +911,7 @@ static const CGFloat kLocalPreviewMargin = 20;
{
case MXCallStateFledgling:
self.isRinging = NO;
callStatusLabel.text = [MatrixKitL10n callConnecting];
callStatusLabel.text = [VectorL10n callConnecting];
break;
case MXCallStateWaitLocalMedia:
self.isRinging = NO;
@@ -934,12 +934,12 @@ static const CGFloat kLocalPreviewMargin = 20;
self.isRinging = YES;
}
callStatusLabel.text = [MatrixKitL10n callConnecting];
callStatusLabel.text = [VectorL10n callConnecting];
break;
}
case MXCallStateInviteSent:
{
callStatusLabel.text = [MatrixKitL10n callRinging];
callStatusLabel.text = [VectorL10n callRinging];
break;
}
case MXCallStateRinging:
@@ -947,11 +947,11 @@ static const CGFloat kLocalPreviewMargin = 20;
[self configureSpeakerButton];
if (call.isVideoCall)
{
callStatusLabel.text = [MatrixKitL10n incomingVideoCall];
callStatusLabel.text = [VectorL10n incomingVideoCall];
}
else
{
callStatusLabel.text = [MatrixKitL10n incomingVoiceCall];
callStatusLabel.text = [VectorL10n incomingVoiceCall];
}
// Update bottom bar
endCallButton.hidden = YES;
@@ -1008,7 +1008,7 @@ static const CGFloat kLocalPreviewMargin = 20;
break;
case MXCallStateOnHold:
callStatusLabel.text = [MatrixKitL10n callHolded];
callStatusLabel.text = [VectorL10n callHolded];
break;
case MXCallStateRemotelyOnHold:
@@ -1017,20 +1017,20 @@ static const CGFloat kLocalPreviewMargin = 20;
speakerButton.enabled = NO;
cameraSwitchButton.enabled = NO;
self.moreButton.enabled = NO;
callStatusLabel.text = [MatrixKitL10n callRemoteHolded:peerDisplayName];
callStatusLabel.text = [VectorL10n callRemoteHolded:peerDisplayName];
break;
case MXCallStateInviteExpired:
// MXCallStateInviteExpired state is sent as an notification
// MXCall will move quickly to the MXCallStateEnded state
self.isRinging = NO;
callStatusLabel.text = [MatrixKitL10n callInviteExpired];
callStatusLabel.text = [VectorL10n callInviteExpired];
break;
case MXCallStateEnded:
{
self.isRinging = NO;
callStatusLabel.text = [MatrixKitL10n callEnded];
callStatusLabel.text = [VectorL10n callEnded];
NSString *soundName = [self soundNameForCallEnding];
if (soundName)
@@ -1068,18 +1068,18 @@ static const CGFloat kLocalPreviewMargin = 20;
NSString *title = [error.userInfo valueForKey:NSLocalizedFailureReasonErrorKey];
if (!title)
{
title = [MatrixKitL10n error];
title = [VectorL10n error];
}
NSString *msg = [error.userInfo valueForKey:NSLocalizedDescriptionKey];
if (!msg)
{
msg = [MatrixKitL10n errorCommonMessage];
msg = [VectorL10n errorCommonMessage];
}
MXWeakify(self);
errorAlert = [UIAlertController alertControllerWithTitle:title message:msg preferredStyle:UIAlertControllerStyleAlert];
[errorAlert addAction:[UIAlertAction actionWithTitle:[MatrixKitL10n ok]
[errorAlert addAction:[UIAlertAction actionWithTitle:[VectorL10n ok]
style:UIAlertActionStyleDefault
handler:^(UIAlertAction * action) {
@@ -1102,7 +1102,7 @@ static const CGFloat kLocalPreviewMargin = 20;
if (call.isConsulting)
{
NSString *title = [MatrixKitL10n callTransferToUser:call.transferee.displayname];
NSString *title = [VectorL10n callTransferToUser:call.transferee.displayname];
[_transferButton setTitle:title forState:UIControlStateNormal];
_transferButton.hidden = call.state != MXCallStateConnected;
}
@@ -1132,11 +1132,11 @@ static const CGFloat kLocalPreviewMargin = 20;
if (mxCall.isVideoCall)
{
callerNameLabel.text = [MatrixKitL10n callVideoWithUser:peerDisplayName];
callerNameLabel.text = [VectorL10n callVideoWithUser:peerDisplayName];
}
else
{
callerNameLabel.text = [MatrixKitL10n callVoiceWithUser:peerDisplayName];
callerNameLabel.text = [VectorL10n callVoiceWithUser:peerDisplayName];
}
if (peerAvatarURL)
@@ -152,8 +152,8 @@
cell.mxkLabel.text = @"";
}
[cell.mxkButton setTitle:[MatrixKitL10n startChat] forState:UIControlStateNormal];
[cell.mxkButton setTitle:[MatrixKitL10n startChat] forState:UIControlStateHighlighted];
[cell.mxkButton setTitle:[VectorL10n startChat] forState:UIControlStateNormal];
[cell.mxkButton setTitle:[VectorL10n startChat] forState:UIControlStateHighlighted];
cell.mxkButton.tag = row;
[cell.mxkButton addTarget:self action:@selector(startChat:) forControlEvents:UIControlEventTouchUpInside];
@@ -117,8 +117,8 @@
}
// Localize string
[_contactsControls setTitle:[MatrixKitL10n contactMxUsers] forSegmentAtIndex:0];
[_contactsControls setTitle:[MatrixKitL10n contactLocalContacts] forSegmentAtIndex:1];
[_contactsControls setTitle:[VectorL10n contactMxUsers] forSegmentAtIndex:0];
[_contactsControls setTitle:[VectorL10n contactLocalContacts] forSegmentAtIndex:1];
// Apply search option in navigation bar
self.enableBarButtonSearch = _enableBarButtonSearch;
@@ -109,7 +109,7 @@ NSString* const kMXKCountryPickerViewControllerCountryCellId = @"kMXKCountryPick
[[[self class] nib] instantiateWithOwner:self options:nil];
}
self.navigationItem.title = [MatrixKitL10n countryPickerTitle];
self.navigationItem.title = [VectorL10n countryPickerTitle];
[self setupSearchController];
}
@@ -84,7 +84,7 @@ NSString* const kMXKLanguagePickerCellDataKeyLanguage = @"language";
// Populate cellDataArray
// Start by the default language chosen by the OS
NSString *defaultLanguage = [MXKLanguagePickerViewController defaultLanguage];
NSString *languageDescription = [MatrixKitL10n languagePickerDefaultLanguage:[MXKLanguagePickerViewController languageDescription:defaultLanguage]];
NSString *languageDescription = [VectorL10n languagePickerDefaultLanguage:[MXKLanguagePickerViewController languageDescription:defaultLanguage]];
[cellDataArray addObject:@{
kMXKLanguagePickerCellDataKeyText:languageDescription
@@ -143,7 +143,7 @@ NSString* const kMXKLanguagePickerCellDataKeyLanguage = @"language";
[self setupSearchController];
self.navigationItem.title = [MatrixKitL10n languagePickerTitle];
self.navigationItem.title = [VectorL10n languagePickerTitle];
}
@@ -317,13 +317,13 @@
if (areAllDisabled)
{
[masterBtnCell.mxkButton setTitle:[MatrixKitL10n notificationSettingsEnableNotifications] forState:UIControlStateNormal];
[masterBtnCell.mxkButton setTitle:[MatrixKitL10n notificationSettingsEnableNotifications] forState:UIControlStateHighlighted];
[masterBtnCell.mxkButton setTitle:[VectorL10n notificationSettingsEnableNotifications] forState:UIControlStateNormal];
[masterBtnCell.mxkButton setTitle:[VectorL10n notificationSettingsEnableNotifications] forState:UIControlStateHighlighted];
}
else
{
[masterBtnCell.mxkButton setTitle:[MatrixKitL10n notificationSettingsDisableAll] forState:UIControlStateNormal];
[masterBtnCell.mxkButton setTitle:[MatrixKitL10n notificationSettingsDisableAll] forState:UIControlStateHighlighted];
[masterBtnCell.mxkButton setTitle:[VectorL10n notificationSettingsDisableAll] forState:UIControlStateNormal];
[masterBtnCell.mxkButton setTitle:[VectorL10n notificationSettingsDisableAll] forState:UIControlStateHighlighted];
}
[masterBtnCell.mxkButton addTarget:self action:@selector(onButtonPressed:) forControlEvents:UIControlEventTouchUpInside];
@@ -342,12 +342,12 @@
if (areAllDisabled)
{
introCell.mxkTextView.text = [MatrixKitL10n notificationSettingsEnableNotificationsWarning];
introCell.mxkTextView.text = [VectorL10n notificationSettingsEnableNotificationsWarning];
introCell.mxkTextView.backgroundColor = [UIColor redColor];
}
else
{
introCell.mxkTextView.text = [MatrixKitL10n notificationSettingsGlobalInfo];
introCell.mxkTextView.text = [VectorL10n notificationSettingsGlobalInfo];
introCell.mxkTextView.backgroundColor = [UIColor clearColor];
}
@@ -365,7 +365,7 @@
{
introCell = [[MXKTableViewCellWithTextView alloc] init];
}
introCell.mxkTextView.text = [MatrixKitL10n notificationSettingsPerWordInfo];
introCell.mxkTextView.text = [VectorL10n notificationSettingsPerWordInfo];
introCell.mxkTextView.font = [UIFont systemFontOfSize:14];
cell = introCell;
@@ -474,37 +474,37 @@
if (rowIndex == ruleContainsUserNameIndex)
{
pushRule = [_mxAccount.mxSession.notificationCenter ruleById:kMXNotificationCenterContainUserNameRuleID];
ruleDescription = [MatrixKitL10n notificationSettingsContainMyUserName];
ruleDescription = [VectorL10n notificationSettingsContainMyUserName];
}
if (rowIndex == ruleContainsDisplayNameIndex)
{
pushRule = [_mxAccount.mxSession.notificationCenter ruleById:kMXNotificationCenterContainDisplayNameRuleID];
ruleDescription = [MatrixKitL10n notificationSettingsContainMyDisplayName];
ruleDescription = [VectorL10n notificationSettingsContainMyDisplayName];
}
if (rowIndex == ruleOneToOneRoomIndex)
{
pushRule = [_mxAccount.mxSession.notificationCenter ruleById:kMXNotificationCenterOneToOneRoomRuleID];
ruleDescription = [MatrixKitL10n notificationSettingsJustSentToMe];
ruleDescription = [VectorL10n notificationSettingsJustSentToMe];
}
if (rowIndex == ruleInviteForMeIndex)
{
pushRule = [_mxAccount.mxSession.notificationCenter ruleById:kMXNotificationCenterInviteMeRuleID];
ruleDescription = [MatrixKitL10n notificationSettingsInviteToANewRoom];
ruleDescription = [VectorL10n notificationSettingsInviteToANewRoom];
}
if (rowIndex == ruleMemberEventIndex)
{
pushRule = [_mxAccount.mxSession.notificationCenter ruleById:kMXNotificationCenterMemberEventRuleID];
ruleDescription = [MatrixKitL10n notificationSettingsPeopleJoinLeaveRooms];
ruleDescription = [VectorL10n notificationSettingsPeopleJoinLeaveRooms];
}
if (rowIndex == ruleCallIndex)
{
pushRule = [_mxAccount.mxSession.notificationCenter ruleById:kMXNotificationCenterCallRuleID];
ruleDescription = [MatrixKitL10n notificationSettingsReceiveACall];
ruleDescription = [VectorL10n notificationSettingsReceiveACall];
}
if (rowIndex == ruleSuppressBotsNotificationsIndex)
{
pushRule = [_mxAccount.mxSession.notificationCenter ruleById:kMXNotificationCenterSuppressBotsNotificationsRuleID];
ruleDescription = [MatrixKitL10n notificationSettingsSuppressFromBots];
ruleDescription = [VectorL10n notificationSettingsSuppressFromBots];
}
if (pushRule)
@@ -536,7 +536,7 @@
pushRuleCell.mxSession = _mxAccount.mxSession;
pushRuleCell.mxPushRule = pushRule;
pushRuleCell.ruleDescription.text = [MatrixKitL10n notificationSettingsNotifyAllOther];
pushRuleCell.ruleDescription.text = [VectorL10n notificationSettingsNotifyAllOther];
cell = pushRuleCell;
}
@@ -558,7 +558,7 @@
{
UITextView *textView = [[UITextView alloc] initWithFrame:CGRectMake(0, 0, tableView.frame.size.width, MAXFLOAT)];
textView.font = [UIFont systemFontOfSize:14];
textView.text = areAllDisabled ? [MatrixKitL10n notificationSettingsEnableNotificationsWarning] : [MatrixKitL10n notificationSettingsGlobalInfo];
textView.text = areAllDisabled ? [VectorL10n notificationSettingsEnableNotificationsWarning] : [VectorL10n notificationSettingsGlobalInfo];
CGSize contentSize = [textView sizeThatFits:textView.frame.size];
return contentSize.height + 1;
}
@@ -569,7 +569,7 @@
{
UITextView *textView = [[UITextView alloc] initWithFrame:CGRectMake(0, 0, tableView.frame.size.width, MAXFLOAT)];
textView.font = [UIFont systemFontOfSize:14];
textView.text = [MatrixKitL10n notificationSettingsPerWordInfo];
textView.text = [VectorL10n notificationSettingsPerWordInfo];
CGSize contentSize = [textView sizeThatFits:textView.frame.size];
return contentSize.height + 1;
}
@@ -612,23 +612,23 @@
if (section == MXKNOTIFICATIONSETTINGS_SECTION_PER_WORD_INDEX)
{
sectionLabel.text = [MatrixKitL10n notificationSettingsPerWordNotifications];
sectionLabel.text = [VectorL10n notificationSettingsPerWordNotifications];
}
else if (section == MXKNOTIFICATIONSETTINGS_SECTION_PER_ROOM_INDEX)
{
sectionLabel.text = [MatrixKitL10n notificationSettingsPerRoomNotifications];
sectionLabel.text = [VectorL10n notificationSettingsPerRoomNotifications];
}
else if (section == MXKNOTIFICATIONSETTINGS_SECTION_PER_SENDER_INDEX)
{
sectionLabel.text = [MatrixKitL10n notificationSettingsPerSenderNotifications];
sectionLabel.text = [VectorL10n notificationSettingsPerSenderNotifications];
}
else if (section == MXKNOTIFICATIONSETTINGS_SECTION_OTHERS_INDEX)
{
sectionLabel.text = [MatrixKitL10n notificationSettingsOtherAlerts];
sectionLabel.text = [VectorL10n notificationSettingsOtherAlerts];
}
else if (section == MXKNOTIFICATIONSETTINGS_SECTION_DEFAULT_INDEX)
{
sectionLabel.text = [MatrixKitL10n notificationSettingsByDefault];
sectionLabel.text = [VectorL10n notificationSettingsByDefault];
}
return sectionHeader;
@@ -320,9 +320,9 @@
[currentAlert dismissViewControllerAnimated:NO completion:nil];
}
currentAlert = [UIAlertController alertControllerWithTitle:[MatrixKitL10n roomMemberIgnorePrompt] message:nil preferredStyle:UIAlertControllerStyleAlert];
currentAlert = [UIAlertController alertControllerWithTitle:[VectorL10n roomMemberIgnorePrompt] message:nil preferredStyle:UIAlertControllerStyleAlert];
[currentAlert addAction:[UIAlertAction actionWithTitle:[MatrixKitL10n yes]
[currentAlert addAction:[UIAlertAction actionWithTitle:[VectorL10n yes]
style:UIAlertActionStyleDefault
handler:^(UIAlertAction * action) {
@@ -357,7 +357,7 @@
}]];
[currentAlert addAction:[UIAlertAction actionWithTitle:[MatrixKitL10n no]
[currentAlert addAction:[UIAlertAction actionWithTitle:[VectorL10n no]
style:UIAlertActionStyleDefault
handler:^(UIAlertAction * action) {
@@ -768,49 +768,49 @@
switch (action)
{
case MXKRoomMemberDetailsActionInvite:
title = [MatrixKitL10n invite];
title = [VectorL10n invite];
break;
case MXKRoomMemberDetailsActionLeave:
title = [MatrixKitL10n leave];
title = [VectorL10n leave];
break;
case MXKRoomMemberDetailsActionKick:
title = [MatrixKitL10n kick];
title = [VectorL10n kick];
break;
case MXKRoomMemberDetailsActionBan:
title = [MatrixKitL10n ban];
title = [VectorL10n ban];
break;
case MXKRoomMemberDetailsActionUnban:
title = [MatrixKitL10n unban];
title = [VectorL10n unban];
break;
case MXKRoomMemberDetailsActionIgnore:
title = [MatrixKitL10n ignore];
title = [VectorL10n ignore];
break;
case MXKRoomMemberDetailsActionUnignore:
title = [MatrixKitL10n unignore];
title = [VectorL10n unignore];
break;
case MXKRoomMemberDetailsActionSetDefaultPowerLevel:
title = [MatrixKitL10n setDefaultPowerLevel];
title = [VectorL10n setDefaultPowerLevel];
break;
case MXKRoomMemberDetailsActionSetModerator:
title = [MatrixKitL10n setModerator];
title = [VectorL10n setModerator];
break;
case MXKRoomMemberDetailsActionSetAdmin:
title = [MatrixKitL10n setAdmin];
title = [VectorL10n setAdmin];
break;
case MXKRoomMemberDetailsActionSetCustomPowerLevel:
title = [MatrixKitL10n setPowerLevel];
title = [VectorL10n setPowerLevel];
break;
case MXKRoomMemberDetailsActionStartChat:
title = [MatrixKitL10n startChat];
title = [VectorL10n startChat];
break;
case MXKRoomMemberDetailsActionStartVoiceCall:
title = [MatrixKitL10n startVoiceCall];
title = [VectorL10n startVoiceCall];
break;
case MXKRoomMemberDetailsActionStartVideoCall:
title = [MatrixKitL10n startVideoCall];
title = [VectorL10n startVideoCall];
break;
case MXKRoomMemberDetailsActionMention:
title = [MatrixKitL10n mention];
title = [VectorL10n mention];
break;
default:
break;
@@ -918,9 +918,9 @@
[currentAlert dismissViewControllerAnimated:NO completion:nil];
}
currentAlert = [UIAlertController alertControllerWithTitle:[MatrixKitL10n roomMemberPowerLevelPrompt] message:nil preferredStyle:UIAlertControllerStyleAlert];
currentAlert = [UIAlertController alertControllerWithTitle:[VectorL10n roomMemberPowerLevelPrompt] message:nil preferredStyle:UIAlertControllerStyleAlert];
[currentAlert addAction:[UIAlertAction actionWithTitle:[MatrixKitL10n no]
[currentAlert addAction:[UIAlertAction actionWithTitle:[VectorL10n no]
style:UIAlertActionStyleDefault
handler:^(UIAlertAction * action) {
@@ -932,7 +932,7 @@
}]];
[currentAlert addAction:[UIAlertAction actionWithTitle:[MatrixKitL10n yes]
[currentAlert addAction:[UIAlertAction actionWithTitle:[VectorL10n yes]
style:UIAlertActionStyleDefault
handler:^(UIAlertAction * action) {
@@ -983,12 +983,12 @@
[currentAlert dismissViewControllerAnimated:NO completion:nil];
}
currentAlert = [UIAlertController alertControllerWithTitle:[MatrixKitL10n powerLevel] message:nil preferredStyle:UIAlertControllerStyleAlert];
currentAlert = [UIAlertController alertControllerWithTitle:[VectorL10n powerLevel] message:nil preferredStyle:UIAlertControllerStyleAlert];
if (![self.mainSession.myUser.userId isEqualToString:_mxRoomMember.userId])
{
[currentAlert addAction:[UIAlertAction actionWithTitle:[MatrixKitL10n resetToDefault]
[currentAlert addAction:[UIAlertAction actionWithTitle:[VectorL10n resetToDefault]
style:UIAlertActionStyleDefault
handler:^(UIAlertAction * action) {
@@ -1013,7 +1013,7 @@
textField.keyboardType = UIKeyboardTypeDecimalPad;
}];
[currentAlert addAction:[UIAlertAction actionWithTitle:[MatrixKitL10n ok]
[currentAlert addAction:[UIAlertAction actionWithTitle:[VectorL10n ok]
style:UIAlertActionStyleDefault
handler:^(UIAlertAction * action) {
@@ -516,10 +516,10 @@
}
// Ask for userId to invite
currentAlert = [UIAlertController alertControllerWithTitle:[MatrixKitL10n userIdTitle] message:nil preferredStyle:UIAlertControllerStyleAlert];
currentAlert = [UIAlertController alertControllerWithTitle:[VectorL10n userIdTitle] message:nil preferredStyle:UIAlertControllerStyleAlert];
[currentAlert addAction:[UIAlertAction actionWithTitle:[MatrixKitL10n cancel]
[currentAlert addAction:[UIAlertAction actionWithTitle:[VectorL10n cancel]
style:UIAlertActionStyleDefault
handler:^(UIAlertAction * action) {
@@ -535,10 +535,10 @@
[currentAlert addTextFieldWithConfigurationHandler:^(UITextField *textField)
{
textField.secureTextEntry = NO;
textField.placeholder = [MatrixKitL10n userIdPlaceholder];
textField.placeholder = [VectorL10n userIdPlaceholder];
}];
[currentAlert addAction:[UIAlertAction actionWithTitle:[MatrixKitL10n invite]
[currentAlert addAction:[UIAlertAction actionWithTitle:[VectorL10n invite]
style:UIAlertActionStyleDefault
handler:^(UIAlertAction * action) {
@@ -182,7 +182,7 @@
}];
}
self.title = [MatrixKitL10n roomDetailsTitle];
self.title = [VectorL10n roomDetailsTitle];
}
- (void)refreshRoomSettings
@@ -102,7 +102,7 @@
self.searchSearchBarHeightConstraint.constant = 0;
[self.view setNeedsUpdateConstraints];
self.noResultsLabel.text = [MatrixKitL10n searchNoResults];
self.noResultsLabel.text = [VectorL10n searchNoResults];
self.noResultsLabel.hidden = YES;
searchBarButton = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemSearch target:self action:@selector(showSearchBar:)];
@@ -154,7 +154,7 @@ NSString *const kMXKWebViewViewControllerJavaScriptEnableLog =
[NSLayoutConstraint activateConstraints:@[leftConstraint, rightConstraint, topConstraint, bottomConstraint]];
backButton = [[UIBarButtonItem alloc] initWithTitle:[MatrixKitL10n back] style:UIBarButtonItemStylePlain target:self action:@selector(goBack)];
backButton = [[UIBarButtonItem alloc] initWithTitle:[VectorL10n back] style:UIBarButtonItemStylePlain target:self action:@selector(goBack)];
if (_URL.length)
{
@@ -346,7 +346,7 @@ static NSArray<NSNumber*> *initialSyncSilentErrorsHTTPStatusCodes;
code:0
userInfo:@{
NSLocalizedDescriptionKey:
[MatrixKitL10n accountErrorPushNotAllowed]
[VectorL10n accountErrorPushNotAllowed]
}];
if (failure)
{
@@ -423,7 +423,7 @@ static NSArray<NSNumber*> *initialSyncSilentErrorsHTTPStatusCodes;
code:0
userInfo:@{
NSLocalizedDescriptionKey:
[MatrixKitL10n accountErrorPushNotAllowed]
[VectorL10n accountErrorPushNotAllowed]
}];
failure (error);
}
@@ -558,7 +558,7 @@ static NSArray<NSNumber*> *initialSyncSilentErrorsHTTPStatusCodes;
}
else if (failure)
{
failure ([NSError errorWithDomain:kMXKAccountErrorDomain code:0 userInfo:@{NSLocalizedDescriptionKey: [MatrixKitL10n accountErrorMatrixSessionIsNotOpened]}]);
failure ([NSError errorWithDomain:kMXKAccountErrorDomain code:0 userInfo:@{NSLocalizedDescriptionKey: [VectorL10n accountErrorMatrixSessionIsNotOpened]}]);
}
}
@@ -578,7 +578,7 @@ static NSArray<NSNumber*> *initialSyncSilentErrorsHTTPStatusCodes;
}
else if (failure)
{
failure ([NSError errorWithDomain:kMXKAccountErrorDomain code:0 userInfo:@{NSLocalizedDescriptionKey: [MatrixKitL10n accountErrorMatrixSessionIsNotOpened]}]);
failure ([NSError errorWithDomain:kMXKAccountErrorDomain code:0 userInfo:@{NSLocalizedDescriptionKey: [VectorL10n accountErrorMatrixSessionIsNotOpened]}]);
}
}
@@ -599,7 +599,7 @@ static NSArray<NSNumber*> *initialSyncSilentErrorsHTTPStatusCodes;
}
else if (failure)
{
failure ([NSError errorWithDomain:kMXKAccountErrorDomain code:0 userInfo:@{NSLocalizedDescriptionKey: [MatrixKitL10n accountErrorMatrixSessionIsNotOpened]}]);
failure ([NSError errorWithDomain:kMXKAccountErrorDomain code:0 userInfo:@{NSLocalizedDescriptionKey: [VectorL10n accountErrorMatrixSessionIsNotOpened]}]);
}
}
@@ -1176,9 +1176,9 @@ NSString *const MXKContactManagerDataType = @"org.matrix.kit.MXKContactManagerDa
{
NSString *appDisplayName = [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleDisplayName"];
[MXKContactManager requestUserConfirmationForLocalContactsSyncWithTitle:[MatrixKitL10n localContactsAccessDiscoveryWarningTitle]
message:[MatrixKitL10n localContactsAccessDiscoveryWarning:appDisplayName]
manualPermissionChangeMessage:[MatrixKitL10n localContactsAccessNotGranted:appDisplayName]
[MXKContactManager requestUserConfirmationForLocalContactsSyncWithTitle:[VectorL10n localContactsAccessDiscoveryWarningTitle]
message:[VectorL10n localContactsAccessDiscoveryWarning:appDisplayName]
manualPermissionChangeMessage:[VectorL10n localContactsAccessNotGranted:appDisplayName]
showPopUpInViewController:viewController
completionHandler:handler];
}
@@ -1197,7 +1197,7 @@ NSString *const MXKContactManagerDataType = @"org.matrix.kit.MXKContactManagerDa
{
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 * action) {
@@ -1208,7 +1208,7 @@ NSString *const MXKContactManagerDataType = @"org.matrix.kit.MXKContactManagerDa
}]];
[alert addAction:[UIAlertAction actionWithTitle:[MatrixKitL10n cancel]
[alert addAction:[UIAlertAction actionWithTitle:[VectorL10n cancel]
style:UIAlertActionStyleDefault
handler:^(UIAlertAction * action) {
@@ -514,11 +514,11 @@ NSString *const kMXKGroupCellIdentifier = @"kMXKGroupCellIdentifier";
if (section == _groupInvitesSection)
{
sectionTitle = [MatrixKitL10n groupInviteSection];
sectionTitle = [VectorL10n groupInviteSection];
}
else if (section == _joinedGroupsSection)
{
sectionTitle = [MatrixKitL10n groupSection];
sectionTitle = [VectorL10n groupSection];
}
return sectionTitle;
@@ -43,7 +43,7 @@
else
{
// Use the Matrix name and logo when looking for Matrix rooms only
desc = [MatrixKitL10n matrix];
desc = [VectorL10n matrix];
icon = [NSBundle mxk_imageFromMXKAssetsBundleWithName:@"network_matrix"];
}
}
@@ -22,37 +22,37 @@
- (NSString *)senderSentAnImage
{
return [MatrixKitL10n messageReplyToSenderSentAnImage];
return [VectorL10n messageReplyToSenderSentAnImage];
}
- (NSString *)senderSentAVideo
{
return [MatrixKitL10n messageReplyToSenderSentAVideo];
return [VectorL10n messageReplyToSenderSentAVideo];
}
- (NSString *)senderSentAnAudioFile
{
return [MatrixKitL10n messageReplyToSenderSentAnAudioFile];
return [VectorL10n messageReplyToSenderSentAnAudioFile];
}
- (NSString *)senderSentAVoiceMessage
{
return [MatrixKitL10n messageReplyToSenderSentAVoiceMessage];
return [VectorL10n messageReplyToSenderSentAVoiceMessage];
}
- (NSString *)senderSentAFile
{
return [MatrixKitL10n messageReplyToSenderSentAFile];
return [VectorL10n messageReplyToSenderSentAFile];
}
- (NSString *)senderSentTheirLocation
{
return [MatrixKitL10n messageReplyToSenderSentTheirLocation];
return [VectorL10n messageReplyToSenderSentTheirLocation];
}
- (NSString *)messageToReplyToPrefix
{
return [MatrixKitL10n messageReplyToMessageToReplyToPrefix];
return [VectorL10n messageReplyToMessageToReplyToPrefix];
}
@end
@@ -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;
@@ -32,11 +32,11 @@
{
[super awakeFromNib];
_userLoginTextField.placeholder = [MatrixKitL10n loginUserIdPlaceholder];
_emailAndTokenTextField.placeholder = [MatrixKitL10n loginEmailPlaceholder];
_promptEmailTokenLabel.text = [MatrixKitL10n loginPromptEmailToken];
_userLoginTextField.placeholder = [VectorL10n loginUserIdPlaceholder];
_emailAndTokenTextField.placeholder = [VectorL10n loginEmailPlaceholder];
_promptEmailTokenLabel.text = [VectorL10n loginPromptEmailToken];
_displayNameTextField.placeholder = [MatrixKitL10n loginDisplayNamePlaceholder];
_displayNameTextField.placeholder = [VectorL10n loginDisplayNamePlaceholder];
}
#pragma mark -
@@ -84,7 +84,7 @@
{
if (!self.areAllRequiredFieldsSet)
{
errorMsg = [MatrixKitL10n loginInvalidParam];
errorMsg = [VectorL10n loginInvalidParam];
}
}
@@ -37,12 +37,12 @@
{
[super awakeFromNib];
_userLoginTextField.placeholder = [MatrixKitL10n loginUserIdPlaceholder];
_passWordTextField.placeholder = [MatrixKitL10n loginPasswordPlaceholder];
_emailTextField.placeholder = [NSString stringWithFormat:@"%@ (%@)", [MatrixKitL10n loginEmailPlaceholder], [MatrixKitL10n loginOptionalField]];
_emailInfoLabel.text = [MatrixKitL10n loginEmailInfo];
_userLoginTextField.placeholder = [VectorL10n loginUserIdPlaceholder];
_passWordTextField.placeholder = [VectorL10n loginPasswordPlaceholder];
_emailTextField.placeholder = [NSString stringWithFormat:@"%@ (%@)", [VectorL10n loginEmailPlaceholder], [VectorL10n loginOptionalField]];
_emailInfoLabel.text = [VectorL10n loginEmailInfo];
_displayNameTextField.placeholder = [MatrixKitL10n loginDisplayNamePlaceholder];
_displayNameTextField.placeholder = [VectorL10n loginDisplayNamePlaceholder];
}
#pragma mark -
@@ -91,7 +91,7 @@
// Check user login and pass fields
if (!self.areAllRequiredFieldsSet)
{
errorMsg = [MatrixKitL10n loginInvalidParam];
errorMsg = [VectorL10n loginInvalidParam];
}
}
@@ -105,7 +105,7 @@
// Sanity check on required fields
if (!self.areAllRequiredFieldsSet)
{
callback(nil, [NSError errorWithDomain:MXKAuthErrorDomain code:0 userInfo:@{NSLocalizedDescriptionKey:[MatrixKitL10n loginInvalidParam]}]);
callback(nil, [NSError errorWithDomain:MXKAuthErrorDomain code:0 userInfo:@{NSLocalizedDescriptionKey:[VectorL10n loginInvalidParam]}]);
return;
}
@@ -87,7 +87,7 @@ NSString *const MXKAuthErrorDomain = @"MXKAuthErrorDomain";
// Do nothing by default
if (callback)
{
callback (nil, [NSError errorWithDomain:MXKAuthErrorDomain code:0 userInfo:@{NSLocalizedDescriptionKey:[MatrixKitL10n notSupportedYet]}]);
callback (nil, [NSError errorWithDomain:MXKAuthErrorDomain code:0 userInfo:@{NSLocalizedDescriptionKey:[VectorL10n notSupportedYet]}]);
}
}
@@ -96,7 +96,7 @@ NSString *const MXKAuthErrorDomain = @"MXKAuthErrorDomain";
// Do nothing by default
if (callback)
{
callback (nil, [NSError errorWithDomain:MXKAuthErrorDomain code:0 userInfo:@{NSLocalizedDescriptionKey:[MatrixKitL10n notSupportedYet]}]);
callback (nil, [NSError errorWithDomain:MXKAuthErrorDomain code:0 userInfo:@{NSLocalizedDescriptionKey:[VectorL10n notSupportedYet]}]);
}
}
@@ -77,14 +77,14 @@ static NSAttributedString *verticalWhitespace = nil;
[self.bgView addGestureRecognizer:tap];
// Localize string
[_cancelButton setTitle:[MatrixKitL10n ok] forState:UIControlStateNormal];
[_cancelButton setTitle:[MatrixKitL10n ok] forState:UIControlStateHighlighted];
[_cancelButton setTitle:[VectorL10n ok] forState:UIControlStateNormal];
[_cancelButton setTitle:[VectorL10n ok] forState:UIControlStateHighlighted];
[_renameButton setTitle:[MatrixKitL10n rename] forState:UIControlStateNormal];
[_renameButton setTitle:[MatrixKitL10n rename] forState:UIControlStateHighlighted];
[_renameButton setTitle:[VectorL10n rename] forState:UIControlStateNormal];
[_renameButton setTitle:[VectorL10n rename] forState:UIControlStateHighlighted];
[_deleteButton setTitle:[MatrixKitL10n delete] forState:UIControlStateNormal];
[_deleteButton setTitle:[MatrixKitL10n delete] forState:UIControlStateHighlighted];
[_deleteButton setTitle:[VectorL10n delete] forState:UIControlStateNormal];
[_deleteButton setTitle:[VectorL10n delete] forState:UIControlStateHighlighted];
}
- (void)layoutSubviews
@@ -149,13 +149,13 @@ static NSAttributedString *verticalWhitespace = nil;
{
// Device information
NSMutableAttributedString *deviceInformationString = [[NSMutableAttributedString alloc]
initWithString:[MatrixKitL10n deviceDetailsTitle]
initWithString:[VectorL10n deviceDetailsTitle]
attributes:@{NSForegroundColorAttributeName : _defaultTextColor,
NSFontAttributeName: [UIFont boldSystemFontOfSize:15]}];
[deviceInformationString appendAttributedString:[MXKDeviceView verticalWhitespace]];
[deviceInformationString appendAttributedString:[[NSMutableAttributedString alloc]
initWithString:[MatrixKitL10n deviceDetailsName]
initWithString:[VectorL10n deviceDetailsName]
attributes:@{NSForegroundColorAttributeName : _defaultTextColor,
NSFontAttributeName: [UIFont boldSystemFontOfSize:14]}]];
[deviceInformationString appendAttributedString:[[NSMutableAttributedString alloc]
@@ -165,7 +165,7 @@ static NSAttributedString *verticalWhitespace = nil;
[deviceInformationString appendAttributedString:[MXKDeviceView verticalWhitespace]];
[deviceInformationString appendAttributedString:[[NSMutableAttributedString alloc]
initWithString:[MatrixKitL10n deviceDetailsIdentifier]
initWithString:[VectorL10n deviceDetailsIdentifier]
attributes:@{NSForegroundColorAttributeName : _defaultTextColor,
NSFontAttributeName: [UIFont boldSystemFontOfSize:14]}]];
[deviceInformationString appendAttributedString:[[NSMutableAttributedString alloc]
@@ -175,7 +175,7 @@ static NSAttributedString *verticalWhitespace = nil;
[deviceInformationString appendAttributedString:[MXKDeviceView verticalWhitespace]];
[deviceInformationString appendAttributedString:[[NSMutableAttributedString alloc]
initWithString:[MatrixKitL10n deviceDetailsLastSeen]
initWithString:[VectorL10n deviceDetailsLastSeen]
attributes:@{NSForegroundColorAttributeName : _defaultTextColor,
NSFontAttributeName: [UIFont boldSystemFontOfSize:14]}]];
@@ -187,7 +187,7 @@ static NSAttributedString *verticalWhitespace = nil;
[dateFormatter setTimeStyle:NSDateFormatterShortStyle];
[dateFormatter setFormatterBehavior:NSDateFormatterBehavior10_4];
NSString *lastSeen = [MatrixKitL10n deviceDetailsLastSeenFormat:device.lastSeenIp :[dateFormatter stringFromDate:lastSeenDate]];
NSString *lastSeen = [VectorL10n deviceDetailsLastSeenFormat:device.lastSeenIp :[dateFormatter stringFromDate:lastSeenDate]];
[deviceInformationString appendAttributedString:[[NSMutableAttributedString alloc]
initWithString:lastSeen
@@ -262,8 +262,8 @@ static NSAttributedString *verticalWhitespace = nil;
[currentAlert dismissViewControllerAnimated:NO completion:nil];
__weak typeof(self) weakSelf = self;
currentAlert = [UIAlertController alertControllerWithTitle:[MatrixKitL10n deviceDetailsRenamePromptTitle]
message:[MatrixKitL10n deviceDetailsRenamePromptMessage] preferredStyle:UIAlertControllerStyleAlert];
currentAlert = [UIAlertController alertControllerWithTitle:[VectorL10n deviceDetailsRenamePromptTitle]
message:[VectorL10n deviceDetailsRenamePromptMessage] preferredStyle:UIAlertControllerStyleAlert];
[currentAlert addTextFieldWithConfigurationHandler:^(UITextField *textField) {
@@ -277,7 +277,7 @@ static NSAttributedString *verticalWhitespace = nil;
}
}];
[currentAlert addAction:[UIAlertAction actionWithTitle:[MatrixKitL10n cancel]
[currentAlert addAction:[UIAlertAction actionWithTitle:[VectorL10n cancel]
style:UIAlertActionStyleDefault
handler:^(UIAlertAction * action) {
@@ -289,7 +289,7 @@ static NSAttributedString *verticalWhitespace = nil;
}]];
[currentAlert addAction:[UIAlertAction actionWithTitle:[MatrixKitL10n ok]
[currentAlert addAction:[UIAlertAction actionWithTitle:[VectorL10n ok]
style:UIAlertActionStyleDefault
handler:^(UIAlertAction * action) {
@@ -375,7 +375,7 @@ static NSAttributedString *verticalWhitespace = nil;
__weak typeof(self) weakSelf = self;
// Prompt the user before deleting the device.
self->currentAlert = [UIAlertController alertControllerWithTitle:[MatrixKitL10n deviceDetailsDeletePromptTitle] message:[MatrixKitL10n deviceDetailsDeletePromptMessage] preferredStyle:UIAlertControllerStyleAlert];
self->currentAlert = [UIAlertController alertControllerWithTitle:[VectorL10n deviceDetailsDeletePromptTitle] message:[VectorL10n deviceDetailsDeletePromptMessage] preferredStyle:UIAlertControllerStyleAlert];
[self->currentAlert addTextFieldWithConfigurationHandler:^(UITextField *textField) {
@@ -385,7 +385,7 @@ static NSAttributedString *verticalWhitespace = nil;
textField.keyboardType = UIKeyboardTypeDefault;
}];
[self->currentAlert addAction:[UIAlertAction actionWithTitle:[MatrixKitL10n cancel]
[self->currentAlert addAction:[UIAlertAction actionWithTitle:[VectorL10n cancel]
style:UIAlertActionStyleDefault
handler:^(UIAlertAction * action) {
@@ -398,7 +398,7 @@ static NSAttributedString *verticalWhitespace = nil;
}]];
[self->currentAlert addAction:[UIAlertAction actionWithTitle:[MatrixKitL10n submit]
[self->currentAlert addAction:[UIAlertAction actionWithTitle:[VectorL10n submit]
style:UIAlertActionStyleDefault
handler:^(UIAlertAction * action) {
@@ -56,11 +56,11 @@ static NSAttributedString *verticalWhitespace = nil;
[super awakeFromNib];
// Localize string
[_cancelButton setTitle:[MatrixKitL10n ok] forState:UIControlStateNormal];
[_cancelButton setTitle:[MatrixKitL10n ok] forState:UIControlStateHighlighted];
[_cancelButton setTitle:[VectorL10n ok] forState:UIControlStateNormal];
[_cancelButton setTitle:[VectorL10n ok] forState:UIControlStateHighlighted];
[_confirmVerifyButton setTitle:[MatrixKitL10n roomEventEncryptionVerifyOk] forState:UIControlStateNormal];
[_confirmVerifyButton setTitle:[MatrixKitL10n roomEventEncryptionVerifyOk] forState:UIControlStateHighlighted];
[_confirmVerifyButton setTitle:[VectorL10n roomEventEncryptionVerifyOk] forState:UIControlStateNormal];
[_confirmVerifyButton setTitle:[VectorL10n roomEventEncryptionVerifyOk] forState:UIControlStateHighlighted];
}
- (void)layoutSubviews
@@ -140,7 +140,7 @@ static NSAttributedString *verticalWhitespace = nil;
{
// Prepare the text view content
NSMutableAttributedString *textViewAttributedString = [[NSMutableAttributedString alloc]
initWithString:[MatrixKitL10n roomEventEncryptionInfoTitle]
initWithString:[VectorL10n roomEventEncryptionInfoTitle]
attributes:@{NSForegroundColorAttributeName: _defaultTextColor,
NSFontAttributeName: [UIFont boldSystemFontOfSize:17]}];
@@ -183,7 +183,7 @@ static NSAttributedString *verticalWhitespace = nil;
// Event information
NSMutableAttributedString *eventInformationString = [[NSMutableAttributedString alloc]
initWithString:[MatrixKitL10n roomEventEncryptionInfoEvent]
initWithString:[VectorL10n roomEventEncryptionInfoEvent]
attributes:@{NSForegroundColorAttributeName: _defaultTextColor,
NSFontAttributeName: [UIFont boldSystemFontOfSize:15]}];
[eventInformationString appendAttributedString:[MXKEncryptionInfoView verticalWhitespace]];
@@ -201,23 +201,23 @@ static NSAttributedString *verticalWhitespace = nil;
if (!senderKey.length)
{
senderKey = [MatrixKitL10n roomEventEncryptionInfoEventNone];
senderKey = [VectorL10n roomEventEncryptionInfoEventNone];
}
if (!claimedKey.length)
{
claimedKey = [MatrixKitL10n roomEventEncryptionInfoEventNone];
claimedKey = [VectorL10n roomEventEncryptionInfoEventNone];
}
if (!algorithm.length)
{
algorithm = [MatrixKitL10n roomEventEncryptionInfoEventUnencrypted];
algorithm = [VectorL10n roomEventEncryptionInfoEventUnencrypted];
}
if (!sessionId.length)
{
sessionId = [MatrixKitL10n roomEventEncryptionInfoEventNone];
sessionId = [VectorL10n roomEventEncryptionInfoEventNone];
}
[eventInformationString appendAttributedString:[[NSMutableAttributedString alloc]
initWithString:[MatrixKitL10n roomEventEncryptionInfoEventUserId] attributes:@{NSForegroundColorAttributeName: _defaultTextColor,
initWithString:[VectorL10n roomEventEncryptionInfoEventUserId] attributes:@{NSForegroundColorAttributeName: _defaultTextColor,
NSFontAttributeName: [UIFont boldSystemFontOfSize:14]}]];
[eventInformationString appendAttributedString:[[NSMutableAttributedString alloc]
initWithString:senderId
@@ -226,7 +226,7 @@ static NSAttributedString *verticalWhitespace = nil;
[eventInformationString appendAttributedString:[MXKEncryptionInfoView verticalWhitespace]];
[eventInformationString appendAttributedString:[[NSMutableAttributedString alloc]
initWithString:[MatrixKitL10n roomEventEncryptionInfoEventIdentityKey]
initWithString:[VectorL10n roomEventEncryptionInfoEventIdentityKey]
attributes:@{NSForegroundColorAttributeName: _defaultTextColor,
NSFontAttributeName: [UIFont boldSystemFontOfSize:14]}]];
[eventInformationString appendAttributedString:[[NSMutableAttributedString alloc]
@@ -236,7 +236,7 @@ static NSAttributedString *verticalWhitespace = nil;
[eventInformationString appendAttributedString:[MXKEncryptionInfoView verticalWhitespace]];
[eventInformationString appendAttributedString:[[NSMutableAttributedString alloc]
initWithString:[MatrixKitL10n roomEventEncryptionInfoEventFingerprintKey]
initWithString:[VectorL10n roomEventEncryptionInfoEventFingerprintKey]
attributes:@{NSForegroundColorAttributeName: _defaultTextColor,
NSFontAttributeName: [UIFont boldSystemFontOfSize:14]}]];
[eventInformationString appendAttributedString:[[NSMutableAttributedString alloc]
@@ -246,7 +246,7 @@ static NSAttributedString *verticalWhitespace = nil;
[eventInformationString appendAttributedString:[MXKEncryptionInfoView verticalWhitespace]];
[eventInformationString appendAttributedString:[[NSMutableAttributedString alloc]
initWithString:[MatrixKitL10n roomEventEncryptionInfoEventAlgorithm]
initWithString:[VectorL10n roomEventEncryptionInfoEventAlgorithm]
attributes:@{NSForegroundColorAttributeName: _defaultTextColor,
NSFontAttributeName: [UIFont boldSystemFontOfSize:14]}]];
[eventInformationString appendAttributedString:[[NSMutableAttributedString alloc]
@@ -258,7 +258,7 @@ static NSAttributedString *verticalWhitespace = nil;
if (decryptionError.length)
{
[eventInformationString appendAttributedString:[[NSMutableAttributedString alloc]
initWithString:[MatrixKitL10n roomEventEncryptionInfoEventDecryptionError]
initWithString:[VectorL10n roomEventEncryptionInfoEventDecryptionError]
attributes:@{NSForegroundColorAttributeName: _defaultTextColor,
NSFontAttributeName: [UIFont boldSystemFontOfSize:14]}]];
[eventInformationString appendAttributedString:[[NSMutableAttributedString alloc]
@@ -269,7 +269,7 @@ static NSAttributedString *verticalWhitespace = nil;
}
[eventInformationString appendAttributedString:[[NSMutableAttributedString alloc]
initWithString:[MatrixKitL10n roomEventEncryptionInfoEventSessionId]
initWithString:[VectorL10n roomEventEncryptionInfoEventSessionId]
attributes:@{NSForegroundColorAttributeName: _defaultTextColor,
NSFontAttributeName: [UIFont boldSystemFontOfSize:14]}]];
[eventInformationString appendAttributedString:[[NSMutableAttributedString alloc]
@@ -283,7 +283,7 @@ static NSAttributedString *verticalWhitespace = nil;
// Device information
NSMutableAttributedString *deviceInformationString = [[NSMutableAttributedString alloc]
initWithString:[MatrixKitL10n roomEventEncryptionInfoDevice]
initWithString:[VectorL10n roomEventEncryptionInfoDevice]
attributes:@{NSForegroundColorAttributeName: _defaultTextColor,
NSFontAttributeName: [UIFont boldSystemFontOfSize:15]}];
[deviceInformationString appendAttributedString:[MXKEncryptionInfoView verticalWhitespace]];
@@ -304,41 +304,41 @@ static NSAttributedString *verticalWhitespace = nil;
case MXDeviceUnverified:
{
verification = [[NSMutableAttributedString alloc]
initWithString:[MatrixKitL10n roomEventEncryptionInfoDeviceNotVerified]
initWithString:[VectorL10n roomEventEncryptionInfoDeviceNotVerified]
attributes:@{NSForegroundColorAttributeName: _defaultTextColor,
NSFontAttributeName: [UIFont boldSystemFontOfSize:14]}];
[_verifyButton setTitle:[MatrixKitL10n roomEventEncryptionInfoVerify] forState:UIControlStateNormal];
[_verifyButton setTitle:[MatrixKitL10n roomEventEncryptionInfoVerify] forState:UIControlStateHighlighted];
[_blockButton setTitle:[MatrixKitL10n roomEventEncryptionInfoBlock] forState:UIControlStateNormal];
[_blockButton setTitle:[MatrixKitL10n roomEventEncryptionInfoBlock] forState:UIControlStateHighlighted];
[_verifyButton setTitle:[VectorL10n roomEventEncryptionInfoVerify] forState:UIControlStateNormal];
[_verifyButton setTitle:[VectorL10n roomEventEncryptionInfoVerify] forState:UIControlStateHighlighted];
[_blockButton setTitle:[VectorL10n roomEventEncryptionInfoBlock] forState:UIControlStateNormal];
[_blockButton setTitle:[VectorL10n roomEventEncryptionInfoBlock] forState:UIControlStateHighlighted];
break;
}
case MXDeviceVerified:
{
verification = [[NSMutableAttributedString alloc]
initWithString:[MatrixKitL10n roomEventEncryptionInfoDeviceVerified]
initWithString:[VectorL10n roomEventEncryptionInfoDeviceVerified]
attributes:@{NSForegroundColorAttributeName: _defaultTextColor,
NSFontAttributeName: [UIFont systemFontOfSize:14]}];
[_verifyButton setTitle:[MatrixKitL10n roomEventEncryptionInfoUnverify] forState:UIControlStateNormal];
[_verifyButton setTitle:[MatrixKitL10n roomEventEncryptionInfoUnverify] forState:UIControlStateHighlighted];
[_blockButton setTitle:[MatrixKitL10n roomEventEncryptionInfoBlock] forState:UIControlStateNormal];
[_blockButton setTitle:[MatrixKitL10n roomEventEncryptionInfoBlock] forState:UIControlStateHighlighted];
[_verifyButton setTitle:[VectorL10n roomEventEncryptionInfoUnverify] forState:UIControlStateNormal];
[_verifyButton setTitle:[VectorL10n roomEventEncryptionInfoUnverify] forState:UIControlStateHighlighted];
[_blockButton setTitle:[VectorL10n roomEventEncryptionInfoBlock] forState:UIControlStateNormal];
[_blockButton setTitle:[VectorL10n roomEventEncryptionInfoBlock] forState:UIControlStateHighlighted];
break;
}
case MXDeviceBlocked:
{
verification = [[NSMutableAttributedString alloc]
initWithString:[MatrixKitL10n roomEventEncryptionInfoDeviceBlocked]
initWithString:[VectorL10n roomEventEncryptionInfoDeviceBlocked]
attributes:@{NSForegroundColorAttributeName: _defaultTextColor,
NSFontAttributeName: [UIFont boldSystemFontOfSize:14]}];
[_verifyButton setTitle:[MatrixKitL10n roomEventEncryptionInfoVerify] forState:UIControlStateNormal];
[_verifyButton setTitle:[MatrixKitL10n roomEventEncryptionInfoVerify] forState:UIControlStateHighlighted];
[_blockButton setTitle:[MatrixKitL10n roomEventEncryptionInfoUnblock] forState:UIControlStateNormal];
[_blockButton setTitle:[MatrixKitL10n roomEventEncryptionInfoUnblock] forState:UIControlStateHighlighted];
[_verifyButton setTitle:[VectorL10n roomEventEncryptionInfoVerify] forState:UIControlStateNormal];
[_verifyButton setTitle:[VectorL10n roomEventEncryptionInfoVerify] forState:UIControlStateHighlighted];
[_blockButton setTitle:[VectorL10n roomEventEncryptionInfoUnblock] forState:UIControlStateNormal];
[_blockButton setTitle:[VectorL10n roomEventEncryptionInfoUnblock] forState:UIControlStateHighlighted];
break;
}
@@ -347,7 +347,7 @@ static NSAttributedString *verticalWhitespace = nil;
}
[deviceInformationString appendAttributedString:[[NSMutableAttributedString alloc]
initWithString:[MatrixKitL10n roomEventEncryptionInfoDeviceName]
initWithString:[VectorL10n roomEventEncryptionInfoDeviceName]
attributes:@{NSForegroundColorAttributeName: _defaultTextColor,
NSFontAttributeName: [UIFont boldSystemFontOfSize:14]}]];
[deviceInformationString appendAttributedString:[[NSMutableAttributedString alloc]
@@ -357,7 +357,7 @@ static NSAttributedString *verticalWhitespace = nil;
[deviceInformationString appendAttributedString:[MXKEncryptionInfoView verticalWhitespace]];
[deviceInformationString appendAttributedString:[[NSMutableAttributedString alloc]
initWithString:[MatrixKitL10n roomEventEncryptionInfoDeviceId] attributes:@{NSForegroundColorAttributeName: _defaultTextColor, NSFontAttributeName: [UIFont boldSystemFontOfSize:14]}]];
initWithString:[VectorL10n roomEventEncryptionInfoDeviceId] attributes:@{NSForegroundColorAttributeName: _defaultTextColor, NSFontAttributeName: [UIFont boldSystemFontOfSize:14]}]];
[deviceInformationString appendAttributedString:[[NSMutableAttributedString alloc]
initWithString:deviceId
attributes:@{NSForegroundColorAttributeName: _defaultTextColor,
@@ -365,12 +365,12 @@ static NSAttributedString *verticalWhitespace = nil;
[deviceInformationString appendAttributedString:[MXKEncryptionInfoView verticalWhitespace]];
[deviceInformationString appendAttributedString:[[NSMutableAttributedString alloc]
initWithString:[MatrixKitL10n roomEventEncryptionInfoDeviceVerification] attributes:@{NSForegroundColorAttributeName: _defaultTextColor, NSFontAttributeName: [UIFont boldSystemFontOfSize:14]}]];
initWithString:[VectorL10n roomEventEncryptionInfoDeviceVerification] attributes:@{NSForegroundColorAttributeName: _defaultTextColor, NSFontAttributeName: [UIFont boldSystemFontOfSize:14]}]];
[deviceInformationString appendAttributedString:verification];
[deviceInformationString appendAttributedString:[MXKEncryptionInfoView verticalWhitespace]];
[deviceInformationString appendAttributedString:[[NSMutableAttributedString alloc]
initWithString:[MatrixKitL10n roomEventEncryptionInfoDeviceFingerprint] attributes:@{NSForegroundColorAttributeName: _defaultTextColor, NSFontAttributeName: [UIFont boldSystemFontOfSize:14]}]];
initWithString:[VectorL10n roomEventEncryptionInfoDeviceFingerprint] attributes:@{NSForegroundColorAttributeName: _defaultTextColor, NSFontAttributeName: [UIFont boldSystemFontOfSize:14]}]];
[deviceInformationString appendAttributedString:[[NSMutableAttributedString alloc]
initWithString:fingerprint
attributes:@{NSForegroundColorAttributeName: _defaultTextColor,
@@ -381,7 +381,7 @@ static NSAttributedString *verticalWhitespace = nil;
{
// Unknown device
[deviceInformationString appendAttributedString:[[NSMutableAttributedString alloc]
initWithString:[MatrixKitL10n roomEventEncryptionInfoDeviceUnknown] attributes:@{NSForegroundColorAttributeName: _defaultTextColor, NSFontAttributeName: [UIFont italicSystemFontOfSize:14]}]];
initWithString:[VectorL10n roomEventEncryptionInfoDeviceUnknown] attributes:@{NSForegroundColorAttributeName: _defaultTextColor, NSFontAttributeName: [UIFont italicSystemFontOfSize:14]}]];
}
[textViewAttributedString appendAttributedString:deviceInformationString];
@@ -451,10 +451,10 @@ static NSAttributedString *verticalWhitespace = nil;
{
// Prompt user
NSMutableAttributedString *textViewAttributedString = [[NSMutableAttributedString alloc]
initWithString:[MatrixKitL10n roomEventEncryptionVerifyTitle] attributes:@{NSForegroundColorAttributeName: _defaultTextColor,
initWithString:[VectorL10n roomEventEncryptionVerifyTitle] attributes:@{NSForegroundColorAttributeName: _defaultTextColor,
NSFontAttributeName: [UIFont boldSystemFontOfSize:17]}];
NSString *message = [MatrixKitL10n roomEventEncryptionVerifyMessage:_mxDeviceInfo.displayName :_mxDeviceInfo.deviceId :_mxDeviceInfo.fingerprint];
NSString *message = [VectorL10n roomEventEncryptionVerifyMessage:_mxDeviceInfo.displayName :_mxDeviceInfo.deviceId :_mxDeviceInfo.fingerprint];
[textViewAttributedString appendAttributedString:[[NSMutableAttributedString alloc]
initWithString:message
@@ -463,8 +463,8 @@ static NSAttributedString *verticalWhitespace = nil;
self.textView.attributedText = textViewAttributedString;
[_cancelButton setTitle:[MatrixKitL10n cancel] forState:UIControlStateNormal];
[_cancelButton setTitle:[MatrixKitL10n cancel] forState:UIControlStateHighlighted];
[_cancelButton setTitle:[VectorL10n cancel] forState:UIControlStateNormal];
[_cancelButton setTitle:[VectorL10n cancel] forState:UIControlStateHighlighted];
_verifyButton.hidden = _blockButton.hidden = YES;
_confirmVerifyButton.hidden = NO;
}
@@ -41,7 +41,7 @@
mxSession = matrixSession;
_passphraseMinLength = 1;
_alertController = [UIAlertController alertControllerWithTitle:[MatrixKitL10n e2eExportRoomKeys] message:[MatrixKitL10n e2eExportPrompt] preferredStyle:UIAlertControllerStyleAlert];
_alertController = [UIAlertController alertControllerWithTitle:[VectorL10n e2eExportRoomKeys] message:[VectorL10n e2eExportPrompt] preferredStyle:UIAlertControllerStyleAlert];
}
return self;
}
@@ -72,18 +72,18 @@
[_alertController addTextFieldWithConfigurationHandler:^(UITextField *textField)
{
textField.secureTextEntry = YES;
textField.placeholder = [MatrixKitL10n e2ePassphraseCreate];
textField.placeholder = [VectorL10n e2ePassphraseCreate];
[textField resignFirstResponder];
}];
[_alertController addTextFieldWithConfigurationHandler:^(UITextField *textField)
{
textField.secureTextEntry = YES;
textField.placeholder = [MatrixKitL10n e2ePassphraseConfirm];
textField.placeholder = [VectorL10n e2ePassphraseConfirm];
[textField resignFirstResponder];
}];
[_alertController addAction:[UIAlertAction actionWithTitle:[MatrixKitL10n cancel]
[_alertController addAction:[UIAlertAction actionWithTitle:[VectorL10n cancel]
style:UIAlertActionStyleDefault
handler:^(UIAlertAction * action) {
@@ -94,7 +94,7 @@
}]];
[_alertController addAction:[UIAlertAction actionWithTitle:[MatrixKitL10n e2eExport]
[_alertController addAction:[UIAlertAction actionWithTitle:[VectorL10n e2eExport]
style:UIAlertActionStyleDefault
handler:^(UIAlertAction * action) {
@@ -115,20 +115,20 @@
NSString *error;
if (!password.length)
{
error = [MatrixKitL10n e2ePassphraseEmpty];
error = [VectorL10n e2ePassphraseEmpty];
}
else if (password.length < self.passphraseMinLength)
{
error = [MatrixKitL10n e2ePassphraseTooShort:self.passphraseMinLength];
error = [VectorL10n e2ePassphraseTooShort:self.passphraseMinLength];
}
else
{
error = [MatrixKitL10n e2ePassphraseNotMatch];
error = [VectorL10n e2ePassphraseNotMatch];
}
UIAlertController *otherAlert = [UIAlertController alertControllerWithTitle:[MatrixKitL10n error] message:error preferredStyle:UIAlertControllerStyleAlert];
UIAlertController *otherAlert = [UIAlertController alertControllerWithTitle:[VectorL10n error] message:error preferredStyle:UIAlertControllerStyleAlert];
[otherAlert addAction:[UIAlertAction actionWithTitle:[MatrixKitL10n ok] style:UIAlertActionStyleDefault handler:^(UIAlertAction * action) {
[otherAlert addAction:[UIAlertAction actionWithTitle:[VectorL10n ok] style:UIAlertActionStyleDefault handler:^(UIAlertAction * action) {
if (weakSelf)
{
@@ -162,9 +162,9 @@
onLoading(NO);
// TODO: i18n the error
UIAlertController *otherAlert = [UIAlertController alertControllerWithTitle:[MatrixKitL10n error] message:error.localizedDescription preferredStyle:UIAlertControllerStyleAlert];
UIAlertController *otherAlert = [UIAlertController alertControllerWithTitle:[VectorL10n error] message:error.localizedDescription preferredStyle:UIAlertControllerStyleAlert];
[otherAlert addAction:[UIAlertAction actionWithTitle:[MatrixKitL10n ok] style:UIAlertActionStyleDefault handler:^(UIAlertAction * action) {
[otherAlert addAction:[UIAlertAction actionWithTitle:[VectorL10n ok] style:UIAlertActionStyleDefault handler:^(UIAlertAction * action) {
if (weakSelf)
{
@@ -39,7 +39,7 @@
{
mxSession = matrixSession;
_alertController = [UIAlertController alertControllerWithTitle:[MatrixKitL10n e2eImportRoomKeys] message:[MatrixKitL10n e2eImportPrompt] preferredStyle:UIAlertControllerStyleAlert];
_alertController = [UIAlertController alertControllerWithTitle:[VectorL10n e2eImportRoomKeys] message:[VectorL10n e2eImportPrompt] preferredStyle:UIAlertControllerStyleAlert];
}
return self;
}
@@ -52,11 +52,11 @@
[_alertController addTextFieldWithConfigurationHandler:^(UITextField *textField)
{
textField.secureTextEntry = YES;
textField.placeholder = [MatrixKitL10n e2ePassphraseEnter];
textField.placeholder = [VectorL10n e2ePassphraseEnter];
[textField resignFirstResponder];
}];
[_alertController addAction:[UIAlertAction actionWithTitle:[MatrixKitL10n cancel]
[_alertController addAction:[UIAlertAction actionWithTitle:[VectorL10n cancel]
style:UIAlertActionStyleDefault
handler:^(UIAlertAction * action) {
@@ -67,7 +67,7 @@
}]];
[_alertController addAction:[UIAlertAction actionWithTitle:[MatrixKitL10n e2eImport]
[_alertController addAction:[UIAlertAction actionWithTitle:[VectorL10n e2eImport]
style:UIAlertActionStyleDefault
handler:^(UIAlertAction * action) {
@@ -96,9 +96,9 @@
[mxkViewController stopActivityIndicator];
// TODO: i18n the error
UIAlertController *otherAlert = [UIAlertController alertControllerWithTitle:[MatrixKitL10n error] message:error.localizedDescription preferredStyle:UIAlertControllerStyleAlert];
UIAlertController *otherAlert = [UIAlertController alertControllerWithTitle:[VectorL10n error] message:error.localizedDescription preferredStyle:UIAlertControllerStyleAlert];
[otherAlert addAction:[UIAlertAction actionWithTitle:[MatrixKitL10n ok] style:UIAlertActionStyleDefault handler:^(UIAlertAction * action) {
[otherAlert addAction:[UIAlertAction actionWithTitle:[VectorL10n ok] style:UIAlertActionStyleDefault handler:^(UIAlertAction * action) {
if (weakSelf)
{
@@ -50,11 +50,11 @@
{
if (groupCellData.group.summary.usersSection.totalUserCountEstimate > 1)
{
_memberCount.text = [MatrixKitL10n numMembersOther:@(groupCellData.group.summary.usersSection.totalUserCountEstimate).stringValue];
_memberCount.text = [VectorL10n numMembersOther:@(groupCellData.group.summary.usersSection.totalUserCountEstimate).stringValue];
}
else if (groupCellData.group.summary.usersSection.totalUserCountEstimate == 1)
{
_memberCount.text = [MatrixKitL10n numMembersOne:@(1).stringValue];
_memberCount.text = [VectorL10n numMembersOne:@(1).stringValue];
}
else
{
@@ -57,10 +57,10 @@
[super awakeFromNib];
// Localize string
[_redactButton setTitle:[MatrixKitL10n redact] forState:UIControlStateNormal];
[_redactButton setTitle:[MatrixKitL10n redact] forState:UIControlStateHighlighted];
[_closeButton setTitle:[MatrixKitL10n close] forState:UIControlStateNormal];
[_closeButton setTitle:[MatrixKitL10n close] forState:UIControlStateHighlighted];
[_redactButton setTitle:[VectorL10n redact] forState:UIControlStateNormal];
[_redactButton setTitle:[VectorL10n redact] forState:UIControlStateHighlighted];
[_closeButton setTitle:[VectorL10n close] forState:UIControlStateNormal];
[_closeButton setTitle:[VectorL10n close] forState:UIControlStateHighlighted];
}
- (instancetype)initWithEvent:(MXEvent*)event andMatrixSession:(MXSession*)session
@@ -75,18 +75,18 @@
_participantsTextField.inputAccessoryView = inputAccessoryView;
// Localize strings
_roomNameLabel.text = [MatrixKitL10n roomCreationNameTitle];
_roomNameTextField.placeholder = [MatrixKitL10n roomCreationNamePlaceholder];
_roomAliasLabel.text = [MatrixKitL10n roomCreationAliasTitle];
_roomAliasTextField.placeholder = [MatrixKitL10n roomCreationAliasPlaceholder];
_participantsLabel.text = [MatrixKitL10n roomCreationParticipantsTitle];
_participantsTextField.placeholder = [MatrixKitL10n roomCreationParticipantsPlaceholder];
_roomNameLabel.text = [VectorL10n roomCreationNameTitle];
_roomNameTextField.placeholder = [VectorL10n roomCreationNamePlaceholder];
_roomAliasLabel.text = [VectorL10n roomCreationAliasTitle];
_roomAliasTextField.placeholder = [VectorL10n roomCreationAliasPlaceholder];
_participantsLabel.text = [VectorL10n roomCreationParticipantsTitle];
_participantsTextField.placeholder = [VectorL10n roomCreationParticipantsPlaceholder];
[_roomVisibilityControl setTitle:[MatrixKitL10n public] forSegmentAtIndex:0];
[_roomVisibilityControl setTitle:[MatrixKitL10n private] forSegmentAtIndex:1];
[_roomVisibilityControl setTitle:[VectorL10n public] forSegmentAtIndex:0];
[_roomVisibilityControl setTitle:[VectorL10n private] forSegmentAtIndex:1];
[_createRoomBtn setTitle:[MatrixKitL10n createRoom] forState:UIControlStateNormal];
[_createRoomBtn setTitle:[MatrixKitL10n createRoom] forState:UIControlStateHighlighted];
[_createRoomBtn setTitle:[VectorL10n createRoom] forState:UIControlStateNormal];
[_createRoomBtn setTitle:[VectorL10n createRoom] forState:UIControlStateHighlighted];
}
- (void)dealloc
@@ -180,11 +180,11 @@
// Update alias placeholder in room creation section
if (homeServerSuffixArray.count == 1)
{
_roomAliasTextField.placeholder = [MatrixKitL10n roomCreationAliasPlaceholderWithHomeserver:homeServerSuffixArray.firstObject];
_roomAliasTextField.placeholder = [VectorL10n roomCreationAliasPlaceholderWithHomeserver:homeServerSuffixArray.firstObject];
}
else
{
_roomAliasTextField.placeholder = [MatrixKitL10n roomCreationAliasPlaceholder];
_roomAliasTextField.placeholder = [VectorL10n roomCreationAliasPlaceholder];
}
}
@@ -320,7 +320,7 @@
[mxSessionPicker dismissViewControllerAnimated:NO completion:nil];
}
mxSessionPicker = [UIAlertController alertControllerWithTitle:[MatrixKitL10n selectAccount] message:nil preferredStyle:UIAlertControllerStyleActionSheet];
mxSessionPicker = [UIAlertController alertControllerWithTitle:[VectorL10n selectAccount] message:nil preferredStyle:UIAlertControllerStyleActionSheet];
__weak typeof(self) weakSelf = self;
@@ -344,7 +344,7 @@
}]];
}
[mxSessionPicker addAction:[UIAlertAction actionWithTitle:[MatrixKitL10n cancel]
[mxSessionPicker addAction:[UIAlertAction actionWithTitle:[VectorL10n cancel]
style:UIAlertActionStyleDefault
handler:^(UIAlertAction * action) {
@@ -43,14 +43,14 @@
switch (mxPushRuleKind)
{
case MXPushRuleKindContent:
_inputTextField.placeholder = [MatrixKitL10n notificationSettingsWordToMatch];
_inputTextField.placeholder = [VectorL10n notificationSettingsWordToMatch];
_inputTextField.autocorrectionType = UITextAutocorrectionTypeDefault;
break;
case MXPushRuleKindRoom:
_inputTextField.placeholder = [MatrixKitL10n notificationSettingsSelectRoom];
_inputTextField.placeholder = [VectorL10n notificationSettingsSelectRoom];
break;
case MXPushRuleKindSender:
_inputTextField.placeholder = [MatrixKitL10n notificationSettingsSenderHint];
_inputTextField.placeholder = [VectorL10n notificationSettingsSenderHint];
_inputTextField.autocorrectionType = UITextAutocorrectionTypeNo;
break;
default:
@@ -71,7 +71,7 @@
MXRoom *room = [_mxSession roomWithRoomId:mxPushRule.ruleId];
if (room)
{
description = [MatrixKitL10n notificationSettingsRoomRuleTitle:room.summary.displayname];
description = [VectorL10n notificationSettingsRoomRuleTitle:room.summary.displayname];
}
break;
}
@@ -115,20 +115,20 @@
{
if (ruleAction.actionType == MXPushRuleActionTypeDontNotify)
{
notify = [MatrixKitL10n notificationSettingsNeverNotify];
notify = [VectorL10n notificationSettingsNeverNotify];
sound = @"";
highlight = @"";
break;
}
else if (ruleAction.actionType == MXPushRuleActionTypeNotify || ruleAction.actionType == MXPushRuleActionTypeCoalesce)
{
notify = [MatrixKitL10n notificationSettingsAlwaysNotify];
notify = [VectorL10n notificationSettingsAlwaysNotify];
}
else if (ruleAction.actionType == MXPushRuleActionTypeSetTweak)
{
if ([ruleAction.parameters[@"set_tweak"] isEqualToString:@"sound"])
{
sound = [NSString stringWithFormat:@", %@", [MatrixKitL10n notificationSettingsCustomSound]];
sound = [NSString stringWithFormat:@", %@", [VectorL10n notificationSettingsCustomSound]];
}
else if ([ruleAction.parameters[@"set_tweak"] isEqualToString:@"highlight"])
{
@@ -136,7 +136,7 @@
// If not present, highlight. Else check its value before highlighting
if (nil == ruleAction.parameters[@"value"] || YES == [ruleAction.parameters[@"value"] boolValue])
{
highlight = [NSString stringWithFormat:@", %@", [MatrixKitL10n notificationSettingsHighlight]];
highlight = [NSString stringWithFormat:@", %@", [VectorL10n notificationSettingsHighlight]];
}
}
}
@@ -95,8 +95,8 @@
self.editable = YES;
// Localize string
[_rightInputToolbarButton setTitle:[MatrixKitL10n send] forState:UIControlStateNormal];
[_rightInputToolbarButton setTitle:[MatrixKitL10n send] forState:UIControlStateHighlighted];
[_rightInputToolbarButton setTitle:[VectorL10n send] forState:UIControlStateNormal];
[_rightInputToolbarButton setTitle:[VectorL10n send] forState:UIControlStateHighlighted];
validationViews = [NSMutableArray array];
}
@@ -142,7 +142,7 @@
{
optionsListView = [UIAlertController alertControllerWithTitle:nil message:nil preferredStyle:UIAlertControllerStyleActionSheet];
[optionsListView addAction:[UIAlertAction actionWithTitle:[MatrixKitL10n attachMedia]
[optionsListView addAction:[UIAlertAction actionWithTitle:[VectorL10n attachMedia]
style:UIAlertActionStyleDefault
handler:^(UIAlertAction * action) {
@@ -162,7 +162,7 @@
}]];
[optionsListView addAction:[UIAlertAction actionWithTitle:[MatrixKitL10n captureMedia]
[optionsListView addAction:[UIAlertAction actionWithTitle:[VectorL10n captureMedia]
style:UIAlertActionStyleDefault
handler:^(UIAlertAction * action) {
@@ -195,7 +195,7 @@
optionsListView = [UIAlertController alertControllerWithTitle:nil message:nil preferredStyle:UIAlertControllerStyleActionSheet];
}
[optionsListView addAction:[UIAlertAction actionWithTitle:[MatrixKitL10n inviteUser]
[optionsListView addAction:[UIAlertAction actionWithTitle:[VectorL10n inviteUser]
style:UIAlertActionStyleDefault
handler:^(UIAlertAction * action) {
@@ -204,10 +204,10 @@
typeof(self) self = weakSelf;
// Ask for userId to invite
self->optionsListView = [UIAlertController alertControllerWithTitle:[MatrixKitL10n userIdTitle] message:nil preferredStyle:UIAlertControllerStyleAlert];
self->optionsListView = [UIAlertController alertControllerWithTitle:[VectorL10n userIdTitle] message:nil preferredStyle:UIAlertControllerStyleAlert];
[self->optionsListView addAction:[UIAlertAction actionWithTitle:[MatrixKitL10n cancel] style:UIAlertActionStyleDefault handler:^(UIAlertAction * action) {
[self->optionsListView addAction:[UIAlertAction actionWithTitle:[VectorL10n cancel] style:UIAlertActionStyleDefault handler:^(UIAlertAction * action) {
if (weakSelf)
{
@@ -220,11 +220,11 @@
[self->optionsListView addTextFieldWithConfigurationHandler:^(UITextField *textField) {
textField.secureTextEntry = NO;
textField.placeholder = [MatrixKitL10n userIdPlaceholder];
textField.placeholder = [VectorL10n userIdPlaceholder];
}];
[self->optionsListView addAction:[UIAlertAction actionWithTitle:[MatrixKitL10n invite] style:UIAlertActionStyleDefault handler:^(UIAlertAction * action) {
[self->optionsListView addAction:[UIAlertAction actionWithTitle:[VectorL10n invite] style:UIAlertActionStyleDefault handler:^(UIAlertAction * action) {
if (weakSelf)
{
@@ -256,7 +256,7 @@
if (optionsListView)
{
[self->optionsListView addAction:[UIAlertAction actionWithTitle:[MatrixKitL10n cancel] style:UIAlertActionStyleDefault handler:^(UIAlertAction * action) {
[self->optionsListView addAction:[UIAlertAction actionWithTitle:[VectorL10n cancel] style:UIAlertActionStyleDefault handler:^(UIAlertAction * action) {
if (weakSelf)
{
@@ -609,15 +609,15 @@ NSString* MXKFileSizes_description(MXKFileSizes sizes)
{
__weak typeof(self) weakSelf = self;
compressionPrompt = [UIAlertController alertControllerWithTitle:[MatrixKitL10n attachmentSizePromptTitle]
message:[MatrixKitL10n attachmentSizePromptMessage]
compressionPrompt = [UIAlertController alertControllerWithTitle:[VectorL10n attachmentSizePromptTitle]
message:[VectorL10n attachmentSizePromptMessage]
preferredStyle:UIAlertControllerStyleActionSheet];
if (compressionSizes.small.fileSize)
{
NSString *fileSizeString = [MXTools fileSizeToString:compressionSizes.small.fileSize];
NSString *title = [MatrixKitL10n attachmentSmall:fileSizeString];
NSString *title = [VectorL10n attachmentSmall:fileSizeString];
[compressionPrompt addAction:[UIAlertAction actionWithTitle:title
style:UIAlertActionStyleDefault
@@ -641,7 +641,7 @@ NSString* MXKFileSizes_description(MXKFileSizes sizes)
{
NSString *fileSizeString = [MXTools fileSizeToString:compressionSizes.medium.fileSize];
NSString *title = [MatrixKitL10n attachmentMedium:fileSizeString];
NSString *title = [VectorL10n attachmentMedium:fileSizeString];
[compressionPrompt addAction:[UIAlertAction actionWithTitle:title
style:UIAlertActionStyleDefault
@@ -665,7 +665,7 @@ NSString* MXKFileSizes_description(MXKFileSizes sizes)
{
NSString *fileSizeString = [MXTools fileSizeToString:compressionSizes.large.fileSize];
NSString *title = [MatrixKitL10n attachmentLarge:fileSizeString];
NSString *title = [VectorL10n attachmentLarge:fileSizeString];
[compressionPrompt addAction:[UIAlertAction actionWithTitle:title
style:UIAlertActionStyleDefault
@@ -687,7 +687,7 @@ NSString* MXKFileSizes_description(MXKFileSizes sizes)
NSString *fileSizeString = [MXTools fileSizeToString:compressionSizes.original.fileSize];
NSString *title = [MatrixKitL10n attachmentOriginal:fileSizeString];
NSString *title = [VectorL10n attachmentOriginal:fileSizeString];
[compressionPrompt addAction:[UIAlertAction actionWithTitle:title
style:UIAlertActionStyleDefault
@@ -705,7 +705,7 @@ NSString* MXKFileSizes_description(MXKFileSizes sizes)
}]];
[compressionPrompt addAction:[UIAlertAction actionWithTitle:[MatrixKitL10n cancel]
[compressionPrompt addAction:[UIAlertAction actionWithTitle:[VectorL10n cancel]
style:UIAlertActionStyleCancel
handler:^(UIAlertAction * action) {
@@ -838,15 +838,15 @@ NSString* MXKFileSizes_description(MXKFileSizes sizes)
&& (fileSizes.small || fileSizes.medium || fileSizes.large))
{
// Ask the user for the compression value
compressionPrompt = [UIAlertController alertControllerWithTitle:[MatrixKitL10n attachmentSizePromptTitle]
message:[MatrixKitL10n attachmentSizePromptMessage]
compressionPrompt = [UIAlertController alertControllerWithTitle:[VectorL10n attachmentSizePromptTitle]
message:[VectorL10n attachmentSizePromptMessage]
preferredStyle:UIAlertControllerStyleActionSheet];
__weak typeof(self) weakSelf = self;
if (fileSizes.small)
{
NSString *title = [MatrixKitL10n attachmentSmall:[MXTools fileSizeToString:fileSizes.small]];
NSString *title = [VectorL10n attachmentSmall:[MXTools fileSizeToString:fileSizes.small]];
[compressionPrompt addAction:[UIAlertAction actionWithTitle:title
style:UIAlertActionStyleDefault
@@ -866,7 +866,7 @@ NSString* MXKFileSizes_description(MXKFileSizes sizes)
if (fileSizes.medium)
{
NSString *title = [MatrixKitL10n attachmentMedium:[MXTools fileSizeToString:fileSizes.medium]];
NSString *title = [VectorL10n attachmentMedium:[MXTools fileSizeToString:fileSizes.medium]];
[compressionPrompt addAction:[UIAlertAction actionWithTitle:title
style:UIAlertActionStyleDefault
@@ -886,7 +886,7 @@ NSString* MXKFileSizes_description(MXKFileSizes sizes)
if (fileSizes.large)
{
NSString *title = [MatrixKitL10n attachmentLarge:[MXTools fileSizeToString:fileSizes.large]];
NSString *title = [VectorL10n attachmentLarge:[MXTools fileSizeToString:fileSizes.large]];
[compressionPrompt addAction:[UIAlertAction actionWithTitle:title
style:UIAlertActionStyleDefault
@@ -904,7 +904,7 @@ NSString* MXKFileSizes_description(MXKFileSizes sizes)
}]];
}
NSString *title = [MatrixKitL10n attachmentOriginal:[MXTools fileSizeToString:fileSizes.original]];
NSString *title = [VectorL10n attachmentOriginal:[MXTools fileSizeToString:fileSizes.original]];
[compressionPrompt addAction:[UIAlertAction actionWithTitle:title
style:UIAlertActionStyleDefault
@@ -921,7 +921,7 @@ NSString* MXKFileSizes_description(MXKFileSizes sizes)
}]];
[compressionPrompt addAction:[UIAlertAction actionWithTitle:[MatrixKitL10n cancel]
[compressionPrompt addAction:[UIAlertAction actionWithTitle:[VectorL10n cancel]
style:UIAlertActionStyleCancel
handler:^(UIAlertAction * action) {
@@ -1040,7 +1040,7 @@ NSString* MXKFileSizes_description(MXKFileSizes sizes)
imageValidationView.stretchable = YES;
// the user validates the image
[imageValidationView setRightButtonTitle:[MatrixKitL10n ok] handler:^(MXKImageView* imageView, NSString* buttonTitle)
[imageValidationView setRightButtonTitle:[VectorL10n ok] handler:^(MXKImageView* imageView, NSString* buttonTitle)
{
if (weakSelf)
{
@@ -1066,7 +1066,7 @@ NSString* MXKFileSizes_description(MXKFileSizes sizes)
}];
// the user wants to use an other image
[imageValidationView setLeftButtonTitle:[MatrixKitL10n cancel] handler:^(MXKImageView* imageView, NSString* buttonTitle)
[imageValidationView setLeftButtonTitle:[VectorL10n cancel] handler:^(MXKImageView* imageView, NSString* buttonTitle)
{
if (weakSelf)
{
@@ -1201,7 +1201,7 @@ NSString* MXKFileSizes_description(MXKFileSizes sizes)
imageValidationView.stretchable = YES;
// the user validates the image
[imageValidationView setRightButtonTitle:[MatrixKitL10n ok] handler:^(MXKImageView* imageView, NSString* buttonTitle)
[imageValidationView setRightButtonTitle:[VectorL10n ok] handler:^(MXKImageView* imageView, NSString* buttonTitle)
{
if (weakSelf)
{
@@ -1212,7 +1212,7 @@ NSString* MXKFileSizes_description(MXKFileSizes sizes)
}];
// the user wants to use an other image
[imageValidationView setLeftButtonTitle:[MatrixKitL10n cancel] handler:^(MXKImageView* imageView, NSString* buttonTitle)
[imageValidationView setLeftButtonTitle:[VectorL10n cancel] handler:^(MXKImageView* imageView, NSString* buttonTitle)
{
// Dismiss the image validation view.
if (weakSelf)
@@ -1254,7 +1254,7 @@ NSString* MXKFileSizes_description(MXKFileSizes sizes)
videoValidationView.stretchable = YES;
// the user validates the image
[videoValidationView setRightButtonTitle:[MatrixKitL10n ok] handler:^(MXKImageView* imageView, NSString* buttonTitle)
[videoValidationView setRightButtonTitle:[VectorL10n ok] handler:^(MXKImageView* imageView, NSString* buttonTitle)
{
if (weakSelf)
{
@@ -1266,7 +1266,7 @@ NSString* MXKFileSizes_description(MXKFileSizes sizes)
}];
// the user wants to use an other image
[videoValidationView setLeftButtonTitle:[MatrixKitL10n cancel] handler:^(MXKImageView* imageView, NSString* buttonTitle)
[videoValidationView setLeftButtonTitle:[VectorL10n cancel] handler:^(MXKImageView* imageView, NSString* buttonTitle)
{
// Dismiss the video validation view.
if (weakSelf)
@@ -1304,7 +1304,7 @@ NSString* MXKFileSizes_description(MXKFileSizes sizes)
docValidationView.stretchable = YES;
// the user validates the image
[docValidationView setRightButtonTitle:[MatrixKitL10n ok] handler:^(MXKImageView* imageView, NSString* buttonTitle)
[docValidationView setRightButtonTitle:[VectorL10n ok] handler:^(MXKImageView* imageView, NSString* buttonTitle)
{
if (weakSelf)
{
@@ -1316,7 +1316,7 @@ NSString* MXKFileSizes_description(MXKFileSizes sizes)
}];
// the user wants to use an other image
[docValidationView setLeftButtonTitle:[MatrixKitL10n cancel] handler:^(MXKImageView* imageView, NSString* buttonTitle)
[docValidationView setLeftButtonTitle:[VectorL10n cancel] handler:^(MXKImageView* imageView, NSString* buttonTitle)
{
// Dismiss the validation view.
if (weakSelf)
@@ -41,11 +41,11 @@
// Set member count
if (publicRoom.numJoinedMembers > 1)
{
_memberCount.text = [MatrixKitL10n numMembersOther:@(publicRoom.numJoinedMembers).stringValue];
_memberCount.text = [VectorL10n numMembersOther:@(publicRoom.numJoinedMembers).stringValue];
}
else if (publicRoom.numJoinedMembers == 1)
{
_memberCount.text = [MatrixKitL10n numMembersOne:@(1).stringValue];
_memberCount.text = [VectorL10n numMembersOne:@(1).stringValue];
}
else
{
@@ -116,7 +116,7 @@
if (memberCellData.roomMember.membership == MXMembershipLeave || memberCellData.roomMember.membership == MXMembershipBan)
{
self.backgroundColor = [UIColor colorWithRed:0.8 green:0.8 blue:0.8 alpha:1.0];
presenceText = (memberCellData.roomMember.membership == MXMembershipLeave) ? [MatrixKitL10n membershipLeave] : [MatrixKitL10n membershipBan];
presenceText = (memberCellData.roomMember.membership == MXMembershipLeave) ? [VectorL10n membershipLeave] : [VectorL10n membershipBan];
}
else
{
@@ -126,7 +126,7 @@
if (memberCellData.roomMember.membership == MXMembershipInvite)
{
thumbnailBorderColor = [UIColor lightGrayColor];
presenceText = [MatrixKitL10n membershipInvite];
presenceText = [VectorL10n membershipInvite];
}
else
{
@@ -218,7 +218,7 @@
{
case MXPresenceOffline:
{
lastActiveTime = [MatrixKitL10n offline];
lastActiveTime = [VectorL10n offline];
break;
}
case MXPresenceUnknown:
@@ -86,7 +86,7 @@
}
else
{
self.displayNameTextField.text = [MatrixKitL10n roomPleaseSelect];
self.displayNameTextField.text = [VectorL10n roomPleaseSelect];
self.displayNameTextField.enabled = NO;
}
self.displayNameTextField.hidden = NO;
@@ -180,7 +180,7 @@
}
else
{
alertMsg = [MatrixKitL10n roomErrorNameEditionNotAuthorized];
alertMsg = [VectorL10n roomErrorNameEditionNotAuthorized];
}
}
@@ -195,7 +195,7 @@
currentAlert = [UIAlertController alertControllerWithTitle:nil message:alertMsg preferredStyle:UIAlertControllerStyleAlert];
[currentAlert addAction:[UIAlertAction actionWithTitle:[MatrixKitL10n cancel]
[currentAlert addAction:[UIAlertAction actionWithTitle:[VectorL10n cancel]
style:UIAlertActionStyleDefault
handler:^(UIAlertAction * action) {
@@ -372,7 +372,7 @@
}
else
{
alertMsg = [MatrixKitL10n roomErrorNameEditionNotAuthorized];
alertMsg = [VectorL10n roomErrorNameEditionNotAuthorized];
}
// Check whether the user is allowed to change room topic
@@ -401,7 +401,7 @@
}
else
{
alertMsg = [MatrixKitL10n roomErrorTopicEditionNotAuthorized];
alertMsg = [VectorL10n roomErrorTopicEditionNotAuthorized];
}
}
@@ -415,7 +415,7 @@
}
currentAlert = [UIAlertController alertControllerWithTitle:nil message:alertMsg preferredStyle:UIAlertControllerStyleAlert];
[currentAlert addAction:[UIAlertAction actionWithTitle:[MatrixKitL10n cancel]
[currentAlert addAction:[UIAlertAction actionWithTitle:[VectorL10n cancel]
style:UIAlertActionStyleDefault
handler:^(UIAlertAction * action) {