Skip to content

Commit

Permalink
Add missing strings for mac native features only mode (#3226)
Browse files Browse the repository at this point in the history
<!-- 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 3, 2024
1 parent d9dcce2 commit b20cbe8
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
2 changes: 2 additions & 0 deletions Sources/App/Resources/en.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -699,6 +699,8 @@ Home Assistant is free and open source home automation software with a focus on
"settings_details.updates.check_for_updates.title" = "Automatically Check for Updates";
"settings_details.watch.title" = "Apple Watch";
"settings_details.widgets.reload_all.description" = "This will reload all widgets timelines, use this in case your widgets are stuck in a blank state or not updating for some reason.";
"settings_details.mac_native_features.footer" = "This will open Safari instead of the App webview, while keeping the native features such as widgets working.";
"settings_details.mac_native_features.title" = "Native Features Only (Experimental)";
"settings_details.widgets.reload_all.title" = "Reload all widgets";
"settings_sensors.detail.attributes" = "Attributes";
"settings_sensors.detail.device_class" = "Device Class";
Expand Down
4 changes: 2 additions & 2 deletions Sources/App/Settings/SettingsDetailViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -178,12 +178,12 @@ class SettingsDetailViewController: HAFormViewController, TypedRowControllerType

+++
Section(
footer: "This will open Safari instead of the App webview, while keeping the native features such as widgets working."
footer: L10n.SettingsDetails.MacNativeFeatures.footer
) {
$0.hidden = .function([], { _ in !Current.isCatalyst })
}
<<< SwitchRow("macNativeFeaturesOnly") {
$0.title = "Native Features Only (Experimental)"
$0.title = L10n.SettingsDetails.MacNativeFeatures.title
$0.value = Current.settingsStore.macNativeFeaturesOnly
$0.onChange { row in
Current.settingsStore.macNativeFeaturesOnly = row.value ?? false
Expand Down
6 changes: 6 additions & 0 deletions Sources/Shared/Resources/Swiftgen/Strings.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2251,6 +2251,12 @@ public enum L10n {
}
}
}
public enum MacNativeFeatures {
/// This will open Safari instead of the App webview, while keeping the native features such as widgets working.
public static var footer: String { return L10n.tr("Localizable", "settings_details.mac_native_features.footer") }
/// Native Features Only (Experimental)
public static var title: String { return L10n.tr("Localizable", "settings_details.mac_native_features.title") }
}
public enum Notifications {
/// Use the mobile_app notify service to send notifications to your device.
public static var info: String { return L10n.tr("Localizable", "settings_details.notifications.info") }
Expand Down

0 comments on commit b20cbe8

Please sign in to comment.