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
+38 -38
View File
@@ -812,18 +812,18 @@
MXError *mxError = [[MXError alloc] initWithNSError:error];
if ([mxError.errcode isEqualToString:kMXErrCodeStringNotFound])
{
errorTitle = [MatrixKitL10n roomErrorTimelineEventNotFoundTitle];
errorMessage = [MatrixKitL10n roomErrorTimelineEventNotFound];
errorTitle = [VectorL10n roomErrorTimelineEventNotFoundTitle];
errorMessage = [VectorL10n roomErrorTimelineEventNotFound];
}
else
{
errorTitle = [MatrixKitL10n roomErrorCannotLoadTimeline];
errorTitle = [VectorL10n roomErrorCannotLoadTimeline];
errorMessage = mxError.error;
}
}
else
{
errorTitle = [MatrixKitL10n roomErrorCannotLoadTimeline];
errorTitle = [VectorL10n roomErrorCannotLoadTimeline];
}
// And show it
@@ -834,7 +834,7 @@
message:errorMessage
preferredStyle:UIAlertControllerStyleAlert];
[errorAlert addAction:[UIAlertAction actionWithTitle:[MatrixKitL10n ok]
[errorAlert addAction:[UIAlertAction actionWithTitle:[VectorL10n ok]
style:UIAlertActionStyleDefault
handler:^(UIAlertAction * action) {
@@ -950,17 +950,17 @@
{
// minging kludge until https://matrix.org/jira/browse/SYN-678 is fixed
// 'Error when trying to join an empty room should be more explicit'
msg = [MatrixKitL10n roomErrorJoinFailedEmptyRoom];
msg = [VectorL10n roomErrorJoinFailedEmptyRoom];
}
MXWeakify(self);
[self->currentAlert dismissViewControllerAnimated:NO completion:nil];
UIAlertController *errorAlert = [UIAlertController alertControllerWithTitle:[MatrixKitL10n roomErrorJoinFailedTitle]
UIAlertController *errorAlert = [UIAlertController alertControllerWithTitle:[VectorL10n roomErrorJoinFailedTitle]
message:msg
preferredStyle:UIAlertControllerStyleAlert];
[errorAlert addAction:[UIAlertAction actionWithTitle:[MatrixKitL10n ok]
[errorAlert addAction:[UIAlertAction actionWithTitle:[VectorL10n ok]
style:UIAlertActionStyleDefault
handler:^(UIAlertAction * action) {
@@ -996,11 +996,11 @@
{
if (self.roomDataSource.room.isDirect)
{
reason = [MatrixKitL10n roomLeftForDm];
reason = [VectorL10n roomLeftForDm];
}
else
{
reason = [MatrixKitL10n roomLeft];
reason = [VectorL10n roomLeft];
}
}
@@ -2185,11 +2185,11 @@
__weak typeof(self) weakSelf = self;
UIAlertController *resendAlert = [UIAlertController alertControllerWithTitle:[MatrixKitL10n resendMessage]
UIAlertController *resendAlert = [UIAlertController alertControllerWithTitle:[VectorL10n resendMessage]
message:textMessage
preferredStyle:UIAlertControllerStyleAlert];
[resendAlert addAction:[UIAlertAction actionWithTitle:[MatrixKitL10n cancel]
[resendAlert addAction:[UIAlertAction actionWithTitle:[VectorL10n cancel]
style:UIAlertActionStyleDefault
handler:^(UIAlertAction * action) {
@@ -2198,7 +2198,7 @@
}]];
[resendAlert addAction:[UIAlertAction actionWithTitle:[MatrixKitL10n ok]
[resendAlert addAction:[UIAlertAction actionWithTitle:[VectorL10n ok]
style:UIAlertActionStyleDefault
handler:^(UIAlertAction * action) {
@@ -2580,10 +2580,10 @@
__weak __typeof(self) weakSelf = self;
UIAlertController *cancelAlert = [UIAlertController alertControllerWithTitle:nil
message:[MatrixKitL10n attachmentCancelDownload]
message:[VectorL10n attachmentCancelDownload]
preferredStyle:UIAlertControllerStyleAlert];
[cancelAlert addAction:[UIAlertAction actionWithTitle:[MatrixKitL10n no]
[cancelAlert addAction:[UIAlertAction actionWithTitle:[VectorL10n no]
style:UIAlertActionStyleDefault
handler:^(UIAlertAction * action) {
@@ -2592,7 +2592,7 @@
}]];
[cancelAlert addAction:[UIAlertAction actionWithTitle:[MatrixKitL10n yes]
[cancelAlert addAction:[UIAlertAction actionWithTitle:[VectorL10n yes]
style:UIAlertActionStyleDefault
handler:^(UIAlertAction * action) {
@@ -2630,10 +2630,10 @@
__weak __typeof(self) weakSelf = self;
UIAlertController *cancelAlert = [UIAlertController alertControllerWithTitle:nil
message:[MatrixKitL10n attachmentCancelUpload]
message:[VectorL10n attachmentCancelUpload]
preferredStyle:UIAlertControllerStyleAlert];
[cancelAlert addAction:[UIAlertAction actionWithTitle:[MatrixKitL10n no]
[cancelAlert addAction:[UIAlertAction actionWithTitle:[VectorL10n no]
style:UIAlertActionStyleDefault
handler:^(UIAlertAction * action) {
@@ -2642,7 +2642,7 @@
}]];
[cancelAlert addAction:[UIAlertAction actionWithTitle:[MatrixKitL10n yes]
[cancelAlert addAction:[UIAlertAction actionWithTitle:[VectorL10n yes]
style:UIAlertActionStyleDefault
handler:^(UIAlertAction * action) {
@@ -2704,7 +2704,7 @@
// Add actions for a failed event
if (selectedEvent.sentState == MXEventSentStateFailed)
{
[actionSheet addAction:[UIAlertAction actionWithTitle:[MatrixKitL10n resend]
[actionSheet addAction:[UIAlertAction actionWithTitle:[VectorL10n resend]
style:UIAlertActionStyleDefault
handler:^(UIAlertAction * action) {
@@ -2716,7 +2716,7 @@
}]];
[actionSheet addAction:[UIAlertAction actionWithTitle:[MatrixKitL10n delete]
[actionSheet addAction:[UIAlertAction actionWithTitle:[VectorL10n delete]
style:UIAlertActionStyleDefault
handler:^(UIAlertAction * action) {
@@ -2746,7 +2746,7 @@
selectedComponent = nil;
}
[actionSheet addAction:[UIAlertAction actionWithTitle:[MatrixKitL10n copy]
[actionSheet addAction:[UIAlertAction actionWithTitle:[VectorL10n copy]
style:UIAlertActionStyleDefault
handler:^(UIAlertAction * action) {
@@ -2770,7 +2770,7 @@
if ([MXKAppSettings standardAppSettings].messageDetailsAllowSharing)
{
[actionSheet addAction:[UIAlertAction actionWithTitle:[MatrixKitL10n share]
[actionSheet addAction:[UIAlertAction actionWithTitle:[VectorL10n share]
style:UIAlertActionStyleDefault
handler:^(UIAlertAction * action) {
@@ -2797,7 +2797,7 @@
if (components.count > 1)
{
[actionSheet addAction:[UIAlertAction actionWithTitle:[MatrixKitL10n selectAll]
[actionSheet addAction:[UIAlertAction actionWithTitle:[VectorL10n selectAll]
style:UIAlertActionStyleDefault
handler:^(UIAlertAction * action) {
@@ -2815,7 +2815,7 @@
{
if ([MXKAppSettings standardAppSettings].messageDetailsAllowSaving)
{
[actionSheet addAction:[UIAlertAction actionWithTitle:[MatrixKitL10n save]
[actionSheet addAction:[UIAlertAction actionWithTitle:[VectorL10n save]
style:UIAlertActionStyleDefault
handler:^(UIAlertAction * action) {
@@ -2848,7 +2848,7 @@
if (attachment.type != MXKAttachmentTypeSticker)
{
[actionSheet addAction:[UIAlertAction actionWithTitle:[MatrixKitL10n copyButtonName]
[actionSheet addAction:[UIAlertAction actionWithTitle:[VectorL10n copyButtonName]
style:UIAlertActionStyleDefault
handler:^(UIAlertAction * action) {
@@ -2879,7 +2879,7 @@
if ([MXKAppSettings standardAppSettings].messageDetailsAllowSharing)
{
[actionSheet addAction:[UIAlertAction actionWithTitle:[MatrixKitL10n share]
[actionSheet addAction:[UIAlertAction actionWithTitle:[VectorL10n share]
style:UIAlertActionStyleDefault
handler:^(UIAlertAction * action) {
@@ -2923,7 +2923,7 @@
NSString *uploadId = roomBubbleTableViewCell.bubbleData.attachment.contentURL;
if ([MXMediaManager existingUploaderWithId:uploadId])
{
[actionSheet addAction:[UIAlertAction actionWithTitle:[MatrixKitL10n cancelUpload]
[actionSheet addAction:[UIAlertAction actionWithTitle:[VectorL10n cancelUpload]
style:UIAlertActionStyleDefault
handler:^(UIAlertAction * action) {
@@ -2964,7 +2964,7 @@
NSString *downloadId = roomBubbleTableViewCell.bubbleData.attachment.downloadId;
if ([MXMediaManager existingDownloaderWithIdentifier:downloadId])
{
[actionSheet addAction:[UIAlertAction actionWithTitle:[MatrixKitL10n cancelDownload]
[actionSheet addAction:[UIAlertAction actionWithTitle:[VectorL10n cancelDownload]
style:UIAlertActionStyleDefault
handler:^(UIAlertAction * action) {
@@ -2984,7 +2984,7 @@
}
}
[actionSheet addAction:[UIAlertAction actionWithTitle:[MatrixKitL10n showDetails]
[actionSheet addAction:[UIAlertAction actionWithTitle:[VectorL10n showDetails]
style:UIAlertActionStyleDefault
handler:^(UIAlertAction * action) {
@@ -3000,7 +3000,7 @@
}]];
}
[actionSheet addAction:[UIAlertAction actionWithTitle:[MatrixKitL10n cancel]
[actionSheet addAction:[UIAlertAction actionWithTitle:[VectorL10n cancel]
style:UIAlertActionStyleCancel
handler:^(UIAlertAction * action) {
@@ -3069,7 +3069,7 @@
[self becomeFirstResponder];
UIMenuController *menu = [UIMenuController sharedMenuController];
menu.menuItems = @[[[UIMenuItem alloc] initWithTitle:[MatrixKitL10n share] action:@selector(share:)]];
menu.menuItems = @[[[UIMenuItem alloc] initWithTitle:[VectorL10n share] action:@selector(share:)]];
[menu setTargetRect:roomBubbleTableViewCell.messageTextView.frame inView:roomBubbleTableViewCell];
[menu setMenuVisible:YES animated:YES];
});
@@ -3646,11 +3646,11 @@
}
else
{
UIAlertController *alert = [UIAlertController alertControllerWithTitle:MatrixKitL10n.attachmentUnsupportedPreviewTitle
message:MatrixKitL10n.attachmentUnsupportedPreviewMessage
UIAlertController *alert = [UIAlertController alertControllerWithTitle:VectorL10n.attachmentUnsupportedPreviewTitle
message:VectorL10n.attachmentUnsupportedPreviewMessage
preferredStyle:UIAlertControllerStyleAlert];
MXWeakify(self);
[alert addAction:[UIAlertAction actionWithTitle:MatrixKitL10n.ok style:UIAlertActionStyleCancel handler:^(UIAlertAction * _Nonnull action) {
[alert addAction:[UIAlertAction actionWithTitle:VectorL10n.ok style:UIAlertActionStyleCancel handler:^(UIAlertAction * _Nonnull action) {
MXStrongifyAndReturnIfNil(self);
[selectedAttachment onShareEnded];
self->currentAlert = nil;
@@ -3700,10 +3700,10 @@
__weak typeof(self) weakSelf = self;
UIAlertController *keysPrompt = [UIAlertController alertControllerWithTitle:@""
message:[MatrixKitL10n attachmentE2eKeysFilePrompt]
message:[VectorL10n attachmentE2eKeysFilePrompt]
preferredStyle:UIAlertControllerStyleAlert];
[keysPrompt addAction:[UIAlertAction actionWithTitle:[MatrixKitL10n view]
[keysPrompt addAction:[UIAlertAction actionWithTitle:[VectorL10n view]
style:UIAlertActionStyleDefault
handler:^(UIAlertAction * action) {
@@ -3718,7 +3718,7 @@
}]];
[keysPrompt addAction:[UIAlertAction actionWithTitle:[MatrixKitL10n attachmentE2eKeysImport]
[keysPrompt addAction:[UIAlertAction actionWithTitle:[VectorL10n attachmentE2eKeysImport]
style:UIAlertActionStyleDefault
handler:^(UIAlertAction * action) {