From e1896222be3cb76e67aa61a2dfce5c17b69391aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bruno=20Pantale=C3=A3o=20Gon=C3=A7alves?= Date: Thu, 25 Jan 2024 16:38:48 +0100 Subject: [PATCH] Update CarPlay message while entities are getting filtered (#2544) ## Summary ## Screenshots ## Link to pull request in Documentation repository Documentation: home-assistant/companion.home-assistant# ## Any other notes --- Sources/App/Resources/en.lproj/Localizable.strings | 3 ++- Sources/Shared/Resources/Swiftgen/Strings.swift | 6 ++++++ .../Templates/Entities/CarPlayEntitiesListTemplate.swift | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/Sources/App/Resources/en.lproj/Localizable.strings b/Sources/App/Resources/en.lproj/Localizable.strings index 27275ffcc..451f347db 100644 --- a/Sources/App/Resources/en.lproj/Localizable.strings +++ b/Sources/App/Resources/en.lproj/Localizable.strings @@ -61,6 +61,7 @@ "carPlay.navigation.tab.actions" = "Actions"; "carPlay.navigation.tab.areas" = "Areas"; "carPlay.navigation.tab.domains" = "Control"; +"carPlay.state.loading.title" = "Loading..."; "carPlay.no_actions.title" = "Open iOS Companion App to create actions for CarPlay."; "carPlay.no_entities.title" = "No CarPlay compatible entities available."; "carPlay.notification.action.intro.body" = "Tap to create your first iOS Action"; @@ -816,4 +817,4 @@ Home Assistant is free and open source home automation software with a focus on "widgets.open_page.description" = "Open a frontend page in Home Assistant."; "widgets.open_page.not_configured" = "No Pages Available"; "widgets.open_page.title" = "Open Page"; -"yes_label" = "Yes"; \ No newline at end of file +"yes_label" = "Yes"; diff --git a/Sources/Shared/Resources/Swiftgen/Strings.swift b/Sources/Shared/Resources/Swiftgen/Strings.swift index 98e2c3203..cb91d759b 100644 --- a/Sources/Shared/Resources/Swiftgen/Strings.swift +++ b/Sources/Shared/Resources/Swiftgen/Strings.swift @@ -298,6 +298,12 @@ public enum L10n { } } } + public enum State { + public enum Loading { + /// Loading... + public static var title: String { return L10n.tr("Localizable", "carPlay.state.loading.title") } + } + } public enum Unlock { public enum Confirmation { /// Are you sure you want to perform unlock action on %@? diff --git a/Sources/Vehicle/Templates/Entities/CarPlayEntitiesListTemplate.swift b/Sources/Vehicle/Templates/Entities/CarPlayEntitiesListTemplate.swift index c3dd29f3f..72d293759 100644 --- a/Sources/Vehicle/Templates/Entities/CarPlayEntitiesListTemplate.swift +++ b/Sources/Vehicle/Templates/Entities/CarPlayEntitiesListTemplate.swift @@ -26,7 +26,7 @@ final class CarPlayEntitiesListTemplate: CarPlayTemplateProvider { self.viewModel = viewModel viewModel.templateProvider = self - paginatedListTemplate.template.emptyViewSubtitleVariants = [L10n.CarPlay.NoEntities.title] + paginatedListTemplate.template.emptyViewSubtitleVariants = [L10n.CarPlay.State.Loading.title] } func templateWillDisappear(template: CPTemplate) {