diff --git a/Localizable.xcstrings b/Localizable.xcstrings index 64e2a0d..27c219e 100644 --- a/Localizable.xcstrings +++ b/Localizable.xcstrings @@ -115,70 +115,6 @@ } } }, - "25" : { - "localizations" : { - "de" : { - "stringUnit" : { - "state" : "translated", - "value" : "25" - } - }, - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "25" - } - } - } - }, - "50" : { - "localizations" : { - "de" : { - "stringUnit" : { - "state" : "translated", - "value" : "50" - } - }, - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "50" - } - } - } - }, - "75" : { - "localizations" : { - "de" : { - "stringUnit" : { - "state" : "translated", - "value" : "75" - } - }, - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "75" - } - } - } - }, - "100" : { - "localizations" : { - "de" : { - "stringUnit" : { - "state" : "translated", - "value" : "100" - } - }, - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "100" - } - } - } - }, "Accent Color" : { "localizations" : { "de" : { @@ -755,6 +691,22 @@ } } }, + "Default User" : { + "localizations" : { + "de" : { + "stringUnit" : { + "state" : "translated", + "value" : "Standard Nutzer" + } + }, + "en" : { + "stringUnit" : { + "state" : "translated", + "value" : "Default User" + } + } + } + }, "Delete" : { "localizations" : { "de" : { @@ -1872,6 +1824,22 @@ } } }, + "New Profile" : { + "localizations" : { + "de" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Neuer Nutzer" + } + }, + "en" : { + "stringUnit" : { + "state" : "translated", + "value" : "New User" + } + } + } + }, "No Content Available" : { "localizations" : { "de" : { diff --git a/Sora/Utils/ProfileStore/ProfileStore.swift b/Sora/Utils/ProfileStore/ProfileStore.swift index 4120be3..29ec55f 100644 --- a/Sora/Utils/ProfileStore/ProfileStore.swift +++ b/Sora/Utils/ProfileStore/ProfileStore.swift @@ -20,7 +20,7 @@ class ProfileStore: ObservableObject { if profiles.isEmpty { // load default value - let defaultProfile = Profile(name: "Default User", emoji: "👤") + let defaultProfile = Profile(name: String(localized: "Default User"), emoji: "👤") profiles = [defaultProfile] saveProfiles() @@ -44,7 +44,7 @@ class ProfileStore: ObservableObject { fatalError("This can only fail if suiteName == app bundle id ...") } - Logger.shared.log("loaded UserDefaults suite for \(currentProfile.name) (\(currentProfile.id.uuidString))", type: "Profile") + Logger.shared.log("loaded UserDefaults suite for '\(currentProfile.name)'", type: "Profile") return suite } diff --git a/Sora/Views/SettingsView/SettingsSubViews/SettingsViewGeneral.swift b/Sora/Views/SettingsView/SettingsSubViews/SettingsViewGeneral.swift index 4ef34bb..ac6baee 100644 --- a/Sora/Views/SettingsView/SettingsSubViews/SettingsViewGeneral.swift +++ b/Sora/Views/SettingsView/SettingsSubViews/SettingsViewGeneral.swift @@ -79,13 +79,18 @@ struct SettingsViewGeneral: View { HStack { Text("Episodes Range") Spacer() - Menu { - Button(action: { episodeChunkSize = 25 }) { Text("25") } - Button(action: { episodeChunkSize = 50 }) { Text("50") } - Button(action: { episodeChunkSize = 75 }) { Text("75") } - Button(action: { episodeChunkSize = 100 }) { Text("100") } - } label: { - Text("\(episodeChunkSize)") + Menu("\(episodeChunkSize)") { + ForEach([25, 50, 75, 100], id: \.self) { chunkSize in + Button(action: { + episodeChunkSize = chunkSize + }) { + if episodeChunkSize == chunkSize { + Image(systemName: "checkmark") + .foregroundColor(.accentColor) + } + Text("\(chunkSize)") + } + } } } @@ -97,7 +102,13 @@ struct SettingsViewGeneral: View { Spacer() Menu(metadataProviders) { ForEach(metadataProvidersList, id: \.self) { provider in - Button(action: { metadataProviders = provider }) { + Button(action: { + metadataProviders = provider + }) { + if provider == metadataProviders { + Image(systemName: "checkmark") + .foregroundColor(.accentColor) + } Text(provider) } } diff --git a/Sora/Views/SettingsView/SettingsSubViews/SettingsViewPlayer.swift b/Sora/Views/SettingsView/SettingsSubViews/SettingsViewPlayer.swift index f420118..1d47e19 100644 --- a/Sora/Views/SettingsView/SettingsSubViews/SettingsViewPlayer.swift +++ b/Sora/Views/SettingsView/SettingsSubViews/SettingsViewPlayer.swift @@ -32,7 +32,18 @@ struct SettingsViewPlayer: View { Button(action: { externalPlayer = player }) { - Text(player) + HStack { + if player == externalPlayer { + Image(systemName: "checkmark") + .foregroundColor(.accentColor) + } else if player != "Default" && player != "Sora" { + Image(systemName: "arrow.up.forward.app") + .foregroundColor(.secondary) + } else { + Color.clear.frame(width: 20) + } + Text(player) + } } } } @@ -148,6 +159,10 @@ struct SubtitleSettingsSection: View { settings.shadowRadius = Double(option) } }) { + if shadowRadius == Double(option) { + Image(systemName: "checkmark") + .foregroundColor(.accentColor) + } Text("\(option)") } } diff --git a/Sora/Views/SettingsView/SettingsSubViews/SettingsViewProfile.swift b/Sora/Views/SettingsView/SettingsSubViews/SettingsViewProfile.swift index c1be937..8a3d188 100644 --- a/Sora/Views/SettingsView/SettingsSubViews/SettingsViewProfile.swift +++ b/Sora/Views/SettingsView/SettingsSubViews/SettingsViewProfile.swift @@ -138,7 +138,7 @@ struct SettingsViewProfile: View { ToolbarItem(placement: .topBarTrailing) { Button { - profileStore.addProfile(name: "New Profile", emoji: "🧙‍♂️") + profileStore.addProfile(name: String(localized: "New Profile"), emoji: "🧙‍♂️") } label: { Image(systemName: "plus") .foregroundColor(.accentColor)