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
@@ -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) {