mirror of
https://github.com/cranci1/Sora.git
synced 2026-03-11 17:45:37 +00:00
more translation, add checkmarks to all menus, tests
This commit is contained in:
parent
fb7a591d56
commit
a4fbcbc112
5 changed files with 70 additions and 76 deletions
|
|
@ -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" : {
|
||||
|
|
|
|||
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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)")
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in a new issue