Merge pull request #7138 from vector-im/alfogrillo/unverified_sessions_refinements

Update unverifiable sessions copies (PSG-1002)
This commit is contained in:
Alfonso Grillo 2022-12-06 15:34:30 +01:00 committed by GitHub
commit 1efa7c1485
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 14 additions and 5 deletions

View file

@ -2459,7 +2459,7 @@ To enable access, tap Settings> Location and select Always";
"user_session_unverified_additional_info" = "Verify your current session for enhanced secure messaging.";
"user_session_verification_unknown_additional_info" = "Verify your current session to reveal this session's verification status.";
"user_other_session_unverified_additional_info" = "Verify or sign out from this session for best security and reliability.";
"user_other_session_permanently_unverified_additional_info" = "This session cannot be verified because it does not support encryption.";
"user_other_session_permanently_unverified_additional_info" = "This session doesnt support encryption and thus can't be verified.";
"user_other_session_verified_additional_info" = "This session is ready for secure messaging.";
"user_session_push_notifications" = "Push notifications";
"user_session_push_notifications_message" = "When turned on, this session will receive push notifications.";
@ -2468,6 +2468,7 @@ To enable access, tap Settings> Location and select Always";
"user_session_verified_session_description" = "Verified sessions are anywhere you are using Element after entering your passphrase or confirming your identity with another verified session.\n\nThis means that you have all the keys needed to unlock your encrypted messages and confirm to other users that you trust this session.";
"user_session_unverified_session_title" = "Unverified session";
"user_session_unverified_session_description" = "Unverified sessions are sessions that have logged in with your credentials but not been cross-verified.\n\nYou should make especially certain that you recognise these sessions as they could represent an unauthorised use of your account.";
"user_session_permanently_unverified_session_description" = "This session doesn't support encryption, so it can't be verified.\n\nYou won't be able to participate in rooms where encryption is enabled when using this session.\n\nFor best security and privacy, it is recommended to use Matrix clients that support encryption.";
"user_session_inactive_session_title" = "Inactive sessions";
"user_session_inactive_session_description" = "Inactive sessions are sessions you have not used in some time, but they continue to receive encryption keys.\n\nRemoving inactive sessions improves security and performance, and makes it easier for you to identify if a new session is suspicious.";
"user_session_rename_session_title" = "Renaming sessions";

View file

@ -8723,7 +8723,7 @@ public class VectorL10n: NSObject {
public static var userOtherSessionNoVerifiedSessions: String {
return VectorL10n.tr("Vector", "user_other_session_no_verified_sessions")
}
/// This session cannot be verified because it does not support encryption.
/// This session doesnt support encryption and thus can't be verified.
public static var userOtherSessionPermanentlyUnverifiedAdditionalInfo: String {
return VectorL10n.tr("Vector", "user_other_session_permanently_unverified_additional_info")
}
@ -8855,6 +8855,10 @@ public class VectorL10n: NSObject {
public static var userSessionOverviewSessionTitle: String {
return VectorL10n.tr("Vector", "user_session_overview_session_title")
}
/// This session doesn't support encryption, so it can't be verified.\n\nYou won't be able to participate in rooms where encryption is enabled when using this session.\n\nFor best security and privacy, it is recommended to use Matrix clients that support encryption.
public static var userSessionPermanentlyUnverifiedSessionDescription: String {
return VectorL10n.tr("Vector", "user_session_permanently_unverified_session_description")
}
/// Push notifications
public static var userSessionPushNotifications: String {
return VectorL10n.tr("Vector", "user_session_push_notifications")

View file

@ -86,7 +86,7 @@ struct UserSessionCardViewData {
case .unverified:
return isCurrentSessionDisplayMode ? VectorL10n.userSessionUnverifiedAdditionalInfo : VectorL10n.userOtherSessionUnverifiedAdditionalInfo + " %@"
case .permanentlyUnverified:
return VectorL10n.userOtherSessionPermanentlyUnverifiedAdditionalInfo
return isCurrentSessionDisplayMode ? VectorL10n.userOtherSessionPermanentlyUnverifiedAdditionalInfo : VectorL10n.userOtherSessionPermanentlyUnverifiedAdditionalInfo + " %@"
case .unknown:
return VectorL10n.userSessionVerificationUnknownAdditionalInfo
}

View file

@ -476,8 +476,10 @@ private extension UserSessionInfo {
var bottomSheetDescription: String {
switch verificationState {
case .unverified, .permanentlyUnverified:
case .unverified:
return VectorL10n.userSessionUnverifiedSessionDescription
case .permanentlyUnverified:
return VectorL10n.userSessionPermanentlyUnverifiedSessionDescription
case .verified:
return VectorL10n.userSessionVerifiedSessionDescription
case .unknown:

View file

@ -96,6 +96,7 @@ class UserSessionOverviewUITests: MockScreenTestCase {
func test_whenPermanentlySessionSelected_copyIsCorrect() {
app.goToScreenWithIdentifier(MockUserSessionOverviewScreenState.otherSession(sessionState: .permanentlyUnverified).title)
XCTAssertTrue(app.buttons[VectorL10n.userOtherSessionPermanentlyUnverifiedAdditionalInfo].exists)
let buttonId = "\(VectorL10n.userOtherSessionPermanentlyUnverifiedAdditionalInfo) \(VectorL10n.userSessionLearnMore)"
XCTAssertTrue(app.buttons[buttonId].exists)
}
}

View file

@ -0,0 +1 @@
Update unverifiable sessions copies in the Device Manager.