Skip to content

Commit

Permalink
Rename actions to "(Legacy) iOS Actions" and move it down on the list (
Browse files Browse the repository at this point in the history
…#3251)

<!-- Thank you for submitting a Pull Request and helping to improve Home
Assistant. Please complete the following sections to help the processing
and review of your changes. Please do not delete anything from this
template. -->

## Summary
<!-- Provide a brief summary of the changes you have made and most
importantly what they aim to achieve -->

## Screenshots
<!-- If this is a user-facing change not in the frontend, please include
screenshots in light and dark mode. -->

## Link to pull request in Documentation repository
<!-- Pull requests that add, change or remove functionality must have a
corresponding pull request in the Companion App Documentation repository
(https://github.com/home-assistant/companion.home-assistant). Please add
the number of this pull request after the "#" -->
Documentation: home-assistant/companion.home-assistant#

## Any other notes
<!-- If there is any other information of note, like if this Pull
Request is part of a bigger change, please include it here. -->
  • Loading branch information
bgoncal authored Dec 9, 2024
1 parent a2c27d6 commit 276f148
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 12 deletions.
5 changes: 2 additions & 3 deletions Sources/App/Resources/en.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,6 @@
"carPlay.lock.confirmation.title" = "Are you sure you want to perform lock action on %@?";
"carPlay.navigation.button.next" = "Next";
"carPlay.navigation.button.previous" = "Previous";
"carPlay.navigation.tab.actions" = "Actions";
"carPlay.navigation.tab.areas" = "Areas";
"carPlay.navigation.tab.domains" = "Control";
"carPlay.navigation.tab.quick_access" = "Quick access";
Expand Down Expand Up @@ -560,7 +559,7 @@ Home Assistant is free and open source home automation software with a focus on
"settings_details.actions.scenes.select_all" = "Select All";
"settings_details.actions.scenes.title" = "Scene Actions";
"settings_details.actions.server_controlled.update.title" = "Update server Actions";
"settings_details.actions.title" = "Actions";
"settings_details.legacy_actions.title" = "(Legacy) iOS Actions";
"settings_details.actions.use_custom_colors.title" = "Use custom colors";
"settings_details.actions.watch.available.title" = "Show in Watch";
"settings_details.general.app_icon.enum.beta" = "Beta";
Expand Down Expand Up @@ -1080,4 +1079,4 @@ Home Assistant is free and open source home automation software with a focus on
"widgets.sensors.description" = "Display state of sensors";
"widgets.sensors.not_configured" = "No Sensors Configured";
"widgets.sensors.title" = "Sensors";
"yes_label" = "Yes";
"yes_label" = "Yes";
2 changes: 1 addition & 1 deletion Sources/App/Settings/SettingsDetailViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,7 @@ class SettingsDetailViewController: HAFormViewController, TypedRowControllerType
}

case .actions:
title = L10n.SettingsDetails.Actions.title
title = L10n.SettingsDetails.LegacyActions.title
let actions = realm.objects(Action.self)
.sorted(byKeyPath: "Position")
.filter("Scene == nil")
Expand Down
2 changes: 1 addition & 1 deletion Sources/App/Settings/SettingsRootDataSource.swift
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ enum SettingsRootDataSource {

private static func actions() -> SettingsButtonRow {
SettingsButtonRow {
$0.title = L10n.SettingsDetails.Actions.title
$0.title = L10n.SettingsDetails.LegacyActions.title
$0.icon = .gamepadVariantOutlineIcon
$0.presentationMode = .show(controllerProvider: ControllerProvider.callback {
let view = SettingsDetailViewController()
Expand Down
8 changes: 6 additions & 2 deletions Sources/App/Settings/SettingsViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ class SettingsViewController: HAFormViewController {
static let integrations: ContentSection = 0b11
static let watch: ContentSection = 0b100
static let carPlay: ContentSection = 0b101
static let help: ContentSection = 0b110
static let legacy: ContentSection = 0b110
static let help: ContentSection = 0b111
static let all = ContentSection(rawValue: ~0b0)
}

Expand Down Expand Up @@ -116,7 +117,6 @@ class SettingsViewController: HAFormViewController {

if contentSections.contains(.integrations) {
form +++ Section()
<<< SettingsRootDataSource.Row.actions.row
<<< SettingsRootDataSource.Row.sensors.row
<<< SettingsRootDataSource.Row.nfc.row
<<< SettingsRootDataSource.Row.widgets.row
Expand Down Expand Up @@ -147,6 +147,10 @@ class SettingsViewController: HAFormViewController {
}
}

if contentSections.contains(.legacy) {
form +++ Section()
<<< SettingsRootDataSource.Row.actions.row
}
if contentSections.contains(.help) {
form +++ Section()
<<< SettingsRootDataSource.Row.help.row
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ final class CarPlayQuickAccessTemplate: CarPlayTemplateProvider {
template.tabSystemItem = .more

self.viewModel.templateProvider = self
template.emptyViewSubtitleVariants = [L10n.SettingsDetails.Actions.title]
presentIntroductionItem()
}

Expand Down
8 changes: 4 additions & 4 deletions Sources/Shared/Resources/Swiftgen/Strings.swift
Original file line number Diff line number Diff line change
Expand Up @@ -564,8 +564,6 @@ public enum L10n {
public static var previous: String { return L10n.tr("Localizable", "carPlay.navigation.button.previous") }
}
public enum Tab {
/// Actions
public static var actions: String { return L10n.tr("Localizable", "carPlay.navigation.tab.actions") }
/// Areas
public static var areas: String { return L10n.tr("Localizable", "carPlay.navigation.tab.areas") }
/// Control
Expand Down Expand Up @@ -1997,8 +1995,6 @@ public enum L10n {
public static var footer: String { return L10n.tr("Localizable", "settings_details.actions.footer") }
/// Actions are used in the application menu and widgets.
public static var footerMac: String { return L10n.tr("Localizable", "settings_details.actions.footer_mac") }
/// Actions
public static var title: String { return L10n.tr("Localizable", "settings_details.actions.title") }
public enum ActionsSynced {
/// No Synced Actions
public static var empty: String { return L10n.tr("Localizable", "settings_details.actions.actions_synced.empty") }
Expand Down Expand Up @@ -2180,6 +2176,10 @@ public enum L10n {
}
}
}
public enum LegacyActions {
/// (Legacy) iOS Actions
public static var title: String { return L10n.tr("Localizable", "settings_details.legacy_actions.title") }
}
public enum Location {
/// Location
public static var title: String { return L10n.tr("Localizable", "settings_details.location.title") }
Expand Down

0 comments on commit 276f148

Please sign in to comment.