diff --git a/Riot/Assets/en.lproj/Vector.strings b/Riot/Assets/en.lproj/Vector.strings index 6746a2494..fd6e8de79 100644 --- a/Riot/Assets/en.lproj/Vector.strings +++ b/Riot/Assets/en.lproj/Vector.strings @@ -278,7 +278,9 @@ "room_participants_security_loading" = "Loading…"; "room_participants_security_information_room_not_encrypted" = "Messages in this room are not end-to-end encrypted."; +"dm_room_participants_security_information_room_not_encrypted" = "Messages here are not end-to-end encrypted."; "room_participants_security_information_room_encrypted" = "Messages in this room are end-to-end encrypted.\n\nYour messages are secured with locks and only you and the recipient have the unique keys to unlock them."; +"dm_room_participants_security_information_room_encrypted" = "Messages here are end-to-end encrypted.\n\nYour messages are secured with locks and only you and the recipient have the unique keys to unlock them."; "room_member_power_level_admin_in" = "Admin in %@"; "room_member_power_level_moderator_in" = "Moderator in %@"; @@ -691,7 +693,9 @@ "room_details_advanced_room_id"="Room ID:"; "room_details_advanced_enable_e2e_encryption"="Enable encryption (warning: cannot be disabled again!)"; "room_details_advanced_e2e_encryption_enabled"="Encryption is enabled in this room"; +"dm_room_details_advanced_e2e_encryption_enabled"="Encryption is enabled here"; "room_details_advanced_e2e_encryption_disabled"="Encryption is not enabled in this room."; +"dm_room_details_advanced_e2e_encryption_disabled"="Encryption is not enabled here."; "room_details_advanced_e2e_encryption_blacklist_unverified_devices"="Encrypt to verified sessions only"; "room_details_fail_to_update_avatar" = "Fail to update the room photo"; "room_details_fail_to_update_room_name" = "Fail to update the room name"; @@ -1488,7 +1492,6 @@ // MARK: - Room Info -"room_info_list_room_encrypted" = "Messages in this room are end to end encrypted"; "room_info_list_one_member" = "1 member"; "room_info_list_several_members" = "%@ members"; "room_info_list_section_other" = "Other"; diff --git a/Riot/Generated/Strings.swift b/Riot/Generated/Strings.swift index 05db96bf1..b8f8c7e1b 100644 --- a/Riot/Generated/Strings.swift +++ b/Riot/Generated/Strings.swift @@ -1082,6 +1082,14 @@ internal enum VectorL10n { internal static var directoryTitle: String { return VectorL10n.tr("Vector", "directory_title") } + /// Encryption is not enabled here. + internal static var dmRoomDetailsAdvancedE2eEncryptionDisabled: String { + return VectorL10n.tr("Vector", "dm_room_details_advanced_e2e_encryption_disabled") + } + /// Encryption is enabled here + internal static var dmRoomDetailsAdvancedE2eEncryptionEnabled: String { + return VectorL10n.tr("Vector", "dm_room_details_advanced_e2e_encryption_enabled") + } /// Are you sure you want to leave? internal static var dmRoomParticipantsLeavePromptMsg: String { return VectorL10n.tr("Vector", "dm_room_participants_leave_prompt_msg") @@ -1090,6 +1098,14 @@ internal enum VectorL10n { internal static var dmRoomParticipantsLeavePromptTitle: String { return VectorL10n.tr("Vector", "dm_room_participants_leave_prompt_title") } + /// Messages here are end-to-end encrypted.\n\nYour messages are secured with locks and only you and the recipient have the unique keys to unlock them. + internal static var dmRoomParticipantsSecurityInformationRoomEncrypted: String { + return VectorL10n.tr("Vector", "dm_room_participants_security_information_room_encrypted") + } + /// Messages here are not end-to-end encrypted. + internal static var dmRoomParticipantsSecurityInformationRoomNotEncrypted: String { + return VectorL10n.tr("Vector", "dm_room_participants_security_information_room_not_encrypted") + } /// Do not ask again internal static var doNotAskAgain: String { return VectorL10n.tr("Vector", "do_not_ask_again") @@ -2642,10 +2658,6 @@ internal enum VectorL10n { internal static var roomInfoListOneMember: String { return VectorL10n.tr("Vector", "room_info_list_one_member") } - /// Messages in this room are end to end encrypted - internal static var roomInfoListRoomEncrypted: String { - return VectorL10n.tr("Vector", "room_info_list_room_encrypted") - } /// Other internal static var roomInfoListSectionOther: String { return VectorL10n.tr("Vector", "room_info_list_section_other") diff --git a/Riot/Modules/Room/Members/Detail/RoomMemberDetailsViewController.m b/Riot/Modules/Room/Members/Detail/RoomMemberDetailsViewController.m index 3ee3e4844..e1324be0e 100644 --- a/Riot/Modules/Room/Members/Detail/RoomMemberDetailsViewController.m +++ b/Riot/Modules/Room/Members/Detail/RoomMemberDetailsViewController.m @@ -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)]; diff --git a/Riot/Modules/Room/RoomInfo/RoomInfoList/RoomInfoListViewController.swift b/Riot/Modules/Room/RoomInfo/RoomInfoList/RoomInfoListViewController.swift index c125cbca1..975ecff1e 100644 --- a/Riot/Modules/Room/RoomInfo/RoomInfoList/RoomInfoListViewController.swift +++ b/Riot/Modules/Room/RoomInfo/RoomInfoList/RoomInfoListViewController.swift @@ -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) } diff --git a/Riot/Modules/Room/Settings/RoomSettingsViewController.m b/Riot/Modules/Room/Settings/RoomSettingsViewController.m index f75ffd0d7..a087762a9 100644 --- a/Riot/Modules/Room/Settings/RoomSettingsViewController.m +++ b/Riot/Modules/Room/Settings/RoomSettingsViewController.m @@ -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;