mirror of
https://github.com/FBukovina/Atoll.git
synced 2026-10-27 15:14:33 +00:00
Fix strings detections and translates the entire "Extensions" and "Timer" sections
This commit is contained in:
parent
30694fca34
commit
879a4589d2
7 changed files with 188 additions and 36 deletions
|
|
@ -61,32 +61,32 @@ struct ExtensionsSettingsView: View {
|
|||
|
||||
private var globalTogglesSection: some View {
|
||||
Section {
|
||||
Defaults.Toggle("Enable third-party extensions", key: .enableThirdPartyExtensions)
|
||||
Defaults.Toggle(String(localized:"Enable third-party extensions"), key: .enableThirdPartyExtensions)
|
||||
.settingsHighlight(id: highlightID("Enable third-party extensions"))
|
||||
|
||||
if Defaults[.enableThirdPartyExtensions] {
|
||||
Defaults.Toggle("Allow extension live activities", key: .enableExtensionLiveActivities)
|
||||
Defaults.Toggle(String(localized:"Allow extension live activities"), key: .enableExtensionLiveActivities)
|
||||
.settingsHighlight(id: highlightID("Allow extension live activities"))
|
||||
|
||||
Defaults.Toggle("Allow extension lock screen widgets", key: .enableExtensionLockScreenWidgets)
|
||||
Defaults.Toggle(String(localized:"Allow extension lock screen widgets"), key: .enableExtensionLockScreenWidgets)
|
||||
.settingsHighlight(id: highlightID("Allow extension lock screen widgets"))
|
||||
|
||||
Defaults.Toggle("Allow extension notch experiences", key: .enableExtensionNotchExperiences)
|
||||
Defaults.Toggle(String(localized:"Allow extension notch experiences"), key: .enableExtensionNotchExperiences)
|
||||
.settingsHighlight(id: highlightID("Allow extension notch experiences"))
|
||||
|
||||
if Defaults[.enableExtensionNotchExperiences] {
|
||||
VStack(alignment: .leading, spacing: 8) {
|
||||
Defaults.Toggle("Show extension tabs", key: .enableExtensionNotchTabs)
|
||||
Defaults.Toggle(String(localized:"Show extension tabs"), key: .enableExtensionNotchTabs)
|
||||
.tint(.accentColor)
|
||||
Defaults.Toggle("Allow minimalistic overrides", key: .enableExtensionNotchMinimalisticOverrides)
|
||||
Defaults.Toggle(String(localized:"Allow minimalistic overrides"), key: .enableExtensionNotchMinimalisticOverrides)
|
||||
.tint(.accentColor)
|
||||
Defaults.Toggle("Allow interactive web content", key: .enableExtensionNotchInteractiveWebViews)
|
||||
Defaults.Toggle(String(localized:"Allow interactive web content"), key: .enableExtensionNotchInteractiveWebViews)
|
||||
.tint(.accentColor)
|
||||
}
|
||||
.padding(.leading, 4)
|
||||
}
|
||||
|
||||
Defaults.Toggle("Enable extension diagnostics logging", key: .extensionDiagnosticsLoggingEnabled)
|
||||
Defaults.Toggle(String(localized:"Enable extension diagnostics logging"), key: .extensionDiagnosticsLoggingEnabled)
|
||||
.settingsHighlight(id: highlightID("Enable extension diagnostics logging"))
|
||||
}
|
||||
} header: {
|
||||
|
|
|
|||
|
|
@ -5322,7 +5322,7 @@ struct TimerSettings: View {
|
|||
@ViewBuilder
|
||||
private var timerFeatureSection: some View {
|
||||
Section {
|
||||
Defaults.Toggle("Enable timer feature", key: .enableTimerFeature)
|
||||
Defaults.Toggle(String(localized: "Enable timer feature"), key: .enableTimerFeature)
|
||||
.settingsHighlight(id: highlightID("Enable timer feature"))
|
||||
|
||||
if enableTimerFeature {
|
||||
|
|
@ -5377,11 +5377,11 @@ struct TimerSettings: View {
|
|||
@ViewBuilder
|
||||
private var lockScreenIntegrationSection: some View {
|
||||
Section {
|
||||
Defaults.Toggle("Show lock screen timer widget", key: .enableLockScreenTimerWidget)
|
||||
Defaults.Toggle(String(localized:"Show lock screen timer widget"), key: .enableLockScreenTimerWidget)
|
||||
.settingsHighlight(id: highlightID("Show lock screen timer widget"))
|
||||
Picker("Timer surface", selection: timerSurfaceBinding) {
|
||||
ForEach(LockScreenTimerSurfaceMode.allCases) { mode in
|
||||
Text(mode.rawValue).tag(mode)
|
||||
Text(mode.localizedName).tag(mode)
|
||||
}
|
||||
}
|
||||
.pickerStyle(.segmented)
|
||||
|
|
@ -5392,7 +5392,7 @@ struct TimerSettings: View {
|
|||
if timerGlassModeIsGlass {
|
||||
Picker("Timer glass material", selection: $lockScreenTimerGlassStyle) {
|
||||
ForEach(LockScreenGlassStyle.allCases) { style in
|
||||
Text(style.rawValue).tag(style)
|
||||
Text(style.localizedName).tag(style)
|
||||
}
|
||||
}
|
||||
.disabled(!enableLockScreenTimerWidget)
|
||||
|
|
@ -5452,9 +5452,9 @@ struct TimerSettings: View {
|
|||
Text("Default Custom Timer")
|
||||
.font(.headline)
|
||||
|
||||
TimerDurationStepperRow(title: "Hours", value: $customHours, range: 0...23)
|
||||
TimerDurationStepperRow(title: "Minutes", value: $customMinutes, range: 0...59)
|
||||
TimerDurationStepperRow(title: "Seconds", value: $customSeconds, range: 0...59)
|
||||
TimerDurationStepperRow(title: String(localized:"Hours"), value: $customHours, range: 0...23)
|
||||
TimerDurationStepperRow(title: String(localized:"Minutes"), value: $customMinutes, range: 0...59)
|
||||
TimerDurationStepperRow(title: String(localized:"Seconds"), value: $customSeconds, range: 0...59)
|
||||
|
||||
HStack {
|
||||
Text("Current default:")
|
||||
|
|
@ -5504,7 +5504,7 @@ struct TimerSettings: View {
|
|||
|
||||
Picker("Progress style", selection: $progressStyle) {
|
||||
ForEach(TimerProgressStyle.allCases) { style in
|
||||
Text(style.rawValue).tag(style)
|
||||
Text(style.localizedName).tag(style)
|
||||
}
|
||||
}
|
||||
.pickerStyle(.segmented)
|
||||
|
|
@ -5794,9 +5794,9 @@ private struct TimerPresetEditorRow: View {
|
|||
}
|
||||
|
||||
HStack(spacing: 16) {
|
||||
TimerPresetComponentControl(title: "Hours", value: hoursBinding, range: 0...23)
|
||||
TimerPresetComponentControl(title: "Minutes", value: minutesBinding, range: 0...59)
|
||||
TimerPresetComponentControl(title: "Seconds", value: secondsBinding, range: 0...59)
|
||||
TimerPresetComponentControl(title: String(localized:"Hours"), value: hoursBinding, range: 0...23)
|
||||
TimerPresetComponentControl(title: String(localized:"Minutes"), value: minutesBinding, range: 0...59)
|
||||
TimerPresetComponentControl(title: String(localized:"Seconds"), value: secondsBinding, range: 0...59)
|
||||
}
|
||||
|
||||
ColorPicker("Accent colour", selection: colorBinding, supportsOpacity: false)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue