diff --git a/ElementX/Resources/Localizations/en-US.lproj/Localizable.strings b/ElementX/Resources/Localizations/en-US.lproj/Localizable.strings index c1e2ebbf4..0895f59c2 100644 --- a/ElementX/Resources/Localizations/en-US.lproj/Localizable.strings +++ b/ElementX/Resources/Localizations/en-US.lproj/Localizable.strings @@ -880,6 +880,7 @@ "screen_encryption_reset_subtitle" = "If you don’t have access to any other verified devices and you don’t have your recovery key, then you’ll need to reset your digital identity to continue using the app."; "screen_encryption_reset_title" = "Can't confirm? You’ll need to reset your digital identity."; "screen_home_tab_chats" = "Chats"; +"screen_home_tab_search" = "Search"; "screen_home_tab_spaces" = "Spaces"; "screen_identity_confirmation_cannot_confirm" = "Can't confirm?"; "screen_identity_confirmation_create_new_recovery_key" = "Create a new recovery key"; @@ -1497,6 +1498,12 @@ "screen_roomlist_mark_as_unread" = "Mark as unread"; "screen_roomlist_tombstoned_room_description" = "This room has been upgraded"; "screen_roomlist_your_spaces" = "Your spaces"; +"screen_search_empty_state_message" = "Search for chats and messages"; +"screen_search_empty_state_title" = "Start searching"; +"screen_search_no_results_message" = "There are no results for “%1$@.” Try a new search term."; +"screen_search_recent_searches" = "Recent searches"; +"screen_search_tab_chats" = "Chats"; +"screen_search_tab_messages" = "Messages"; "screen_security_and_privacy_add_room_address_action" = "Add address"; "screen_security_and_privacy_ask_to_join_multiple_spaces_members_option_description" = "Anyone in authorized spaces can join, but everyone else must request access."; "screen_security_and_privacy_ask_to_join_option_description" = "Everyone must request access."; diff --git a/ElementX/Resources/Localizations/en.lproj/Localizable.strings b/ElementX/Resources/Localizations/en.lproj/Localizable.strings index 89d21b3e9..3c0184f27 100644 --- a/ElementX/Resources/Localizations/en.lproj/Localizable.strings +++ b/ElementX/Resources/Localizations/en.lproj/Localizable.strings @@ -880,6 +880,7 @@ "screen_encryption_reset_subtitle" = "If you don’t have access to any other verified devices and you don’t have your recovery key, then you’ll need to reset your digital identity to continue using the app."; "screen_encryption_reset_title" = "Can't confirm? You’ll need to reset your digital identity."; "screen_home_tab_chats" = "Chats"; +"screen_home_tab_search" = "Search"; "screen_home_tab_spaces" = "Spaces"; "screen_identity_confirmation_cannot_confirm" = "Can't confirm?"; "screen_identity_confirmation_create_new_recovery_key" = "Create a new recovery key"; @@ -1497,6 +1498,12 @@ "screen_roomlist_mark_as_unread" = "Mark as unread"; "screen_roomlist_tombstoned_room_description" = "This room has been upgraded"; "screen_roomlist_your_spaces" = "Your spaces"; +"screen_search_empty_state_message" = "Search for chats and messages"; +"screen_search_empty_state_title" = "Start searching"; +"screen_search_no_results_message" = "There are no results for “%1$@.” Try a new search term."; +"screen_search_recent_searches" = "Recent searches"; +"screen_search_tab_chats" = "Chats"; +"screen_search_tab_messages" = "Messages"; "screen_security_and_privacy_add_room_address_action" = "Add address"; "screen_security_and_privacy_ask_to_join_multiple_spaces_members_option_description" = "Anyone in authorised spaces can join, but everyone else must request access."; "screen_security_and_privacy_ask_to_join_option_description" = "Everyone must request access."; diff --git a/ElementX/Resources/Localizations/en.lproj/SAS.strings b/ElementX/Resources/Localizations/en.lproj/SAS.strings index d29ccc232..dcd93cf93 100644 --- a/ElementX/Resources/Localizations/en.lproj/SAS.strings +++ b/ElementX/Resources/Localizations/en.lproj/SAS.strings @@ -61,4 +61,4 @@ "trumpet" = "Trumpet"; "turtle" = "Turtle"; "umbrella" = "Umbrella"; -"unicorn" = "Unicorn"; \ No newline at end of file +"unicorn" = "Unicorn"; diff --git a/ElementX/Resources/Localizations/en.lproj/Untranslated.strings b/ElementX/Resources/Localizations/en.lproj/Untranslated.strings index 695beb6dd..450402793 100644 --- a/ElementX/Resources/Localizations/en.lproj/Untranslated.strings +++ b/ElementX/Resources/Localizations/en.lproj/Untranslated.strings @@ -1,10 +1,3 @@ -"screen_home_tab_search" = "Search"; -"screen_search_empty_state_message" = "Search for chats and messages"; -"screen_search_empty_state_title" = "Start searching..."; -"screen_search_no_results_message" = "There are no results for “%1$@.” Try a new search term."; -"screen_search_recent_searches" = "Recent searches"; -"screen_search_tab_chats" = "Chats"; -"screen_search_tab_messages" = "Messages"; "soft_logout_clear_data_dialog_content" = "Clear all data currently stored on this device?\nSign in again to access your account data and messages."; "soft_logout_clear_data_dialog_title" = "Clear data"; "soft_logout_clear_data_notice" = "Warning: Your personal data (including encryption keys) is still stored on this device.\n\nClear it if you’re finished using this device, or want to sign in to another account."; diff --git a/ElementX/Sources/FlowCoordinators/UserSessionFlowCoordinator.swift b/ElementX/Sources/FlowCoordinators/UserSessionFlowCoordinator.swift index a8a392b5b..6eafb981e 100644 --- a/ElementX/Sources/FlowCoordinators/UserSessionFlowCoordinator.swift +++ b/ElementX/Sources/FlowCoordinators/UserSessionFlowCoordinator.swift @@ -90,13 +90,23 @@ class UserSessionFlowCoordinator: FlowCoordinatorProtocol { let chatsSplitCoordinator = NavigationSplitCoordinator(placeholderCoordinator: PlaceholderScreenCoordinator(hideBrandChrome: flowParameters.userSession.userSettings.app.hideBrandChrome)) chatsTabFlowCoordinator = ChatsTabFlowCoordinator(navigationSplitCoordinator: chatsSplitCoordinator, flowParameters: flowParameters) - chatsTabDetails = .init(tag: HomeTab.chats, title: L10n.screenHomeTabChats, icon: \.chat, selectedIcon: \.chatSolid, accessibilityIdentifier: A11yIdentifiers.homeTabs.chats) + chatsTabDetails = .init(tag: HomeTab.chats, + title: L10n.screenHomeTabChats, + icon: \.chat, + selectedIcon: \.chatSolid, + accessibilityIdentifier: A11yIdentifiers.homeTabs.chats) + chatsTabDetails.navigationSplitCoordinator = chatsSplitCoordinator let spacesSplitCoordinator = NavigationSplitCoordinator(placeholderCoordinator: PlaceholderScreenCoordinator(hideBrandChrome: flowParameters.userSession.userSettings.app.hideBrandChrome)) spacesTabFlowCoordinator = SpacesTabFlowCoordinator(navigationSplitCoordinator: spacesSplitCoordinator, flowParameters: flowParameters) - spacesTabDetails = .init(tag: HomeTab.spaces, title: L10n.screenHomeTabSpaces, icon: \.space, selectedIcon: \.spaceSolid, accessibilityIdentifier: A11yIdentifiers.homeTabs.spaces) + spacesTabDetails = .init(tag: HomeTab.spaces, + title: L10n.screenHomeTabSpaces, + icon: \.space, + selectedIcon: \.spaceSolid, + accessibilityIdentifier: A11yIdentifiers.homeTabs.spaces) + spacesTabDetails.navigationSplitCoordinator = spacesSplitCoordinator if flowParameters.userSession.userSettings.app.globalSearchEnabled { @@ -108,7 +118,11 @@ class UserSessionFlowCoordinator: FlowCoordinatorProtocol { searchScreenCoordinator = searchCoordinator searchTabNavigationStackCoordinator = searchStackCoordinator - searchTabDetails = .init(tag: HomeTab.search, title: UntranslatedL10n.screenHomeTabSearch, icon: \.search, selectedIcon: \.search, isSearch: true, accessibilityIdentifier: A11yIdentifiers.homeTabs.search) + searchTabDetails = .init(tag: HomeTab.search, title: L10n.screenHomeTabSearch, + icon: \.search, + selectedIcon: \.search, + isSearch: true, + accessibilityIdentifier: A11yIdentifiers.homeTabs.search) } else { searchScreenCoordinator = nil searchTabNavigationStackCoordinator = nil @@ -125,9 +139,11 @@ class UserSessionFlowCoordinator: FlowCoordinatorProtocol { .init(coordinator: chatsSplitCoordinator, details: chatsTabDetails), .init(coordinator: spacesSplitCoordinator, details: spacesTabDetails) ] + if let searchTabNavigationStackCoordinator, let searchTabDetails { tabs.append(.init(coordinator: searchTabNavigationStackCoordinator, details: searchTabDetails)) } + navigationTabCoordinator.setTabs(tabs) stateMachine = flowParameters.stateMachineFactory.makeUserSessionFlowStateMachine(state: .initial) diff --git a/ElementX/Sources/Generated/Strings+Untranslated.swift b/ElementX/Sources/Generated/Strings+Untranslated.swift index c4d09c595..ef372cbae 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 internal nonisolated enum UntranslatedL10n { - /// Search - internal static var screenHomeTabSearch: String { return UntranslatedL10n.tr("Untranslated", "screen_home_tab_search") } - /// Search for chats and messages - internal static var screenSearchEmptyStateMessage: String { return UntranslatedL10n.tr("Untranslated", "screen_search_empty_state_message") } - /// Start searching... - internal static var screenSearchEmptyStateTitle: String { return UntranslatedL10n.tr("Untranslated", "screen_search_empty_state_title") } - /// There are no results for “%1$@.” Try a new search term. - internal static func screenSearchNoResultsMessage(_ p1: Any) -> String { - return UntranslatedL10n.tr("Untranslated", "screen_search_no_results_message", String(describing: p1)) - } - /// Recent searches - internal static var screenSearchRecentSearches: String { return UntranslatedL10n.tr("Untranslated", "screen_search_recent_searches") } - /// Chats - internal static var screenSearchTabChats: String { return UntranslatedL10n.tr("Untranslated", "screen_search_tab_chats") } - /// Messages - internal static var screenSearchTabMessages: String { return UntranslatedL10n.tr("Untranslated", "screen_search_tab_messages") } /// Clear all data currently stored on this device? /// Sign in again to access your account data and messages. internal 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 caa3baee5..42d126cd3 100644 --- a/ElementX/Sources/Generated/Strings.swift +++ b/ElementX/Sources/Generated/Strings.swift @@ -2066,6 +2066,8 @@ internal nonisolated enum L10n { internal static var screenEncryptionResetTitle: String { return L10n.tr("Localizable", "screen_encryption_reset_title") } /// Chats internal static var screenHomeTabChats: String { return L10n.tr("Localizable", "screen_home_tab_chats") } + /// Search + internal static var screenHomeTabSearch: String { return L10n.tr("Localizable", "screen_home_tab_search") } /// Spaces internal static var screenHomeTabSpaces: String { return L10n.tr("Localizable", "screen_home_tab_spaces") } /// Can't confirm? @@ -3488,6 +3490,20 @@ internal nonisolated enum L10n { internal static var screenRoomlistTombstonedRoomDescription: String { return L10n.tr("Localizable", "screen_roomlist_tombstoned_room_description") } /// Your spaces internal static var screenRoomlistYourSpaces: String { return L10n.tr("Localizable", "screen_roomlist_your_spaces") } + /// Search for chats and messages + internal static var screenSearchEmptyStateMessage: String { return L10n.tr("Localizable", "screen_search_empty_state_message") } + /// Start searching + internal static var screenSearchEmptyStateTitle: String { return L10n.tr("Localizable", "screen_search_empty_state_title") } + /// There are no results for “%1$@.” Try a new search term. + internal static func screenSearchNoResultsMessage(_ p1: Any) -> String { + return L10n.tr("Localizable", "screen_search_no_results_message", String(describing: p1)) + } + /// Recent searches + internal static var screenSearchRecentSearches: String { return L10n.tr("Localizable", "screen_search_recent_searches") } + /// Chats + internal static var screenSearchTabChats: String { return L10n.tr("Localizable", "screen_search_tab_chats") } + /// Messages + internal static var screenSearchTabMessages: String { return L10n.tr("Localizable", "screen_search_tab_messages") } /// Add address internal static var screenSecurityAndPrivacyAddRoomAddressAction: String { return L10n.tr("Localizable", "screen_security_and_privacy_add_room_address_action") } /// Anyone in authorised spaces can join, but everyone else must request access. diff --git a/ElementX/Sources/Screens/SearchScreen/SearchScreenModels.swift b/ElementX/Sources/Screens/SearchScreen/SearchScreenModels.swift index dea25277b..af29a0948 100644 --- a/ElementX/Sources/Screens/SearchScreen/SearchScreenModels.swift +++ b/ElementX/Sources/Screens/SearchScreen/SearchScreenModels.swift @@ -22,8 +22,8 @@ enum SearchScreenMode: CaseIterable, Identifiable { var title: String { switch self { - case .rooms: UntranslatedL10n.screenSearchTabChats - case .messages: UntranslatedL10n.screenSearchTabMessages + case .rooms: L10n.screenSearchTabChats + case .messages: L10n.screenSearchTabMessages } } } diff --git a/ElementX/Sources/Screens/SearchScreen/View/SearchScreen.swift b/ElementX/Sources/Screens/SearchScreen/View/SearchScreen.swift index 0d17bcbaf..673ed8e27 100644 --- a/ElementX/Sources/Screens/SearchScreen/View/SearchScreen.swift +++ b/ElementX/Sources/Screens/SearchScreen/View/SearchScreen.swift @@ -136,7 +136,7 @@ struct SearchScreen: View { private var emptyState: some View { if context.viewState.isSearching { TitleAndIcon(title: L10n.commonNoResults, - subtitle: UntranslatedL10n.screenSearchNoResultsMessage(context.searchQuery), + subtitle: L10n.screenSearchNoResultsMessage(context.searchQuery), icon: \.search, iconStyle: .defaultSolid) .frame(maxWidth: .infinity) @@ -144,8 +144,8 @@ struct SearchScreen: View { } else if !context.viewState.breadcrumbs.isEmpty { breadcrumbsList } else { - TitleAndIcon(title: UntranslatedL10n.screenSearchEmptyStateTitle, - subtitle: UntranslatedL10n.screenSearchEmptyStateMessage, + TitleAndIcon(title: L10n.screenSearchEmptyStateTitle, + subtitle: L10n.screenSearchEmptyStateMessage, icon: \.search, iconStyle: .defaultSolid) .frame(maxWidth: .infinity) @@ -210,7 +210,7 @@ struct SearchScreen: View { } } header: { HStack(spacing: 8) { - Text(UntranslatedL10n.screenSearchRecentSearches) + Text(L10n.screenSearchRecentSearches) .compoundListSectionHeader() Spacer()