From 50f3ac0eeb56def48de1fe4c062f98c1c75a94fe Mon Sep 17 00:00:00 2001 From: Doug <6060466+pixlwave@users.noreply.github.com> Date: Wed, 28 Jun 2023 09:16:00 +0100 Subject: [PATCH] Update strings and screenshots for waitlist screen. (#1183) --- .../en.lproj/Localizable.strings | 6 ++++++ .../en.lproj/Untranslated.strings | 6 ------ .../Generated/Strings+Untranslated.swift | 16 --------------- ElementX/Sources/Generated/Strings.swift | 20 +++++++++++++++++++ .../WaitlistScreenCoordinator.swift | 2 +- .../WaitlistScreen/WaitlistScreenModels.swift | 8 ++++---- .../UITests/UITestsAppCoordinator.swift | 9 ++++++--- .../en-GB-iPad-9th-generation.waitlist.png | 3 +++ .../Application/en-GB-iPhone-14.waitlist.png | 3 +++ .../pseudo-iPad-9th-generation.waitlist.png | 3 +++ .../Application/pseudo-iPhone-14.waitlist.png | 3 +++ 11 files changed, 49 insertions(+), 30 deletions(-) create mode 100644 UITests/Sources/__Snapshots__/Application/en-GB-iPad-9th-generation.waitlist.png create mode 100644 UITests/Sources/__Snapshots__/Application/en-GB-iPhone-14.waitlist.png create mode 100644 UITests/Sources/__Snapshots__/Application/pseudo-iPad-9th-generation.waitlist.png create mode 100644 UITests/Sources/__Snapshots__/Application/pseudo-iPhone-14.waitlist.png diff --git a/ElementX/Resources/Localizations/en.lproj/Localizable.strings b/ElementX/Resources/Localizations/en.lproj/Localizable.strings index 0c2957112..cc079d663 100644 --- a/ElementX/Resources/Localizations/en.lproj/Localizable.strings +++ b/ElementX/Resources/Localizations/en.lproj/Localizable.strings @@ -94,6 +94,7 @@ "common_permalink" = "Permalink"; "common_privacy_policy" = "Privacy policy"; "common_reactions" = "Reactions"; +"common_refreshing" = "Refreshing…"; "common_replying_to" = "Replying to %1$@"; "common_report_a_bug" = "Report a bug"; "common_report_submitted" = "Report submitted"; @@ -157,6 +158,7 @@ "notification_invitation_action_reject" = "Reject"; "notification_invite_body" = "Invited you to chat"; "notification_new_messages" = "New Messages"; +"notification_reaction_body" = "Reacted with %1$@"; "notification_room_action_mark_as_read" = "Mark as read"; "notification_room_invite_body" = "Invited you to join the room"; "notification_sender_me" = "Me"; @@ -322,6 +324,10 @@ "screen_signout_confirmation_dialog_title" = "Sign out"; "screen_signout_in_progress_dialog_content" = "Signing out…"; "screen_start_chat_error_starting_chat" = "An error occurred when trying to start a chat"; +"screen_waitlist_message" = "There's a high demand for %1$@ on %2$@ at the moment. Come back to the app in a few days and try again.\n\nThanks for your patience!"; +"screen_waitlist_message_success" = "Welcome to %1$@"; +"screen_waitlist_title" = "You're on the waitlist!"; +"screen_waitlist_title_success" = "You're in!"; "session_verification_banner_message" = "Looks like you’re using a new device. Verify it’s you to access your encrypted messages."; "session_verification_banner_title" = "Access your message history"; "settings_rageshake" = "Rageshake"; diff --git a/ElementX/Resources/Localizations/en.lproj/Untranslated.strings b/ElementX/Resources/Localizations/en.lproj/Untranslated.strings index 12736b932..2b31da559 100644 --- a/ElementX/Resources/Localizations/en.lproj/Untranslated.strings +++ b/ElementX/Resources/Localizations/en.lproj/Untranslated.strings @@ -14,9 +14,3 @@ "soft_logout_clear_data_submit" = "Clear all data"; "soft_logout_clear_data_dialog_title" = "Clear data"; "soft_logout_clear_data_dialog_content" = "Clear all data currently stored on this device?\nSign in again to access your account data and messages."; - -"common_refreshing" = "Refreshing…"; -"screen_waitlist_title" = "You're on the waitlist!"; -"screen_waitlist_title_success" = "You're in!"; -"screen_waitlist_message" = "There's a high demand for %1$@ on %2$@ at the moment. Come back to the app in a few days and try again.\n\nThanks for your patience!"; -"screen_waitlist_message_success" = "Welcome to %1$@"; diff --git a/ElementX/Sources/Generated/Strings+Untranslated.swift b/ElementX/Sources/Generated/Strings+Untranslated.swift index a2c4ded53..2fb62c2fa 100644 --- a/ElementX/Sources/Generated/Strings+Untranslated.swift +++ b/ElementX/Sources/Generated/Strings+Untranslated.swift @@ -10,22 +10,6 @@ import Foundation // swiftlint:disable explicit_type_interface function_parameter_count identifier_name line_length // swiftlint:disable nesting type_body_length type_name vertical_whitespace_opening_braces public enum UntranslatedL10n { - /// Refreshing… - public static var commonRefreshing: String { return UntranslatedL10n.tr("Untranslated", "common_refreshing") } - /// There's a high demand for %1$@ on %2$@ at the moment. Come back to the app in a few days and try again. - /// - /// Thanks for your patience! - public static func screenWaitlistMessage(_ p1: Any, _ p2: Any) -> String { - return UntranslatedL10n.tr("Untranslated", "screen_waitlist_message", String(describing: p1), String(describing: p2)) - } - /// Welcome to %1$@ - public static func screenWaitlistMessageSuccess(_ p1: Any) -> String { - return UntranslatedL10n.tr("Untranslated", "screen_waitlist_message_success", String(describing: p1)) - } - /// You're on the waitlist! - public static var screenWaitlistTitle: String { return UntranslatedL10n.tr("Untranslated", "screen_waitlist_title") } - /// You're in! - public static var screenWaitlistTitleSuccess: String { return UntranslatedL10n.tr("Untranslated", "screen_waitlist_title_success") } /// Clear all data currently stored on this device? /// Sign in again to access your account data and messages. public static var softLogoutClearDataDialogContent: String { return UntranslatedL10n.tr("Untranslated", "soft_logout_clear_data_dialog_content") } diff --git a/ElementX/Sources/Generated/Strings.swift b/ElementX/Sources/Generated/Strings.swift index 9c2cb1065..f27949e7d 100644 --- a/ElementX/Sources/Generated/Strings.swift +++ b/ElementX/Sources/Generated/Strings.swift @@ -210,6 +210,8 @@ public enum L10n { public static var commonPrivacyPolicy: String { return L10n.tr("Localizable", "common_privacy_policy") } /// Reactions public static var commonReactions: String { return L10n.tr("Localizable", "common_reactions") } + /// Refreshing… + public static var commonRefreshing: String { return L10n.tr("Localizable", "common_refreshing") } /// Replying to %1$@ public static func commonReplyingTo(_ p1: Any) -> String { return L10n.tr("Localizable", "common_replying_to", String(describing: p1)) @@ -368,6 +370,10 @@ public enum L10n { public static func notificationNewMessagesForRoom(_ p1: Int) -> String { return L10n.tr("Localizable", "notification_new_messages_for_room", p1) } + /// Reacted with %1$@ + public static func notificationReactionBody(_ p1: Any) -> String { + return L10n.tr("Localizable", "notification_reaction_body", String(describing: p1)) + } /// Mark as read public static var notificationRoomActionMarkAsRead: String { return L10n.tr("Localizable", "notification_room_action_mark_as_read") } /// Quick reply @@ -812,6 +818,20 @@ public enum L10n { public static var screenSignoutPreferenceItem: String { return L10n.tr("Localizable", "screen_signout_preference_item") } /// An error occurred when trying to start a chat public static var screenStartChatErrorStartingChat: String { return L10n.tr("Localizable", "screen_start_chat_error_starting_chat") } + /// There's a high demand for %1$@ on %2$@ at the moment. Come back to the app in a few days and try again. + /// + /// Thanks for your patience! + public static func screenWaitlistMessage(_ p1: Any, _ p2: Any) -> String { + return L10n.tr("Localizable", "screen_waitlist_message", String(describing: p1), String(describing: p2)) + } + /// Welcome to %1$@ + public static func screenWaitlistMessageSuccess(_ p1: Any) -> String { + return L10n.tr("Localizable", "screen_waitlist_message_success", String(describing: p1)) + } + /// You're on the waitlist! + public static var screenWaitlistTitle: String { return L10n.tr("Localizable", "screen_waitlist_title") } + /// You're in! + public static var screenWaitlistTitleSuccess: String { return L10n.tr("Localizable", "screen_waitlist_title_success") } /// Looks like you’re using a new device. Verify it’s you to access your encrypted messages. public static var sessionVerificationBannerMessage: String { return L10n.tr("Localizable", "session_verification_banner_message") } /// Access your message history diff --git a/ElementX/Sources/Screens/Authentication/WaitlistScreen/WaitlistScreenCoordinator.swift b/ElementX/Sources/Screens/Authentication/WaitlistScreen/WaitlistScreenCoordinator.swift index 401b54cef..0b01dafcf 100644 --- a/ElementX/Sources/Screens/Authentication/WaitlistScreen/WaitlistScreenCoordinator.swift +++ b/ElementX/Sources/Screens/Authentication/WaitlistScreen/WaitlistScreenCoordinator.swift @@ -111,7 +111,7 @@ final class WaitlistScreenCoordinator: CoordinatorProtocol { private func showRefreshIndicator() { parameters.userIndicatorController.submitIndicator(UserIndicator(id: Self.refreshIndicatorID, type: .modal, - title: UntranslatedL10n.commonRefreshing, + title: L10n.commonRefreshing, persistent: true)) } diff --git a/ElementX/Sources/Screens/Authentication/WaitlistScreen/WaitlistScreenModels.swift b/ElementX/Sources/Screens/Authentication/WaitlistScreen/WaitlistScreenModels.swift index 74cd4bd29..1bec7af3d 100644 --- a/ElementX/Sources/Screens/Authentication/WaitlistScreen/WaitlistScreenModels.swift +++ b/ElementX/Sources/Screens/Authentication/WaitlistScreen/WaitlistScreenModels.swift @@ -53,17 +53,17 @@ struct WaitlistScreenViewState: BindableState { var title: String { if isWaiting { - return UntranslatedL10n.screenWaitlistTitle + return L10n.screenWaitlistTitle } else { - return UntranslatedL10n.screenWaitlistTitleSuccess + return L10n.screenWaitlistTitleSuccess } } var message: String { if isWaiting { - return UntranslatedL10n.screenWaitlistMessage(InfoPlistReader.main.bundleDisplayName, homeserver.address) + return L10n.screenWaitlistMessage(InfoPlistReader.main.bundleDisplayName, homeserver.address) } else { - return UntranslatedL10n.screenWaitlistMessageSuccess(InfoPlistReader.main.bundleDisplayName) + return L10n.screenWaitlistMessageSuccess(InfoPlistReader.main.bundleDisplayName) } } } diff --git a/ElementX/Sources/UITests/UITestsAppCoordinator.swift b/ElementX/Sources/UITests/UITestsAppCoordinator.swift index 6229c3d33..40ef2d31c 100644 --- a/ElementX/Sources/UITests/UITestsAppCoordinator.swift +++ b/ElementX/Sources/UITests/UITestsAppCoordinator.swift @@ -124,14 +124,17 @@ class MockScreen: Identifiable { credentials: credentials, keyBackupNeeded: false)) case .waitlist: + let navigationStackCoordinator = NavigationStackCoordinator() let credentials = WaitlistScreenCredentials(username: "alice", password: "password", initialDeviceName: nil, deviceID: nil, homeserver: .mockMatrixDotOrg) - return WaitlistScreenCoordinator(parameters: .init(credentials: credentials, - authenticationService: MockAuthenticationServiceProxy(), - userIndicatorController: UserIndicatorControllerMock.default)) + let coordinator = WaitlistScreenCoordinator(parameters: .init(credentials: credentials, + authenticationService: MockAuthenticationServiceProxy(), + userIndicatorController: UserIndicatorControllerMock.default)) + navigationStackCoordinator.setRootCoordinator(coordinator) + return navigationStackCoordinator case .simpleRegular: return TemplateScreenCoordinator(parameters: .init(promptType: .regular)) case .simpleUpgrade: diff --git a/UITests/Sources/__Snapshots__/Application/en-GB-iPad-9th-generation.waitlist.png b/UITests/Sources/__Snapshots__/Application/en-GB-iPad-9th-generation.waitlist.png new file mode 100644 index 000000000..3b8e3fead --- /dev/null +++ b/UITests/Sources/__Snapshots__/Application/en-GB-iPad-9th-generation.waitlist.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:04a9042d779769d3d5f7d9c405ee98c09d10e7b29503784822a9eb5d65fe1335 +size 86825 diff --git a/UITests/Sources/__Snapshots__/Application/en-GB-iPhone-14.waitlist.png b/UITests/Sources/__Snapshots__/Application/en-GB-iPhone-14.waitlist.png new file mode 100644 index 000000000..dc4f23c94 --- /dev/null +++ b/UITests/Sources/__Snapshots__/Application/en-GB-iPhone-14.waitlist.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:06364eaf85691663137f97860abd42306c83fa134160de1f9274ab427d1a7db9 +size 99246 diff --git a/UITests/Sources/__Snapshots__/Application/pseudo-iPad-9th-generation.waitlist.png b/UITests/Sources/__Snapshots__/Application/pseudo-iPad-9th-generation.waitlist.png new file mode 100644 index 000000000..9278c580e --- /dev/null +++ b/UITests/Sources/__Snapshots__/Application/pseudo-iPad-9th-generation.waitlist.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9b20644e2113d4ccc24d03a3d5818cb36086c83abf00b7a8f64e35d1002bae6d +size 108622 diff --git a/UITests/Sources/__Snapshots__/Application/pseudo-iPhone-14.waitlist.png b/UITests/Sources/__Snapshots__/Application/pseudo-iPhone-14.waitlist.png new file mode 100644 index 000000000..a8dafe3f7 --- /dev/null +++ b/UITests/Sources/__Snapshots__/Application/pseudo-iPhone-14.waitlist.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:136e986982afb54c76d94b4e413947f2db0ef194b8c9f02508ac397b5dca2b6c +size 138604