Update encryption strings

This commit is contained in:
ismailgulek
2020-09-24 13:27:53 +03:00
parent 2fa0bef123
commit 95e21eedfb
5 changed files with 52 additions and 10 deletions
@@ -860,10 +860,20 @@
case UserEncryptionTrustLevelNotVerified:
case UserEncryptionTrustLevelNoCrossSigning:
case UserEncryptionTrustLevelTrusted:
[encryptionInformation appendString:NSLocalizedStringFromTable(@"room_participants_security_information_room_encrypted", @"Vector", nil)];
{
NSString *info = (self.mxRoom.isDirect) ?
NSLocalizedStringFromTable(@"dm_room_participants_security_information_room_encrypted", @"Vector", nil) :
NSLocalizedStringFromTable(@"room_participants_security_information_room_encrypted", @"Vector", nil);
[encryptionInformation appendString:info];
}
break;
case UserEncryptionTrustLevelNone:
[encryptionInformation appendString:NSLocalizedStringFromTable(@"room_participants_security_information_room_not_encrypted", @"Vector", nil)];
{
NSString *info = (self.mxRoom.isDirect) ?
NSLocalizedStringFromTable(@"dm_room_participants_security_information_room_not_encrypted", @"Vector", nil) :
NSLocalizedStringFromTable(@"room_participants_security_information_room_not_encrypted", @"Vector", nil);
[encryptionInformation appendString:info];
}
break;
case UserEncryptionTrustLevelUnknown:
[encryptionInformation appendString:NSLocalizedStringFromTable(@"room_participants_security_information_loading", @"Vector", nil)];
@@ -136,9 +136,12 @@ final class RoomInfoListViewController: UIViewController {
var tmpSections: [Section] = []
if viewData.isEncrypted {
let footer = viewData.isDirect ?
VectorL10n.dmRoomParticipantsSecurityInformationRoomEncrypted :
VectorL10n.roomParticipantsSecurityInformationRoomEncrypted
let sectionSecurity = Section(header: VectorL10n.securitySettingsTitle,
rows: [],
footer: VectorL10n.roomInfoListRoomEncrypted)
footer: footer)
tmpSections.append(sectionSecurity)
}
@@ -2801,7 +2801,14 @@ NSString *const kRoomSettingsAdvancedE2eEnabledCellViewIdentifier = @"kRoomSetti
cell.textLabel.font = [UIFont systemFontOfSize:17];
cell.textLabel.numberOfLines = 0;
cell.textLabel.text = NSLocalizedStringFromTable(@"room_details_advanced_e2e_encryption_enabled", @"Vector", nil);
if (mxRoom.isDirect)
{
cell.textLabel.text = NSLocalizedStringFromTable(@"dm_room_details_advanced_e2e_encryption_enabled", @"Vector", nil);
}
else
{
cell.textLabel.text = NSLocalizedStringFromTable(@"room_details_advanced_e2e_encryption_enabled", @"Vector", nil);
}
cell.textLabel.textColor = ThemeService.shared.theme.textPrimaryColor;
cell.selectionStyle = UITableViewCellSelectionStyleNone;
@@ -2828,7 +2835,14 @@ NSString *const kRoomSettingsAdvancedE2eEnabledCellViewIdentifier = @"kRoomSetti
cell.textLabel.font = [UIFont systemFontOfSize:17];
cell.textLabel.numberOfLines = 0;
cell.textLabel.text = NSLocalizedStringFromTable(@"room_details_advanced_e2e_encryption_disabled", @"Vector", nil);
if (mxRoom.isDirect)
{
cell.textLabel.text = NSLocalizedStringFromTable(@"dm_room_details_advanced_e2e_encryption_disabled", @"Vector", nil);
}
else
{
cell.textLabel.text = NSLocalizedStringFromTable(@"room_details_advanced_e2e_encryption_disabled", @"Vector", nil);
}
cell.textLabel.textColor = ThemeService.shared.theme.textPrimaryColor;
cell.selectionStyle = UITableViewCellSelectionStyleNone;