Remove MatrixKitL10n from SwiftGen

Uses VectorL10n everywhere.
This commit is contained in:
Doug
2022-03-03 09:32:19 +00:00
parent d7f8a3cef2
commit 2aec883095
97 changed files with 2492 additions and 2605 deletions
@@ -245,7 +245,7 @@ static CGFloat const kTextFontSize = 15.0;
textField.keyboardType = UIKeyboardTypeDefault;
}];
[alert addAction:[UIAlertAction actionWithTitle:[MatrixKitL10n cancel]
[alert addAction:[UIAlertAction actionWithTitle:[VectorL10n cancel]
style:UIAlertActionStyleCancel
handler:^(UIAlertAction * action) {
if (cancelHandler)
@@ -256,7 +256,7 @@ static CGFloat const kTextFontSize = 15.0;
__weak typeof(self) weakSelf = self;
[alert addAction:[UIAlertAction actionWithTitle:[MatrixKitL10n submit]
[alert addAction:[UIAlertAction actionWithTitle:[VectorL10n submit]
style:UIAlertActionStyleDefault
handler:^(UIAlertAction * action) {
UITextField *textField = alert.textFields.firstObject;
@@ -226,15 +226,15 @@ final class SettingsDiscoveryThreePidDetailsViewController: UIViewController {
private func presentPendingEmailVerificationAlert() {
let alert = UIAlertController(title: MatrixKitL10n.accountEmailValidationTitle,
message: MatrixKitL10n.accountEmailValidationMessage,
let alert = UIAlertController(title: VectorL10n.accountEmailValidationTitle,
message: VectorL10n.accountEmailValidationMessage,
preferredStyle: .alert)
alert.addAction(UIAlertAction(title: VectorL10n.continue, style: .default, handler: { _ in
self.viewModel.process(viewAction: .confirmEmailValidation)
}))
alert.addAction(UIAlertAction(title: MatrixKitL10n.cancel, style: .cancel, handler: { _ in
alert.addAction(UIAlertAction(title: VectorL10n.cancel, style: .cancel, handler: { _ in
self.viewModel.process(viewAction: .cancelThreePidValidation)
}))
@@ -244,8 +244,8 @@ final class SettingsDiscoveryThreePidDetailsViewController: UIViewController {
private func presentPendingMSISDNVerificationAlert() {
let alert = UIAlertController(title: MatrixKitL10n.accountMsisdnValidationTitle,
message: MatrixKitL10n.accountMsisdnValidationMessage,
let alert = UIAlertController(title: VectorL10n.accountMsisdnValidationTitle,
message: VectorL10n.accountMsisdnValidationMessage,
preferredStyle: .alert)
alert.addTextField { (textField) in
@@ -260,7 +260,7 @@ final class SettingsDiscoveryThreePidDetailsViewController: UIViewController {
self.viewModel.process(viewAction: .confirmMSISDNValidation(code: smsCode))
}))
alert.addAction(UIAlertAction(title: MatrixKitL10n.cancel, style: .cancel, handler: { _ in
alert.addAction(UIAlertAction(title: VectorL10n.cancel, style: .cancel, handler: { _ in
self.viewModel.process(viewAction: .cancelThreePidValidation)
}))
@@ -594,8 +594,8 @@ enum {
[currentAlert dismissViewControllerAnimated:NO completion:nil];
MXWeakify(self);
currentAlert = [UIAlertController alertControllerWithTitle:[MatrixKitL10n deviceDetailsRenamePromptTitle]
message:[MatrixKitL10n deviceDetailsRenamePromptMessage]
currentAlert = [UIAlertController alertControllerWithTitle:[VectorL10n deviceDetailsRenamePromptTitle]
message:[VectorL10n deviceDetailsRenamePromptMessage]
preferredStyle:UIAlertControllerStyleAlert];
[currentAlert addTextFieldWithConfigurationHandler:^(UITextField *textField) {
@@ -606,7 +606,7 @@ enum {
textField.text = self->device.displayName;
}];
[currentAlert addAction:[UIAlertAction actionWithTitle:[MatrixKitL10n cancel]
[currentAlert addAction:[UIAlertAction actionWithTitle:[VectorL10n cancel]
style:UIAlertActionStyleDefault
handler:^(UIAlertAction * action)
{
@@ -614,7 +614,7 @@ enum {
self->currentAlert = nil;
}]];
[currentAlert addAction:[UIAlertAction actionWithTitle:[MatrixKitL10n ok]
[currentAlert addAction:[UIAlertAction actionWithTitle:[VectorL10n ok]
style:UIAlertActionStyleDefault
handler:^(UIAlertAction * action)
{
@@ -674,8 +674,8 @@ enum {
self.reauthenticationCoordinatorBridgePresenter = nil;
};
NSString *title = [MatrixKitL10n deviceDetailsDeletePromptTitle];
NSString *message = [MatrixKitL10n deviceDetailsDeletePromptMessage];
NSString *title = [VectorL10n deviceDetailsDeletePromptTitle];
NSString *message = [VectorL10n deviceDetailsDeletePromptMessage];
AuthenticatedEndpointRequest *deleteDeviceRequest = [[AuthenticatedEndpointRequest alloc] initWithPath:[NSString stringWithFormat:@"%@/devices/%@", kMXAPIPrefixPathR0, [MXTools encodeURIComponent:device.deviceId]] httpMethod:@"DELETE"];
@@ -829,7 +829,7 @@ TableViewSectionsDelegate>
[self setupCrossSigning:nil];
}]];
[alertController addAction:[UIAlertAction actionWithTitle:[MatrixKitL10n cancel]
[alertController addAction:[UIAlertAction actionWithTitle:[VectorL10n cancel]
style:UIAlertActionStyleCancel
handler:nil]];
@@ -1416,7 +1416,7 @@ TableViewSectionsDelegate>
message:[VectorL10n securitySettingsCompleteSecurityAlertMessage]
preferredStyle:UIAlertControllerStyleAlert];
[alertController addAction:[UIAlertAction actionWithTitle:[MatrixKitL10n ok]
[alertController addAction:[UIAlertAction actionWithTitle:[VectorL10n ok]
style:UIAlertActionStyleDefault
handler:^(UIAlertAction * action) {
[self presentCompleteSecurity];
@@ -1612,7 +1612,7 @@ TableViewSectionsDelegate>
message:[VectorL10n settingsKeyBackupDeleteConfirmationPromptMsg]
preferredStyle:UIAlertControllerStyleAlert];
[currentAlert addAction:[UIAlertAction actionWithTitle:[MatrixKitL10n cancel]
[currentAlert addAction:[UIAlertAction actionWithTitle:[VectorL10n cancel]
style:UIAlertActionStyleCancel
handler:^(UIAlertAction * action) {
MXStrongifyAndReturnIfNil(self);
@@ -1741,7 +1741,7 @@ TableViewSectionsDelegate>
message:[VectorL10n settingsKeyBackupDeleteConfirmationPromptMsg]
preferredStyle:UIAlertControllerStyleAlert];
[currentAlert addAction:[UIAlertAction actionWithTitle:[MatrixKitL10n cancel]
[currentAlert addAction:[UIAlertAction actionWithTitle:[VectorL10n cancel]
style:UIAlertActionStyleCancel
handler:^(UIAlertAction * action) {
MXStrongifyAndReturnIfNil(self);
+30 -30
View File
@@ -1012,11 +1012,11 @@ TableViewSectionsDelegate>
{
MXWeakify(self);
[currentAlert dismissViewControllerAnimated:NO completion:nil];
UIAlertController *validationAlert = [UIAlertController alertControllerWithTitle:[MatrixKitL10n accountEmailValidationTitle]
UIAlertController *validationAlert = [UIAlertController alertControllerWithTitle:[VectorL10n accountEmailValidationTitle]
message:message
preferredStyle:UIAlertControllerStyleAlert];
[validationAlert addAction:[UIAlertAction actionWithTitle:[MatrixKitL10n cancel] style:UIAlertActionStyleDefault handler:^(UIAlertAction * action) {
[validationAlert addAction:[UIAlertAction actionWithTitle:[VectorL10n cancel] style:UIAlertActionStyleDefault handler:^(UIAlertAction * action) {
MXStrongifyAndReturnIfNil(self);
self->currentAlert = nil;
[self stopActivityIndicator];
@@ -1025,7 +1025,7 @@ TableViewSectionsDelegate>
self.newEmailEditingEnabled = NO;
}]];
[validationAlert addAction:[UIAlertAction actionWithTitle:[MatrixKitL10n continue] style:UIAlertActionStyleDefault handler:^(UIAlertAction * action) {
[validationAlert addAction:[UIAlertAction actionWithTitle:[VectorL10n continue] style:UIAlertActionStyleDefault handler:^(UIAlertAction * action) {
MXStrongifyAndReturnIfNil(self);
[self tryFinaliseAddEmailSession:threePidAddSession withAuthenticationParameters:authenticationParameters
threePidAddManager:threePidAddManager];
@@ -1110,7 +1110,7 @@ TableViewSectionsDelegate>
MXError *mxError = [[MXError alloc] initWithNSError:error];
if (mxError && [mxError.errcode isEqualToString:kMXErrCodeStringThreePIDAuthFailed])
{
[self showValidationEmailDialogWithMessage:[MatrixKitL10n accountEmailValidationError] for3PidAddSession:threePidAddSession threePidAddManager:threePidAddManager authenticationParameters:authParams];
[self showValidationEmailDialogWithMessage:[VectorL10n accountEmailValidationError] for3PidAddSession:threePidAddSession threePidAddManager:threePidAddManager authenticationParameters:authParams];
}
else
{
@@ -1129,11 +1129,11 @@ TableViewSectionsDelegate>
MXWeakify(self);
[currentAlert dismissViewControllerAnimated:NO completion:nil];
UIAlertController *validationAlert = [UIAlertController alertControllerWithTitle:[MatrixKitL10n accountMsisdnValidationTitle]
UIAlertController *validationAlert = [UIAlertController alertControllerWithTitle:[VectorL10n accountMsisdnValidationTitle]
message:message
preferredStyle:UIAlertControllerStyleAlert];
[validationAlert addAction:[UIAlertAction actionWithTitle:[MatrixKitL10n cancel] style:UIAlertActionStyleDefault handler:^(UIAlertAction * action) {
[validationAlert addAction:[UIAlertAction actionWithTitle:[VectorL10n cancel] style:UIAlertActionStyleDefault handler:^(UIAlertAction * action) {
MXStrongifyAndReturnIfNil(self);
self->currentAlert = nil;
@@ -1150,7 +1150,7 @@ TableViewSectionsDelegate>
textField.keyboardType = UIKeyboardTypeDecimalPad;
}];
[validationAlert addAction:[UIAlertAction actionWithTitle:[MatrixKitL10n submit] style:UIAlertActionStyleDefault handler:^(UIAlertAction * action) {
[validationAlert addAction:[UIAlertAction actionWithTitle:[VectorL10n submit] style:UIAlertActionStyleDefault handler:^(UIAlertAction * action) {
MXStrongifyAndReturnIfNil(self);
@@ -1260,7 +1260,7 @@ TableViewSectionsDelegate>
}
else
{
title = [MatrixKitL10n error];
title = [VectorL10n error];
}
}
@@ -1268,7 +1268,7 @@ TableViewSectionsDelegate>
UIAlertController *errorAlert = [UIAlertController alertControllerWithTitle:title message:msg preferredStyle:UIAlertControllerStyleAlert];
MXWeakify(self);
[errorAlert addAction:[UIAlertAction actionWithTitle:[MatrixKitL10n ok] style:UIAlertActionStyleDefault handler:^(UIAlertAction * action) {
[errorAlert addAction:[UIAlertAction actionWithTitle:[VectorL10n ok] style:UIAlertActionStyleDefault handler:^(UIAlertAction * action) {
MXStrongifyAndReturnIfNil(self);
self->currentAlert = nil;
@@ -1458,9 +1458,9 @@ TableViewSectionsDelegate>
NSString *appVersionInfo = [NSString stringWithFormat:@"%@ %@ (%@)", appName, appVersion, buildVersion];
NSString *loggedUserInfo = [MatrixKitL10n settingsConfigUserId:account.mxCredentials.userId];
NSString *loggedUserInfo = [VectorL10n settingsConfigUserId:account.mxCredentials.userId];
NSString *homeserverInfo = [MatrixKitL10n settingsConfigHomeServer:account.mxCredentials.homeServer];
NSString *homeserverInfo = [VectorL10n settingsConfigHomeServer:account.mxCredentials.homeServer];
NSString *sdkVersionInfo = [NSString stringWithFormat:@"Matrix SDK %@", MatrixSDKVersion];
@@ -2708,7 +2708,7 @@ TableViewSectionsDelegate>
UIAlertController *unignorePrompt = [UIAlertController alertControllerWithTitle:[VectorL10n settingsUnignoreUser:ignoredUserId] message:nil preferredStyle:UIAlertControllerStyleAlert];
[unignorePrompt addAction:[UIAlertAction actionWithTitle:[MatrixKitL10n yes]
[unignorePrompt addAction:[UIAlertAction actionWithTitle:[VectorL10n yes]
style:UIAlertActionStyleDefault
handler:^(UIAlertAction * action) {
@@ -2739,7 +2739,7 @@ TableViewSectionsDelegate>
}]];
[unignorePrompt addAction:[UIAlertAction actionWithTitle:[MatrixKitL10n no]
[unignorePrompt addAction:[UIAlertAction actionWithTitle:[VectorL10n no]
style:UIAlertActionStyleDefault
handler:^(UIAlertAction * action) {
@@ -2941,7 +2941,7 @@ TableViewSectionsDelegate>
// Remove ?
UIAlertController *removePrompt = [UIAlertController alertControllerWithTitle:[VectorL10n settingsRemovePromptTitle] message:promptMsg preferredStyle:UIAlertControllerStyleAlert];
[removePrompt addAction:[UIAlertAction actionWithTitle:[MatrixKitL10n cancel]
[removePrompt addAction:[UIAlertAction actionWithTitle:[VectorL10n cancel]
style:UIAlertActionStyleCancel
handler:^(UIAlertAction * action) {
@@ -3019,7 +3019,7 @@ TableViewSectionsDelegate>
UIAlertController *showSettingsPrompt = [UIAlertController alertControllerWithTitle:title message:message preferredStyle:UIAlertControllerStyleAlert];
[showSettingsPrompt addAction:[UIAlertAction actionWithTitle:[MatrixKitL10n cancel]
[showSettingsPrompt addAction:[UIAlertAction actionWithTitle:[VectorL10n cancel]
style:UIAlertActionStyleCancel
handler:^(UIAlertAction * action) {
@@ -3031,7 +3031,7 @@ TableViewSectionsDelegate>
}]];
UIAlertAction *settingsAction = [UIAlertAction actionWithTitle:[MatrixKitL10n settings]
UIAlertAction *settingsAction = [UIAlertAction actionWithTitle:[VectorL10n settings]
style:UIAlertActionStyleDefault
handler:^(UIAlertAction * action) {
if (weakSelf)
@@ -3442,7 +3442,7 @@ TableViewSectionsDelegate>
UIAlertController *errorAlert = [UIAlertController alertControllerWithTitle:title message:msg preferredStyle:UIAlertControllerStyleAlert];
[errorAlert addAction:[UIAlertAction actionWithTitle:[MatrixKitL10n cancel]
[errorAlert addAction:[UIAlertAction actionWithTitle:[VectorL10n cancel]
style:UIAlertActionStyleDefault
handler:^(UIAlertAction * action) {
@@ -3465,7 +3465,7 @@ TableViewSectionsDelegate>
}]];
[errorAlert addAction:[UIAlertAction actionWithTitle:[MatrixKitL10n retry]
[errorAlert addAction:[UIAlertAction actionWithTitle:[VectorL10n retry]
style:UIAlertActionStyleDefault
handler:^(UIAlertAction * action) {
@@ -3504,11 +3504,11 @@ TableViewSectionsDelegate>
[currentAlert dismissViewControllerAnimated:NO completion:nil];
UIAlertController *errorAlert = [UIAlertController alertControllerWithTitle:[MatrixKitL10n accountErrorEmailWrongTitle]
message:[MatrixKitL10n accountErrorEmailWrongDescription]
UIAlertController *errorAlert = [UIAlertController alertControllerWithTitle:[VectorL10n accountErrorEmailWrongTitle]
message:[VectorL10n accountErrorEmailWrongDescription]
preferredStyle:UIAlertControllerStyleAlert];
[errorAlert addAction:[UIAlertAction actionWithTitle:[MatrixKitL10n ok]
[errorAlert addAction:[UIAlertAction actionWithTitle:[VectorL10n ok]
style:UIAlertActionStyleDefault
handler:^(UIAlertAction * action) {
@@ -3539,7 +3539,7 @@ TableViewSectionsDelegate>
__block MX3PidAddSession *thirdPidAddSession;
thirdPidAddSession = [session.threePidAddManager startAddEmailSessionWithEmail:self->newEmailTextField.text nextLink:nil success:^{
[self showValidationEmailDialogWithMessage:[MatrixKitL10n accountEmailValidationMessage]
[self showValidationEmailDialogWithMessage:[VectorL10n accountEmailValidationMessage]
for3PidAddSession:thirdPidAddSession
threePidAddManager:session.threePidAddManager
authenticationParameters:authParams];
@@ -3615,11 +3615,11 @@ TableViewSectionsDelegate>
[currentAlert dismissViewControllerAnimated:NO completion:nil];
__weak typeof(self) weakSelf = self;
UIAlertController *errorAlert = [UIAlertController alertControllerWithTitle:[MatrixKitL10n accountErrorMsisdnWrongTitle]
message:[MatrixKitL10n accountErrorMsisdnWrongDescription]
UIAlertController *errorAlert = [UIAlertController alertControllerWithTitle:[VectorL10n accountErrorMsisdnWrongTitle]
message:[VectorL10n accountErrorMsisdnWrongDescription]
preferredStyle:UIAlertControllerStyleAlert];
[errorAlert addAction:[UIAlertAction actionWithTitle:[MatrixKitL10n ok]
[errorAlert addAction:[UIAlertAction actionWithTitle:[VectorL10n ok]
style:UIAlertActionStyleDefault
handler:^(UIAlertAction * action) {
@@ -3660,7 +3660,7 @@ TableViewSectionsDelegate>
__block MX3PidAddSession *new3Pid;
new3Pid = [session.threePidAddManager startAddPhoneNumberSessionWithPhoneNumber:msisdn countryCode:nil success:^{
[self showValidationMsisdnDialogWithMessage:[MatrixKitL10n accountMsisdnValidationMessage] for3PidAddSession:new3Pid threePidAddManager:session.threePidAddManager authenticationParameters:authParams];
[self showValidationMsisdnDialogWithMessage:[VectorL10n accountMsisdnValidationMessage] for3PidAddSession:new3Pid threePidAddManager:session.threePidAddManager authenticationParameters:authParams];
} failure:^(NSError *error) {
@@ -3844,7 +3844,7 @@ TableViewSectionsDelegate>
[themePicker addAction:blackAction];
// Cancel button
[themePicker addAction:[UIAlertAction actionWithTitle:[MatrixKitL10n cancel]
[themePicker addAction:[UIAlertAction actionWithTitle:[VectorL10n cancel]
style:UIAlertActionStyleCancel
handler:nil]];
@@ -4003,7 +4003,7 @@ TableViewSectionsDelegate>
UIAlertController *successAlert = [UIAlertController alertControllerWithTitle:nil message:[VectorL10n settingsPasswordUpdated] preferredStyle:UIAlertControllerStyleAlert];
[successAlert addAction:[UIAlertAction actionWithTitle:[MatrixKitL10n ok]
[successAlert addAction:[UIAlertAction actionWithTitle:[VectorL10n ok]
style:UIAlertActionStyleDefault
handler:^(UIAlertAction * action) {
@@ -4052,7 +4052,7 @@ TableViewSectionsDelegate>
UIAlertController *errorAlert = [UIAlertController alertControllerWithTitle:nil message:[VectorL10n settingsFailToUpdatePassword] preferredStyle:UIAlertControllerStyleAlert];
[errorAlert addAction:[UIAlertAction actionWithTitle:[MatrixKitL10n ok]
[errorAlert addAction:[UIAlertAction actionWithTitle:[VectorL10n ok]
style:UIAlertActionStyleDefault
handler:^(UIAlertAction * action) {
@@ -4562,7 +4562,7 @@ TableViewSectionsDelegate>
message:nil
preferredStyle:UIAlertControllerStyleAlert];
[alertController addAction:[UIAlertAction actionWithTitle:MatrixKitL10n.ok
[alertController addAction:[UIAlertAction actionWithTitle:VectorL10n.ok
style:UIAlertActionStyleDefault
handler:nil]];