diff --git a/ElementX/Resources/Localizations/en.lproj/Localizable.strings b/ElementX/Resources/Localizations/en.lproj/Localizable.strings index 63800d955..4a21f456c 100644 --- a/ElementX/Resources/Localizations/en.lproj/Localizable.strings +++ b/ElementX/Resources/Localizations/en.lproj/Localizable.strings @@ -50,7 +50,7 @@ "action_no" = "No"; "action_not_now" = "Not now"; "action_ok" = "OK"; -"action_open_settings" = "Open settings"; +"action_open_settings" = "Settings"; "action_open_with" = "Open with"; "action_quick_reply" = "Quick reply"; "action_quote" = "Quote"; @@ -167,12 +167,17 @@ "common_video" = "Video"; "common_voice_message" = "Voice message"; "common_waiting" = "Waiting…"; +"common_waiting_for_decryption_key" = "Waiting for decryption key"; "common_poll_end_confirmation" = "Are you sure you want to end this poll?"; "common_poll_summary" = "Poll: %1$@"; "crash_detection_dialog_content" = "%1$@ crashed the last time it was used. Would you like to share a crash report with us?"; "dialog_permission_camera" = "In order to let the application use the camera, please grant the permission in the system settings."; "dialog_permission_generic" = "Please grant the permission in the system settings."; +"dialog_permission_location_description_ios" = "Grant access in Settings -> Location."; +"dialog_permission_location_title_ios" = "%1$@ does not have access to your location."; "dialog_permission_microphone" = "In order to let the application use the microphone, please grant the permission in the system settings."; +"dialog_permission_microphone_description_ios" = "Grant access so you can record and send messages with audio."; +"dialog_permission_microphone_title_ios" = "%1$@ needs permission to access your microphone."; "dialog_permission_notification" = "In order to let the application display notifications, please grant the permission in the system settings."; "dialog_title_confirmation" = "Confirmation"; "dialog_title_warning" = "Warning"; @@ -414,6 +419,8 @@ "screen_recovery_key_confirm_key_placeholder" = "Enter..."; "screen_recovery_key_confirm_success" = "Recovery key confirmed"; "screen_recovery_key_confirm_title" = "Confirm your recovery key"; +"screen_recovery_key_copied_to_clipboard" = "Copied recovery key"; +"screen_recovery_key_generating_key" = "Generating…"; "screen_recovery_key_save_action" = "Save recovery key"; "screen_recovery_key_save_description" = "Write down your recovery key somewhere safe or save it in a password manager."; "screen_recovery_key_save_key_description" = "Tap to copy recovery key"; @@ -452,7 +459,8 @@ "screen_room_details_room_name_label" = "Room name"; "screen_room_details_share_room_title" = "Share room"; "screen_room_details_updating_room" = "Updating room…"; -"screen_room_encrypted_history_banner" = "Message history is currently unavailable in this room"; +"screen_room_encrypted_history_banner" = "Message history is currently unavailable."; +"screen_room_encrypted_history_banner_unverified" = "Message history is unavailable in this room. Verify this device to see your message history."; "screen_room_error_failed_retrieving_user_details" = "Could not retrieve user details"; "screen_room_invite_again_alert_message" = "Would you like to invite them back?"; "screen_room_invite_again_alert_title" = "You are alone in this chat"; @@ -521,13 +529,19 @@ "screen_signed_out_reason_3" = "Your server’s administrator has invalidated your access"; "screen_signed_out_subtitle" = "You might have been signed out for one of the reasons listed below. Please sign in again to continue using %@."; "screen_signed_out_title" = "You’re signed out"; -"screen_signout_backing_up_subtitle" = "Please wait for this to complete before signing out."; -"screen_signout_backing_up_title" = "Your keys are still being backed up"; "screen_signout_confirmation_dialog_content" = "Are you sure you want to sign out?"; "screen_signout_confirmation_dialog_title" = "Sign out"; "screen_signout_in_progress_dialog_content" = "Signing out…"; -"screen_signout_last_session_subtitle" = "You are about to sign out of your last session. If you sign out now, you might lose access to your encrypted messages."; -"screen_signout_last_session_title" = "Have you saved your recovery key?"; +"screen_signout_key_backup_disabled_subtitle" = "You are about to sign out of your last session. If you sign out now, you will lose access to your encrypted messages."; +"screen_signout_key_backup_disabled_title" = "You have turned off backup"; +"screen_signout_key_backup_offline_subtitle" = "Your keys were still being backed up when you went offline. Reconnect so that your keys can be backed up before signing out."; +"screen_signout_key_backup_offline_title" = "Your keys are still being backed up"; +"screen_signout_key_backup_ongoing_subtitle" = "Please wait for this to complete before signing out."; +"screen_signout_key_backup_ongoing_title" = "Your keys are still being backed up"; +"screen_signout_recovery_disabled_subtitle" = "You are about to sign out of your last session. If you sign out now, you'll lose access to your encrypted messages."; +"screen_signout_recovery_disabled_title" = "Recovery not set up"; +"screen_signout_save_recovery_key_subtitle" = "You are about to sign out of your last session. If you sign out now, you might lose access to your encrypted messages."; +"screen_signout_save_recovery_key_title" = "Have you saved your recovery key?"; "screen_start_chat_error_starting_chat" = "An error occurred when trying to start a chat"; "screen_view_location_title" = "Location"; "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!"; diff --git a/ElementX/Sources/Generated/Strings.swift b/ElementX/Sources/Generated/Strings.swift index 72862c1be..c51099d3e 100644 --- a/ElementX/Sources/Generated/Strings.swift +++ b/ElementX/Sources/Generated/Strings.swift @@ -120,7 +120,7 @@ public enum L10n { public static var actionNotNow: String { return L10n.tr("Localizable", "action_not_now") } /// OK public static var actionOk: String { return L10n.tr("Localizable", "action_ok") } - /// Open settings + /// Settings public static var actionOpenSettings: String { return L10n.tr("Localizable", "action_open_settings") } /// Open with public static var actionOpenWith: String { return L10n.tr("Localizable", "action_open_with") } @@ -374,6 +374,8 @@ public enum L10n { public static var commonVoiceMessage: String { return L10n.tr("Localizable", "common_voice_message") } /// Waiting… public static var commonWaiting: String { return L10n.tr("Localizable", "common_waiting") } + /// Waiting for decryption key + public static var commonWaitingForDecryptionKey: String { return L10n.tr("Localizable", "common_waiting_for_decryption_key") } /// %1$@ crashed the last time it was used. Would you like to share a crash report with us? public static func crashDetectionDialogContent(_ p1: Any) -> String { return L10n.tr("Localizable", "crash_detection_dialog_content", String(describing: p1)) @@ -382,8 +384,20 @@ public enum L10n { public static var dialogPermissionCamera: String { return L10n.tr("Localizable", "dialog_permission_camera") } /// Please grant the permission in the system settings. public static var dialogPermissionGeneric: String { return L10n.tr("Localizable", "dialog_permission_generic") } + /// Grant access in Settings -> Location. + public static var dialogPermissionLocationDescriptionIos: String { return L10n.tr("Localizable", "dialog_permission_location_description_ios") } + /// %1$@ does not have access to your location. + public static func dialogPermissionLocationTitleIos(_ p1: Any) -> String { + return L10n.tr("Localizable", "dialog_permission_location_title_ios", String(describing: p1)) + } /// In order to let the application use the microphone, please grant the permission in the system settings. public static var dialogPermissionMicrophone: String { return L10n.tr("Localizable", "dialog_permission_microphone") } + /// Grant access so you can record and send messages with audio. + public static var dialogPermissionMicrophoneDescriptionIos: String { return L10n.tr("Localizable", "dialog_permission_microphone_description_ios") } + /// %1$@ needs permission to access your microphone. + public static func dialogPermissionMicrophoneTitleIos(_ p1: Any) -> String { + return L10n.tr("Localizable", "dialog_permission_microphone_title_ios", String(describing: p1)) + } /// In order to let the application display notifications, please grant the permission in the system settings. public static var dialogPermissionNotification: String { return L10n.tr("Localizable", "dialog_permission_notification") } /// Confirmation @@ -1002,6 +1016,10 @@ public enum L10n { public static var screenRecoveryKeyConfirmSuccess: String { return L10n.tr("Localizable", "screen_recovery_key_confirm_success") } /// Confirm your recovery key public static var screenRecoveryKeyConfirmTitle: String { return L10n.tr("Localizable", "screen_recovery_key_confirm_title") } + /// Copied recovery key + public static var screenRecoveryKeyCopiedToClipboard: String { return L10n.tr("Localizable", "screen_recovery_key_copied_to_clipboard") } + /// Generating… + public static var screenRecoveryKeyGeneratingKey: String { return L10n.tr("Localizable", "screen_recovery_key_generating_key") } /// Save recovery key public static var screenRecoveryKeySaveAction: String { return L10n.tr("Localizable", "screen_recovery_key_save_action") } /// Write down your recovery key somewhere safe or save it in a password manager. @@ -1086,8 +1104,10 @@ public enum L10n { public static var screenRoomDetailsTopicTitle: String { return L10n.tr("Localizable", "screen_room_details_topic_title") } /// Updating room… public static var screenRoomDetailsUpdatingRoom: String { return L10n.tr("Localizable", "screen_room_details_updating_room") } - /// Message history is currently unavailable in this room + /// Message history is currently unavailable. public static var screenRoomEncryptedHistoryBanner: String { return L10n.tr("Localizable", "screen_room_encrypted_history_banner") } + /// Message history is unavailable in this room. Verify this device to see your message history. + public static var screenRoomEncryptedHistoryBannerUnverified: String { return L10n.tr("Localizable", "screen_room_encrypted_history_banner_unverified") } /// Failed processing media to upload, please try again. public static var screenRoomErrorFailedProcessingMedia: String { return L10n.tr("Localizable", "screen_room_error_failed_processing_media") } /// Could not retrieve user details @@ -1238,10 +1258,6 @@ public enum L10n { } /// You’re signed out public static var screenSignedOutTitle: String { return L10n.tr("Localizable", "screen_signed_out_title") } - /// Please wait for this to complete before signing out. - public static var screenSignoutBackingUpSubtitle: String { return L10n.tr("Localizable", "screen_signout_backing_up_subtitle") } - /// Your keys are still being backed up - public static var screenSignoutBackingUpTitle: String { return L10n.tr("Localizable", "screen_signout_backing_up_title") } /// Are you sure you want to sign out? public static var screenSignoutConfirmationDialogContent: String { return L10n.tr("Localizable", "screen_signout_confirmation_dialog_content") } /// Sign out @@ -1250,12 +1266,28 @@ public enum L10n { public static var screenSignoutConfirmationDialogTitle: String { return L10n.tr("Localizable", "screen_signout_confirmation_dialog_title") } /// Signing out… public static var screenSignoutInProgressDialogContent: String { return L10n.tr("Localizable", "screen_signout_in_progress_dialog_content") } - /// You are about to sign out of your last session. If you sign out now, you might lose access to your encrypted messages. - public static var screenSignoutLastSessionSubtitle: String { return L10n.tr("Localizable", "screen_signout_last_session_subtitle") } - /// Have you saved your recovery key? - public static var screenSignoutLastSessionTitle: String { return L10n.tr("Localizable", "screen_signout_last_session_title") } + /// You are about to sign out of your last session. If you sign out now, you will lose access to your encrypted messages. + public static var screenSignoutKeyBackupDisabledSubtitle: String { return L10n.tr("Localizable", "screen_signout_key_backup_disabled_subtitle") } + /// You have turned off backup + public static var screenSignoutKeyBackupDisabledTitle: String { return L10n.tr("Localizable", "screen_signout_key_backup_disabled_title") } + /// Your keys were still being backed up when you went offline. Reconnect so that your keys can be backed up before signing out. + public static var screenSignoutKeyBackupOfflineSubtitle: String { return L10n.tr("Localizable", "screen_signout_key_backup_offline_subtitle") } + /// Your keys are still being backed up + public static var screenSignoutKeyBackupOfflineTitle: String { return L10n.tr("Localizable", "screen_signout_key_backup_offline_title") } + /// Please wait for this to complete before signing out. + public static var screenSignoutKeyBackupOngoingSubtitle: String { return L10n.tr("Localizable", "screen_signout_key_backup_ongoing_subtitle") } + /// Your keys are still being backed up + public static var screenSignoutKeyBackupOngoingTitle: String { return L10n.tr("Localizable", "screen_signout_key_backup_ongoing_title") } /// Sign out public static var screenSignoutPreferenceItem: String { return L10n.tr("Localizable", "screen_signout_preference_item") } + /// You are about to sign out of your last session. If you sign out now, you'll lose access to your encrypted messages. + public static var screenSignoutRecoveryDisabledSubtitle: String { return L10n.tr("Localizable", "screen_signout_recovery_disabled_subtitle") } + /// Recovery not set up + public static var screenSignoutRecoveryDisabledTitle: String { return L10n.tr("Localizable", "screen_signout_recovery_disabled_title") } + /// You are about to sign out of your last session. If you sign out now, you might lose access to your encrypted messages. + public static var screenSignoutSaveRecoveryKeySubtitle: String { return L10n.tr("Localizable", "screen_signout_save_recovery_key_subtitle") } + /// Have you saved your recovery key? + public static var screenSignoutSaveRecoveryKeyTitle: String { return L10n.tr("Localizable", "screen_signout_save_recovery_key_title") } /// An error occurred when trying to start a chat public static var screenStartChatErrorStartingChat: String { return L10n.tr("Localizable", "screen_start_chat_error_starting_chat") } /// Location diff --git a/ElementX/Sources/Screens/LocationSharing/LocationSharingScreenModels.swift b/ElementX/Sources/Screens/LocationSharing/LocationSharingScreenModels.swift index d4fcb3055..680c1eccc 100644 --- a/ElementX/Sources/Screens/LocationSharing/LocationSharingScreenModels.swift +++ b/ElementX/Sources/Screens/LocationSharing/LocationSharingScreenModels.swift @@ -148,8 +148,8 @@ extension AlertInfo where T == LocationSharingViewError { switch error { case .missingAuthorization: self.init(id: error, - title: "", - message: L10n.errorMissingLocationAuthIos(InfoPlistReader.main.bundleDisplayName), + title: L10n.dialogPermissionLocationTitleIos(InfoPlistReader.main.bundleDisplayName), + message: L10n.dialogPermissionLocationDescriptionIos, primaryButton: primaryButton, secondaryButton: secondaryButton) case .mapError(.failedLoadingMap): diff --git a/ElementX/Sources/Screens/LocationSharing/StaticLocationScreenViewModel.swift b/ElementX/Sources/Screens/LocationSharing/StaticLocationScreenViewModel.swift index 426f850a6..51d879145 100644 --- a/ElementX/Sources/Screens/LocationSharing/StaticLocationScreenViewModel.swift +++ b/ElementX/Sources/Screens/LocationSharing/StaticLocationScreenViewModel.swift @@ -48,7 +48,7 @@ class StaticLocationScreenViewModel: StaticLocationScreenViewModelType, StaticLo let action: () -> Void = { [weak self] in self?.actionsSubject.send(.openSystemSettings) } state.bindings.alertInfo = .init(locationSharingViewError: .missingAuthorization, primaryButton: .init(title: L10n.actionNotNow, role: .cancel, action: nil), - secondaryButton: .init(title: L10n.commonSettings, action: action)) + secondaryButton: .init(title: L10n.actionOpenSettings, action: action)) } } } diff --git a/ElementX/Sources/Screens/RoomScreen/RoomScreenViewModel.swift b/ElementX/Sources/Screens/RoomScreen/RoomScreenViewModel.swift index 0c47cc7d2..c53738285 100644 --- a/ElementX/Sources/Screens/RoomScreen/RoomScreenViewModel.swift +++ b/ElementX/Sources/Screens/RoomScreen/RoomScreenViewModel.swift @@ -954,8 +954,8 @@ class RoomScreenViewModel: RoomScreenViewModelType, RoomScreenViewModelProtocol switch error { case .audioRecorderError(.recordPermissionNotGranted): state.bindings.confirmationAlertInfo = .init(id: .init(), - title: "", - message: L10n.dialogPermissionMicrophone, + title: L10n.dialogPermissionMicrophoneTitleIos(InfoPlistReader.main.bundleDisplayName), + message: L10n.dialogPermissionMicrophoneDescriptionIos, primaryButton: .init(title: L10n.actionOpenSettings, action: { [weak self] in self?.openSystemSettings() }), secondaryButton: .init(title: L10n.actionNotNow, role: .cancel, action: nil)) default: diff --git a/ElementX/SupportingFiles/Info.plist b/ElementX/SupportingFiles/Info.plist index f757b0165..a41670afa 100644 --- a/ElementX/SupportingFiles/Info.plist +++ b/ElementX/SupportingFiles/Info.plist @@ -67,9 +67,9 @@ NSCameraUsageDescription To take pictures or videos and send them as a message $(APP_DISPLAY_NAME) needs access to the camera. NSLocationWhenInUseUsageDescription - When you share your location to people, $(APP_DISPLAY_NAME) needs access to show them a map. + Grant location access so that $(APP_DISPLAY_NAME) can share your location. NSMicrophoneUsageDescription - To take videos with audio and send them as a message $(APP_DISPLAY_NAME) needs access to the microphone. + To record and send messages with audio, $(APP_DISPLAY_NAME) needs to access the microphone. NSPhotoLibraryAddUsageDescription Allows saving photos and videos to your library. NSUserActivityTypes diff --git a/ElementX/SupportingFiles/target.yml b/ElementX/SupportingFiles/target.yml index 826cd388c..845132bc5 100644 --- a/ElementX/SupportingFiles/target.yml +++ b/ElementX/SupportingFiles/target.yml @@ -84,9 +84,9 @@ targets: INSendMessageIntent ] NSCameraUsageDescription: To take pictures or videos and send them as a message $(APP_DISPLAY_NAME) needs access to the camera. - NSMicrophoneUsageDescription: To take videos with audio and send them as a message $(APP_DISPLAY_NAME) needs access to the microphone. + NSMicrophoneUsageDescription: To record and send messages with audio, $(APP_DISPLAY_NAME) needs to access the microphone. NSPhotoLibraryAddUsageDescription: Allows saving photos and videos to your library. - NSLocationWhenInUseUsageDescription: When you share your location to people, $(APP_DISPLAY_NAME) needs access to show them a map. + NSLocationWhenInUseUsageDescription: Grant location access so that $(APP_DISPLAY_NAME) can share your location. UIBackgroundModes: [ fetch, audio, diff --git a/UnitTests/Sources/StaticLocationScreenViewModelTests.swift b/UnitTests/Sources/StaticLocationScreenViewModelTests.swift index a8a6625a7..9277c433f 100644 --- a/UnitTests/Sources/StaticLocationScreenViewModelTests.swift +++ b/UnitTests/Sources/StaticLocationScreenViewModelTests.swift @@ -75,7 +75,7 @@ class StaticLocationScreenViewModelTests: XCTestCase { let locationError = AlertInfo(locationSharingViewError: .mapError(.failedLocatingUser)) XCTAssertEqual(locationError.message, L10n.errorFailedLocatingUser(InfoPlistReader.main.bundleDisplayName)) let authorizationError = AlertInfo(locationSharingViewError: .missingAuthorization) - XCTAssertEqual(authorizationError.message, L10n.errorMissingLocationAuthIos(InfoPlistReader.main.bundleDisplayName)) + XCTAssertEqual(authorizationError.message, L10n.dialogPermissionLocationDescriptionIos) } func testSendUserLocation() async throws { diff --git a/UnitTests/__Snapshots__/PreviewTests/test_encryptedHistoryRoomTimelineView.1.png b/UnitTests/__Snapshots__/PreviewTests/test_encryptedHistoryRoomTimelineView.1.png index 20c09b411..bd37c3995 100644 --- a/UnitTests/__Snapshots__/PreviewTests/test_encryptedHistoryRoomTimelineView.1.png +++ b/UnitTests/__Snapshots__/PreviewTests/test_encryptedHistoryRoomTimelineView.1.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:0e4c2524edd0ca67fae13f9481839ac9fe892ae4f19a911dd210befd51cae6a1 -size 72599 +oid sha256:bcbd11ba0914a24d5a68406599a0ce1d061825c25af02a0fe04584d86f117cb5 +size 68842