Fix strings detections and translates the entire "Battery" section

This commit is contained in:
Felipe Giacomini Cocco 2026-02-05 17:52:09 -03:00
commit 7f72b8e496

View file

@ -1762,19 +1762,19 @@ struct Charge: View {
Form { Form {
if BatteryActivityManager.shared.hasBattery() { if BatteryActivityManager.shared.hasBattery() {
Section { Section {
Defaults.Toggle("Show battery indicator", key: .showBatteryIndicator) Defaults.Toggle(String(localized: "Show battery indicator"), key: .showBatteryIndicator)
.settingsHighlight(id: highlightID("Show battery indicator")) .settingsHighlight(id: highlightID("Show battery indicator"))
Defaults.Toggle("Show power status notifications", key: .showPowerStatusNotifications) Defaults.Toggle(String(localized: "Show power status notifications"), key: .showPowerStatusNotifications)
.settingsHighlight(id: highlightID("Show power status notifications")) .settingsHighlight(id: highlightID("Show power status notifications"))
Defaults.Toggle("Play low battery alert sound", key: .playLowBatteryAlertSound) Defaults.Toggle(String(localized: "Play low battery alert sound"), key: .playLowBatteryAlertSound)
.settingsHighlight(id: highlightID("Play low battery alert sound")) .settingsHighlight(id: highlightID("Play low battery alert sound"))
} header: { } header: {
Text("General") Text("General")
} }
Section { Section {
Defaults.Toggle("Show battery percentage", key: .showBatteryPercentage) Defaults.Toggle(String(localized: "Show battery percentage"), key: .showBatteryPercentage)
.settingsHighlight(id: highlightID("Show battery percentage")) .settingsHighlight(id: highlightID("Show battery percentage"))
Defaults.Toggle("Show power status icons", key: .showPowerStatusIcons) Defaults.Toggle(String(localized: "Show power status icons"), key: .showPowerStatusIcons)
.settingsHighlight(id: highlightID("Show power status icons")) .settingsHighlight(id: highlightID("Show power status icons"))
} header: { } header: {
Text("Battery Information") Text("Battery Information")