Issue #11: Switched to old-school localization so we can leverage Weblate.

This commit is contained in:
Benjamin Erhart 2026-05-29 16:54:21 +02:00
parent 3aee0db9e9
commit ddcf2070f7
22 changed files with 285 additions and 787 deletions

View file

@ -12,7 +12,15 @@ enum BlocklistOption: String, CaseIterable, Identifiable {
case secure = "Secure"
case securePlusAdblock = "Secure + Adblock"
var id: String { rawValue }
var id: String {
switch self {
case .secure:
return NSLocalizedString("Secure", comment: "")
case .securePlusAdblock:
return NSLocalizedString("Secure + Adblock", comment: "")
}
}
var enabled: Bool {
switch self {
@ -26,14 +34,14 @@ enum BlocklistOption: String, CaseIterable, Identifiable {
var description: String {
switch self {
case .secure:
return "Malware and phishing protection"
return NSLocalizedString("Malware and phishing protection", comment: "")
case .securePlusAdblock:
return "Security plus ad and tracker blocking"
return NSLocalizedString("Security plus ad and tracker blocking", comment: "")
}
}
var title: String {
return String(format: "%1$@: %2$@", ViewModel.title, self.rawValue)
return String(format: "%1$@: %2$@", ViewModel.title, id)
}
var icon: String {