Fix strings detections and translates the entire "Live Activities" section

This commit is contained in:
Felipe Giacomini Cocco 2026-02-05 18:27:11 -03:00
commit 10d421b25b
3 changed files with 158 additions and 18 deletions

View file

@ -1710,6 +1710,16 @@
} }
} }
}, },
"Accent" : {
"localizations" : {
"pt-BR" : {
"stringUnit" : {
"state" : "translated",
"value" : "Destaque"
}
}
}
},
"Accent color" : { "Accent color" : {
"localizations" : { "localizations" : {
"pt-BR" : { "pt-BR" : {
@ -7251,6 +7261,16 @@
} }
} }
}, },
"Custom Focus metadata" : {
"localizations" : {
"pt-BR" : {
"stringUnit" : {
"state" : "translated",
"value" : "Metadados de Foco Customizado"
}
}
}
},
"Custom height" : { "Custom height" : {
"localizations" : { "localizations" : {
"ar" : { "ar" : {
@ -9208,6 +9228,16 @@
} }
} }
}, },
"Enable Camera Detection" : {
"localizations" : {
"pt-BR" : {
"stringUnit" : {
"state" : "translated",
"value" : "Ativar Detecção de Câmera"
}
}
}
},
"Enable Clipboard Manager" : { "Enable Clipboard Manager" : {
"localizations" : { "localizations" : {
"pt-BR" : { "pt-BR" : {
@ -9348,6 +9378,16 @@
} }
} }
}, },
"Enable Focus Detection" : {
"localizations" : {
"pt-BR" : {
"stringUnit" : {
"state" : "translated",
"value" : "Ativar Detecção de Foco"
}
}
}
},
"Enable gestures" : { "Enable gestures" : {
"localizations" : { "localizations" : {
"pt-BR" : { "pt-BR" : {
@ -9532,6 +9572,16 @@
} }
} }
}, },
"Enable Microphone Detection" : {
"localizations" : {
"pt-BR" : {
"stringUnit" : {
"state" : "translated",
"value" : "Habilitar Detecção de Microfone"
}
}
}
},
"Enable Minimalistic UI" : { "Enable Minimalistic UI" : {
"localizations" : { "localizations" : {
"pt-BR" : { "pt-BR" : {
@ -9702,6 +9752,16 @@
} }
} }
}, },
"Enable Screen Recording Detection" : {
"localizations" : {
"pt-BR" : {
"stringUnit" : {
"state" : "translated",
"value" : "Ativar Detecção de Gravação de Tela"
}
}
}
},
"Enable shelf" : { "Enable shelf" : {
"localizations" : { "localizations" : {
"pt-BR" : { "pt-BR" : {
@ -10765,6 +10825,16 @@
} }
} }
}, },
"Full Disk Access unlocks custom Focus icons, colors, and labels. Standard Focus detection still works without it—grant access only if you need personalized indicators." : {
"localizations" : {
"pt-BR" : {
"stringUnit" : {
"state" : "translated",
"value" : "O Acesso Total ao Disco desbloqueia ícones, cores e rótulos personalizados do Foco. A detecção de foco padrão ainda funciona sem ele - conceda acesso apenas se você precisar de indicadores personalizados."
}
}
}
},
"Fully charged" : { "Fully charged" : {
"comment" : "Charging fallback label when already charged", "comment" : "Charging fallback label when already charged",
"localizations" : { "localizations" : {
@ -11688,6 +11758,16 @@
} }
} }
}, },
"Green" : {
"localizations" : {
"pt-BR" : {
"stringUnit" : {
"state" : "translated",
"value" : "Verde"
}
}
}
},
"grid" : { "grid" : {
"localizations" : { "localizations" : {
"pt-BR" : { "pt-BR" : {
@ -20994,6 +21074,26 @@
} }
} }
}, },
"Show Caps Lock Indicator" : {
"localizations" : {
"pt-BR" : {
"stringUnit" : {
"state" : "translated",
"value" : "Mostrar Indicador de Caps Lock"
}
}
}
},
"Show Caps Lock label" : {
"localizations" : {
"pt-BR" : {
"stringUnit" : {
"state" : "translated",
"value" : "Mostrar rótulo Caps Lock"
}
}
}
},
"Show Change Media Output control" : { "Show Change Media Output control" : {
"localizations" : { "localizations" : {
"pt-BR" : { "pt-BR" : {
@ -21110,6 +21210,36 @@
} }
} }
}, },
"Show Focus as brief toast" : {
"localizations" : {
"pt-BR" : {
"stringUnit" : {
"state" : "translated",
"value" : "Mostrar Foco como um breve visualização"
}
}
}
},
"Show Focus Indicator" : {
"localizations" : {
"pt-BR" : {
"stringUnit" : {
"state" : "translated",
"value" : "Mostrar Indicador de Foco"
}
}
}
},
"Show Focus Label" : {
"localizations" : {
"pt-BR" : {
"stringUnit" : {
"state" : "translated",
"value" : "Mostrar Rótulo do Foco"
}
}
}
},
"Show full event titles" : { "Show full event titles" : {
"comment" : "A toggle that shows or hides the full event titles in the calendar view", "comment" : "A toggle that shows or hides the full event titles in the calendar view",
"isCommentAutoGenerated" : true, "isCommentAutoGenerated" : true,
@ -21464,6 +21594,16 @@
} }
} }
}, },
"Show Recording Indicator" : {
"localizations" : {
"pt-BR" : {
"stringUnit" : {
"state" : "translated",
"value" : "Mostrar Indicador de Gravação"
}
}
}
},
"Show sneak peek on playback changes" : { "Show sneak peek on playback changes" : {
"comment" : "A toggle that enables showing sneak peek when the currently playing track changes.", "comment" : "A toggle that enables showing sneak peek when the currently playing track changes.",
"isCommentAutoGenerated" : true, "isCommentAutoGenerated" : true,

View file

@ -3298,10 +3298,10 @@ struct LiveActivitiesSettings: View {
var body: some View { var body: some View {
Form { Form {
Section { Section {
Defaults.Toggle("Enable Screen Recording Detection", key: .enableScreenRecordingDetection) Defaults.Toggle(String(localized: "Enable Screen Recording Detection"), key: .enableScreenRecordingDetection)
.settingsHighlight(id: highlightID("Enable Screen Recording Detection")) .settingsHighlight(id: highlightID("Enable Screen Recording Detection"))
Defaults.Toggle("Show Recording Indicator", key: .showRecordingIndicator) Defaults.Toggle(String(localized: "Show Recording Indicator"), key: .showRecordingIndicator)
.disabled(!enableScreenRecordingDetection) .disabled(!enableScreenRecordingDetection)
.settingsHighlight(id: highlightID("Show Recording Indicator")) .settingsHighlight(id: highlightID("Show Recording Indicator"))
@ -3332,30 +3332,30 @@ struct LiveActivitiesSettings: View {
Section { Section {
if !fullDiskAccessPermission.isAuthorized { if !fullDiskAccessPermission.isAuthorized {
SettingsPermissionCallout( SettingsPermissionCallout(
title: "Custom Focus metadata", title: String(localized: "Custom Focus metadata"),
message: "Full Disk Access unlocks custom Focus icons, colors, and labels. Standard Focus detection still works without it—grant access only if you need personalized indicators.", message: String(localized: "Full Disk Access unlocks custom Focus icons, colors, and labels. Standard Focus detection still works without it—grant access only if you need personalized indicators."),
icon: "externaldrive.fill", icon: "externaldrive.fill",
iconColor: .purple, iconColor: .purple,
requestButtonTitle: "Request Full Disk Access", requestButtonTitle: String(localized: "Request Full Disk Access"),
openSettingsButtonTitle: "Open Privacy & Security", openSettingsButtonTitle: String(localized: "Open Privacy & Security"),
requestAction: { fullDiskAccessPermission.requestAccessPrompt() }, requestAction: { fullDiskAccessPermission.requestAccessPrompt() },
openSettingsAction: { fullDiskAccessPermission.openSystemSettings() } openSettingsAction: { fullDiskAccessPermission.openSystemSettings() }
) )
} }
Defaults.Toggle("Enable Focus Detection", key: .enableDoNotDisturbDetection) Defaults.Toggle(String(localized: "Enable Focus Detection"), key: .enableDoNotDisturbDetection)
.settingsHighlight(id: highlightID("Enable Focus Detection")) .settingsHighlight(id: highlightID("Enable Focus Detection"))
Defaults.Toggle("Show Focus Indicator", key: .showDoNotDisturbIndicator) Defaults.Toggle(String(localized: "Show Focus Indicator"), key: .showDoNotDisturbIndicator)
.disabled(!enableDoNotDisturbDetection) .disabled(!enableDoNotDisturbDetection)
.settingsHighlight(id: highlightID("Show Focus Indicator")) .settingsHighlight(id: highlightID("Show Focus Indicator"))
Defaults.Toggle("Show Focus Label", key: .showDoNotDisturbLabel) Defaults.Toggle(String(localized: "Show Focus Label"), key: .showDoNotDisturbLabel)
.disabled(!enableDoNotDisturbDetection || focusIndicatorNonPersistent) .disabled(!enableDoNotDisturbDetection || focusIndicatorNonPersistent)
.help(focusIndicatorNonPersistent ? "Labels are forced to compact on/off text while brief toast mode is enabled." : "Show the active Focus name inside the indicator.") .help(focusIndicatorNonPersistent ? "Labels are forced to compact on/off text while brief toast mode is enabled." : "Show the active Focus name inside the indicator.")
.settingsHighlight(id: highlightID("Show Focus Label")) .settingsHighlight(id: highlightID("Show Focus Label"))
Defaults.Toggle("Show Focus as brief toast", key: .focusIndicatorNonPersistent) Defaults.Toggle(String(localized: "Show Focus as brief toast"), key: .focusIndicatorNonPersistent)
.disabled(!enableDoNotDisturbDetection) .disabled(!enableDoNotDisturbDetection)
.settingsHighlight(id: highlightID("Show Focus as brief toast")) .settingsHighlight(id: highlightID("Show Focus as brief toast"))
.help("When enabled, Focus appears briefly (on/off) and then collapses instead of staying visible.") .help("When enabled, Focus appears briefly (on/off) and then collapses instead of staying visible.")
@ -3392,10 +3392,10 @@ struct LiveActivitiesSettings: View {
} }
Section { Section {
Defaults.Toggle("Show Caps Lock Indicator", key: .enableCapsLockIndicator) Defaults.Toggle(String(localized: "Show Caps Lock Indicator"), key: .enableCapsLockIndicator)
.settingsHighlight(id: highlightID("Show Caps Lock Indicator")) .settingsHighlight(id: highlightID("Show Caps Lock Indicator"))
Defaults.Toggle("Show Caps Lock label", key: .showCapsLockLabel) Defaults.Toggle(String(localized: "Show Caps Lock label"), key: .showCapsLockLabel)
.disabled(!Defaults[.enableCapsLockIndicator]) .disabled(!Defaults[.enableCapsLockIndicator])
.settingsHighlight(id: highlightID("Show Caps Lock label")) .settingsHighlight(id: highlightID("Show Caps Lock label"))
@ -3414,9 +3414,9 @@ struct LiveActivitiesSettings: View {
} }
Section { Section {
Defaults.Toggle("Enable Camera Detection", key: .enableCameraDetection) Defaults.Toggle(String(localized: "Enable Camera Detection"), key: .enableCameraDetection)
.settingsHighlight(id: highlightID("Enable Camera Detection")) .settingsHighlight(id: highlightID("Enable Camera Detection"))
Defaults.Toggle("Enable Microphone Detection", key: .enableMicrophoneDetection) Defaults.Toggle(String(localized: "Enable Microphone Detection"), key: .enableMicrophoneDetection)
.settingsHighlight(id: highlightID("Enable Microphone Detection")) .settingsHighlight(id: highlightID("Enable Microphone Detection"))
if privacyManager.isMonitoring { if privacyManager.isMonitoring {
@ -3473,7 +3473,7 @@ struct LiveActivitiesSettings: View {
} }
Section { Section {
Defaults.Toggle("Enable reminder live activity", key: .enableReminderLiveActivity) Defaults.Toggle(String(localized: "Enable reminder live activity"), key: .enableReminderLiveActivity)
.settingsHighlight(id: highlightID("Enable reminder live activity")) .settingsHighlight(id: highlightID("Enable reminder live activity"))
} header: { } header: {
Text("Reminder Live Activity") Text("Reminder Live Activity")

View file

@ -355,11 +355,11 @@ enum CapsLockIndicatorTintMode: String, CaseIterable, Identifiable, Defaults.Ser
var displayName: String { var displayName: String {
switch self { switch self {
case .green: case .green:
return "Green" return String(localized: "Green")
case .accent: case .accent:
return "Accent" return String(localized: "Accent")
case .white: case .white:
return "White" return String(localized: "White")
} }
} }