From 69d00d2f7a8d66f9d6b0b1abd96cf6ddcba27bc3 Mon Sep 17 00:00:00 2001 From: Felipe Giacomini Cocco Date: Wed, 4 Feb 2026 23:09:50 -0300 Subject: [PATCH] Corrects some String detection for pickers --- DynamicIsland/Localizable.xcstrings | 143 ++++++++++++++++++ .../components/Settings/SettingsView.swift | 17 ++- DynamicIsland/enums/generic.swift | 9 ++ DynamicIsland/models/Constants.swift | 17 ++- 4 files changed, 171 insertions(+), 15 deletions(-) diff --git a/DynamicIsland/Localizable.xcstrings b/DynamicIsland/Localizable.xcstrings index c9c303b..75851b4 100644 --- a/DynamicIsland/Localizable.xcstrings +++ b/DynamicIsland/Localizable.xcstrings @@ -1398,6 +1398,16 @@ } } }, + "±10 Seconds" : { + "localizations" : { + "pt-BR" : { + "stringUnit" : { + "state" : "translated", + "value" : "±10 Segundos" + } + } + } + }, "0" : { "comment" : "A label displayed in a circular gauge to indicate the minimum battery level.", "isCommentAutoGenerated" : true, @@ -7507,6 +7517,16 @@ } } }, + "Denied" : { + "localizations" : { + "pt-BR" : { + "stringUnit" : { + "state" : "translated", + "value" : "Negado" + } + } + } + }, "Denied/Revoked" : { "comment" : "A label describing an extension with denied or revoked permissions.", "isCommentAutoGenerated" : true, @@ -7573,6 +7593,9 @@ } } }, + "Digital" : { + "shouldTranslate" : false + }, "Dimensions" : { "localizations" : { "pt-BR" : { @@ -9264,6 +9287,16 @@ } } }, + "Event color" : { + "localizations" : { + "pt-BR" : { + "stringUnit" : { + "state" : "translated", + "value" : "Cor do evento" + } + } + } + }, "Event List" : { "comment" : "A section header in the calendar settings view, describing the list of calendar events.", "isCommentAutoGenerated" : true, @@ -9757,6 +9790,16 @@ } } }, + "Full Access" : { + "localizations" : { + "pt-BR" : { + "stringUnit" : { + "state" : "translated", + "value" : "Acesso Total" + } + } + } + }, "Fully charged" : { "comment" : "Charging fallback label when already charged", "localizations" : { @@ -14030,6 +14073,16 @@ } } }, + "Minutes" : { + "localizations" : { + "pt-BR" : { + "stringUnit" : { + "state" : "translated", + "value" : "Minutos" + } + } + } + }, "Mirror" : { "localizations" : { "ar" : { @@ -15648,6 +15701,16 @@ } } }, + "Not Determined" : { + "localizations" : { + "pt-BR" : { + "stringUnit" : { + "state" : "translated", + "value" : "Não Determinado" + } + } + } + }, "Not Now" : { "localizations" : { "ar" : { @@ -17920,6 +17983,16 @@ } } }, + "Restricted" : { + "localizations" : { + "pt-BR" : { + "stringUnit" : { + "state" : "translated", + "value" : "Restrito" + } + } + } + }, "Resume" : { "localizations" : { "fr" : { @@ -17998,6 +18071,16 @@ } } }, + "Ring" : { + "localizations" : { + "pt-BR" : { + "stringUnit" : { + "state" : "translated", + "value" : "Círculo" + } + } + } + }, "Sampling can continue while the notch is closed when the timeout is disabled." : { "localizations" : { "pt-BR" : { @@ -19435,6 +19518,16 @@ } } }, + "Skip forward or backward by ten seconds" : { + "localizations" : { + "pt-BR" : { + "stringUnit" : { + "state" : "translated", + "value" : "Pular dez segundos para frente ou para trás" + } + } + } + }, "Slider color" : { "localizations" : { "ar" : { @@ -20111,6 +20204,16 @@ } } }, + "Standard previous/next track controls" : { + "localizations" : { + "pt-BR" : { + "stringUnit" : { + "state" : "translated", + "value" : "Controles anterior/próxima padrão " + } + } + } + }, "Start" : { "localizations" : { "fr" : { @@ -21309,6 +21412,16 @@ }, "shouldTranslate" : false }, + "Track Skip" : { + "localizations" : { + "pt-BR" : { + "stringUnit" : { + "state" : "translated", + "value" : "Pular Música" + } + } + } + }, "trackpad" : { "shouldTranslate" : false }, @@ -21496,6 +21609,16 @@ } } }, + "Unknown" : { + "localizations" : { + "pt-BR" : { + "stringUnit" : { + "state" : "translated", + "value" : "Desconhecido" + } + } + } + }, "Unlock advanced features and improve your experience. Upgrade now for more customizations!" : { "localizations" : { "ar" : { @@ -22748,6 +22871,16 @@ } } }, + "White" : { + "localizations" : { + "pt-BR" : { + "stringUnit" : { + "state" : "translated", + "value" : "Branco" + } + } + } + }, "Widget Updates" : { "comment" : "A label describing the number of times the extension has updated its widget.", "isCommentAutoGenerated" : true, @@ -22798,6 +22931,16 @@ } } }, + "Write Only" : { + "localizations" : { + "pt-BR" : { + "stringUnit" : { + "state" : "translated", + "value" : "Apenas Escrita" + } + } + } + }, "You" : { "localizations" : { "fr" : { diff --git a/DynamicIsland/components/Settings/SettingsView.swift b/DynamicIsland/components/Settings/SettingsView.swift index 0474a3a..9282182 100644 --- a/DynamicIsland/components/Settings/SettingsView.swift +++ b/DynamicIsland/components/Settings/SettingsView.swift @@ -2459,9 +2459,10 @@ struct CalendarSettings: View { Defaults.Toggle(String(localized:"Show lock screen reminder"), key: .enableLockScreenReminderWidget) .settingsHighlight(id: highlightID("Show lock screen reminder")) - Picker("Chip color", selection: $lockScreenReminderChipStyle) { + Picker(String(localized: "Chip color"), selection: $lockScreenReminderChipStyle) { ForEach(LockScreenReminderChipStyle.allCases) { style in - Text(style.rawValue).tag(style) + + Text(style.localizedName).tag(style) } } .pickerStyle(.segmented) @@ -2499,12 +2500,12 @@ struct CalendarSettings: View { private func statusText(for status: EKAuthorizationStatus) -> String { switch status { - case .fullAccess, .authorized: return "Full Access" - case .writeOnly: return "Write Only" - case .denied: return "Denied" - case .restricted: return "Restricted" - case .notDetermined: return "Not Determined" - @unknown default: return "Unknown" + case .fullAccess, .authorized: return String(localized:"Full Access") + case .writeOnly: return String(localized:"Write Only") + case .denied: return String(localized:"Denied") + case .restricted: return String(localized:"Restricted") + case .notDetermined: return String(localized:"Not Determined") + @unknown default: return String(localized:"Unknown") } } diff --git a/DynamicIsland/enums/generic.swift b/DynamicIsland/enums/generic.swift index 7f7110f..0d02e13 100644 --- a/DynamicIsland/enums/generic.swift +++ b/DynamicIsland/enums/generic.swift @@ -231,4 +231,13 @@ enum LockScreenReminderChipStyle: String, CaseIterable, Defaults.Serializable, I case monochrome = "White" var id: String { rawValue } + + var localizedName: String { + switch self { + case .eventColor: + return String(localized: "Event color") + case .monochrome: + return String(localized: "White") + } + } } diff --git a/DynamicIsland/models/Constants.swift b/DynamicIsland/models/Constants.swift index 246b05b..4afb8e1 100644 --- a/DynamicIsland/models/Constants.swift +++ b/DynamicIsland/models/Constants.swift @@ -438,18 +438,18 @@ enum MusicSkipBehavior: String, CaseIterable, Identifiable, Defaults.Serializabl var displayName: String { switch self { case .track: - return "Track Skip" + return String(localized: "Track Skip") case .tenSecond: - return "±10 Seconds" + return String(localized: "±10 Seconds") } } var description: String { switch self { case .track: - return "Standard previous/next track controls" + return String(localized: "Standard previous/next track controls") case .tenSecond: - return "Skip forward or backward by ten seconds" + return String(localized: "Skip forward or backward by ten seconds") } } } @@ -484,9 +484,12 @@ enum ReminderPresentationStyle: String, CaseIterable, Identifiable, Defaults.Ser var displayName: String { switch self { - case .ringCountdown: return "Ring" - case .digital: return "Digital" - case .minutes: return "Minutes" + case .ringCountdown: + return String(localized: "Ring") + case .digital: + return String(localized: "Digital") + case .minutes: + return String(localized: "Minutes") } } }