mirror of
https://github.com/yattee/yattee.git
synced 2024-11-10 00:08:21 +00:00
Localizations fixes
This commit is contained in:
parent
5c0cf7452c
commit
8e829ed3b1
@ -63,14 +63,14 @@ struct PlaybackSettings: View {
|
|||||||
}
|
}
|
||||||
|
|
||||||
HStack {
|
HStack {
|
||||||
controlsHeader("Playback Mode")
|
controlsHeader("Playback Mode".localized())
|
||||||
Spacer()
|
Spacer()
|
||||||
playbackModeControl
|
playbackModeControl
|
||||||
}
|
}
|
||||||
.padding(.vertical, 10)
|
.padding(.vertical, 10)
|
||||||
|
|
||||||
HStack {
|
HStack {
|
||||||
controlsHeader("Rate")
|
controlsHeader("Rate".localized())
|
||||||
Spacer()
|
Spacer()
|
||||||
HStack(spacing: rateButtonsSpacing) {
|
HStack(spacing: rateButtonsSpacing) {
|
||||||
decreaseRateButton
|
decreaseRateButton
|
||||||
@ -86,7 +86,7 @@ struct PlaybackSettings: View {
|
|||||||
}
|
}
|
||||||
if player.activeBackend == .mpv {
|
if player.activeBackend == .mpv {
|
||||||
HStack {
|
HStack {
|
||||||
controlsHeader("Captions")
|
controlsHeader("Captions".localized())
|
||||||
Spacer()
|
Spacer()
|
||||||
captionsButton
|
captionsButton
|
||||||
#if os(tvOS)
|
#if os(tvOS)
|
||||||
@ -292,7 +292,7 @@ struct PlaybackSettings: View {
|
|||||||
Button {
|
Button {
|
||||||
player.playbackMode = player.playbackMode.next()
|
player.playbackMode = player.playbackMode.next()
|
||||||
} label: {
|
} label: {
|
||||||
Label(player.playbackMode.description, systemImage: player.playbackMode.systemImage)
|
Label(player.playbackMode.description.localized(), systemImage: player.playbackMode.systemImage)
|
||||||
.transaction { t in t.animation = nil }
|
.transaction { t in t.animation = nil }
|
||||||
.frame(minWidth: 350)
|
.frame(minWidth: 350)
|
||||||
}
|
}
|
||||||
@ -306,7 +306,7 @@ struct PlaybackSettings: View {
|
|||||||
Menu {
|
Menu {
|
||||||
playbackModePicker
|
playbackModePicker
|
||||||
} label: {
|
} label: {
|
||||||
Label(player.playbackMode.description, systemImage: player.playbackMode.systemImage)
|
Label(player.playbackMode.description.localized(), systemImage: player.playbackMode.systemImage)
|
||||||
}
|
}
|
||||||
.transaction { t in t.animation = .none }
|
.transaction { t in t.animation = .none }
|
||||||
#endif
|
#endif
|
||||||
@ -315,7 +315,7 @@ struct PlaybackSettings: View {
|
|||||||
var playbackModePicker: some View {
|
var playbackModePicker: some View {
|
||||||
Picker("Playback Mode", selection: $player.playbackMode) {
|
Picker("Playback Mode", selection: $player.playbackMode) {
|
||||||
ForEach(PlayerModel.PlaybackMode.allCases, id: \.rawValue) { mode in
|
ForEach(PlayerModel.PlaybackMode.allCases, id: \.rawValue) { mode in
|
||||||
Label(mode.description, systemImage: mode.systemImage).tag(mode)
|
Label(mode.description.localized(), systemImage: mode.systemImage).tag(mode)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.labelsHidden()
|
.labelsHidden()
|
||||||
@ -437,7 +437,7 @@ struct PlaybackSettings: View {
|
|||||||
|
|
||||||
@ViewBuilder private var captionsPicker: some View {
|
@ViewBuilder private var captionsPicker: some View {
|
||||||
let captions = player.currentVideo?.captions ?? []
|
let captions = player.currentVideo?.captions ?? []
|
||||||
Picker("Captions", selection: $player.captions) {
|
Picker("Captions".localized(), selection: $player.captions) {
|
||||||
if captions.isEmpty {
|
if captions.isEmpty {
|
||||||
Text("Not available")
|
Text("Not available")
|
||||||
} else {
|
} else {
|
||||||
|
@ -137,12 +137,13 @@ struct AdvancedSettings: View {
|
|||||||
HStack {
|
HStack {
|
||||||
Text("Maximum feed items")
|
Text("Maximum feed items")
|
||||||
.frame(minWidth: 200, alignment: .leading)
|
.frame(minWidth: 200, alignment: .leading)
|
||||||
|
.multilineTextAlignment(.leading)
|
||||||
TextField("Limit", text: $feedCacheSize)
|
TextField("Limit", text: $feedCacheSize)
|
||||||
|
.multilineTextAlignment(.trailing)
|
||||||
#if !os(macOS)
|
#if !os(macOS)
|
||||||
.keyboardType(.numberPad)
|
.keyboardType(.numberPad)
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
.multilineTextAlignment(.trailing)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private var showCacheStatusToggle: some View {
|
private var showCacheStatusToggle: some View {
|
||||||
@ -167,7 +168,7 @@ struct AdvancedSettings: View {
|
|||||||
}
|
}
|
||||||
|
|
||||||
var cacheSize: some View {
|
var cacheSize: some View {
|
||||||
Text(String(format: "Total size: %@", BaseCacheModel.shared.totalSizeFormatted))
|
Text(String(format: "Total size: %@".localized(), BaseCacheModel.shared.totalSizeFormatted))
|
||||||
.foregroundColor(.secondary)
|
.foregroundColor(.secondary)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -166,8 +166,8 @@ struct BrowsingSettings: View {
|
|||||||
Section(header: SettingsHeader(text: "Player Bar".localized()), footer: playerBarFooter) {
|
Section(header: SettingsHeader(text: "Player Bar".localized()), footer: playerBarFooter) {
|
||||||
Toggle("Open expanded", isOn: $playerButtonIsExpanded)
|
Toggle("Open expanded", isOn: $playerButtonIsExpanded)
|
||||||
Toggle("Always show controls buttons", isOn: $playerButtonShowsControlButtonsWhenMinimized)
|
Toggle("Always show controls buttons", isOn: $playerButtonShowsControlButtonsWhenMinimized)
|
||||||
playerBarGesturePicker("Single tap gesture", selection: $playerButtonSingleTapGesture)
|
playerBarGesturePicker("Single tap gesture".localized(), selection: $playerButtonSingleTapGesture)
|
||||||
playerBarGesturePicker("Double tap gesture", selection: $playerButtonDoubleTapGesture)
|
playerBarGesturePicker("Double tap gesture".localized(), selection: $playerButtonDoubleTapGesture)
|
||||||
HStack {
|
HStack {
|
||||||
Text("Maximum width expanded")
|
Text("Maximum width expanded")
|
||||||
Spacer()
|
Spacer()
|
||||||
@ -185,7 +185,7 @@ struct BrowsingSettings: View {
|
|||||||
func playerBarGesturePicker(_ label: String, selection: Binding<PlayerTapGestureAction>) -> some View {
|
func playerBarGesturePicker(_ label: String, selection: Binding<PlayerTapGestureAction>) -> some View {
|
||||||
Picker(label, selection: selection) {
|
Picker(label, selection: selection) {
|
||||||
ForEach(PlayerTapGestureAction.allCases, id: \.rawValue) { action in
|
ForEach(PlayerTapGestureAction.allCases, id: \.rawValue) { action in
|
||||||
Text(action.label).tag(action)
|
Text(action.label.localized()).tag(action)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user