Skip to content

Commit

Permalink
Update strings and rebase.
Browse files Browse the repository at this point in the history
  • Loading branch information
pixlwave committed Oct 11, 2022
1 parent 6ee4c7e commit 92f5488
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 13 deletions.
2 changes: 2 additions & 0 deletions Riot/Assets/en.lproj/Vector.strings
Original file line number Diff line number Diff line change
Expand Up @@ -2420,8 +2420,10 @@ To enable access, tap Settings> Location and select Always";

"user_session_verified" = "Verified session";
"user_session_unverified" = "Unverified session";
"user_session_verification_unknown" = "Unknown verification status";
"user_session_verified_short" = "Verified";
"user_session_unverified_short" = "Unverified";
"user_session_verification_unknown_short" = "Unknown";

"user_session_verify_action" = "Verify session";
"user_session_view_details" = "View details";
Expand Down
8 changes: 8 additions & 0 deletions Riot/Generated/Strings.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8751,6 +8751,14 @@ public class VectorL10n: NSObject {
public static var userSessionUnverifiedShort: String {
return VectorL10n.tr("Vector", "user_session_unverified_short")
}
/// Unknown verification status
public static var userSessionVerificationUnknown: String {
return VectorL10n.tr("Vector", "user_session_verification_unknown")
}
/// Unknown
public static var userSessionVerificationUnknownShort: String {
return VectorL10n.tr("Vector", "user_session_verification_unknown_short")
}
/// Verified session
public static var userSessionVerified: String {
return VectorL10n.tr("Vector", "user_session_verified")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ struct UserSessionCardViewData {
return Asset.Images.userSessionVerified.name
case .unverified:
return Asset.Images.userSessionUnverified.name
case.unknown:
case .unknown:
return Asset.Images.userSessionVerificationUnknown.name
}
}
Expand All @@ -58,8 +58,8 @@ struct UserSessionCardViewData {
return VectorL10n.userSessionVerified
case .unverified:
return VectorL10n.userSessionUnverified
case.unknown:
return VectorL10n.userSessionUnverified; #warning("Add a string here?")
case .unknown:
return VectorL10n.userSessionVerificationUnknown
}
}

Expand All @@ -70,7 +70,7 @@ struct UserSessionCardViewData {
return \.accent
case .unverified:
return \.alert
case.unknown:
case .unknown:
return \.secondaryContent
}
}
Expand All @@ -82,8 +82,8 @@ struct UserSessionCardViewData {
return VectorL10n.userSessionVerifiedAdditionalInfo
case .unverified:
return VectorL10n.userSessionUnverifiedAdditionalInfo
case.unknown:
return VectorL10n.userSessionUnverifiedAdditionalInfo; #warning("Add a string here?")
case .unknown:
return VectorL10n.userSessionUnverifiedAdditionalInfo
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ enum MockUserOtherSessionsScreenState: MockScreenState, CaseIterable {
[UserSessionInfo(id: "0",
name: "iOS",
deviceType: .mobile,
isVerified: false,
verificationState: .unverified,
lastSeenIP: "10.0.0.10",
lastSeenTimestamp: Date().timeIntervalSince1970 - 500_000,
applicationName: nil,
Expand All @@ -187,7 +187,7 @@ enum MockUserOtherSessionsScreenState: MockScreenState, CaseIterable {
UserSessionInfo(id: "1",
name: "macOS",
deviceType: .desktop,
isVerified: true,
verificationState: .verified,
lastSeenIP: "1.0.0.1",
lastSeenTimestamp: Date().timeIntervalSince1970 - 8_000_000,
applicationName: nil,
Expand All @@ -203,7 +203,7 @@ enum MockUserOtherSessionsScreenState: MockScreenState, CaseIterable {
UserSessionInfo(id: "2",
name: "Firefox on Windows",
deviceType: .web,
isVerified: true,
verificationState: .verified,
lastSeenIP: "2.0.0.2",
lastSeenTimestamp: Date().timeIntervalSince1970 - 9_000_000,
applicationName: nil,
Expand All @@ -219,7 +219,7 @@ enum MockUserOtherSessionsScreenState: MockScreenState, CaseIterable {
UserSessionInfo(id: "3",
name: "Android",
deviceType: .mobile,
isVerified: false,
verificationState: .unverified,
lastSeenIP: "3.0.0.3",
lastSeenTimestamp: Date().timeIntervalSince1970 - 10_000_000,
applicationName: nil,
Expand All @@ -235,7 +235,7 @@ enum MockUserOtherSessionsScreenState: MockScreenState, CaseIterable {
UserSessionInfo(id: "4",
name: "iOS",
deviceType: .mobile,
isVerified: false,
verificationState: .unverified,
lastSeenIP: "10.0.0.10",
lastSeenTimestamp: Date().timeIntervalSince1970 - 11_000_000,
applicationName: nil,
Expand All @@ -251,7 +251,7 @@ enum MockUserOtherSessionsScreenState: MockScreenState, CaseIterable {
UserSessionInfo(id: "5",
name: "macOS",
deviceType: .desktop,
isVerified: true,
verificationState: .verified,
lastSeenIP: "1.0.0.1",
lastSeenTimestamp: Date().timeIntervalSince1970 - 20_000_000,
applicationName: nil,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ struct UserSessionListItemViewDataFactory {
case .unverified:
sessionStatusText = VectorL10n.userSessionUnverifiedShort
case .unknown:
sessionStatusText = VectorL10n.userSessionUnverifiedShort; #warning("Add a string for this.")
sessionStatusText = VectorL10n.userSessionVerificationUnknownShort
}

var lastActivityDateString: String?
Expand Down

0 comments on commit 92f5488

Please sign in to comment.