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 {
|
||||
controlsHeader("Playback Mode")
|
||||
controlsHeader("Playback Mode".localized())
|
||||
Spacer()
|
||||
playbackModeControl
|
||||
}
|
||||
.padding(.vertical, 10)
|
||||
|
||||
HStack {
|
||||
controlsHeader("Rate")
|
||||
controlsHeader("Rate".localized())
|
||||
Spacer()
|
||||
HStack(spacing: rateButtonsSpacing) {
|
||||
decreaseRateButton
|
||||
@ -86,7 +86,7 @@ struct PlaybackSettings: View {
|
||||
}
|
||||
if player.activeBackend == .mpv {
|
||||
HStack {
|
||||
controlsHeader("Captions")
|
||||
controlsHeader("Captions".localized())
|
||||
Spacer()
|
||||
captionsButton
|
||||
#if os(tvOS)
|
||||
@ -292,7 +292,7 @@ struct PlaybackSettings: View {
|
||||
Button {
|
||||
player.playbackMode = player.playbackMode.next()
|
||||
} label: {
|
||||
Label(player.playbackMode.description, systemImage: player.playbackMode.systemImage)
|
||||
Label(player.playbackMode.description.localized(), systemImage: player.playbackMode.systemImage)
|
||||
.transaction { t in t.animation = nil }
|
||||
.frame(minWidth: 350)
|
||||
}
|
||||
@ -306,7 +306,7 @@ struct PlaybackSettings: View {
|
||||
Menu {
|
||||
playbackModePicker
|
||||
} label: {
|
||||
Label(player.playbackMode.description, systemImage: player.playbackMode.systemImage)
|
||||
Label(player.playbackMode.description.localized(), systemImage: player.playbackMode.systemImage)
|
||||
}
|
||||
.transaction { t in t.animation = .none }
|
||||
#endif
|
||||
@ -315,7 +315,7 @@ struct PlaybackSettings: View {
|
||||
var playbackModePicker: some View {
|
||||
Picker("Playback Mode", selection: $player.playbackMode) {
|
||||
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()
|
||||
@ -437,7 +437,7 @@ struct PlaybackSettings: View {
|
||||
|
||||
@ViewBuilder private var captionsPicker: some View {
|
||||
let captions = player.currentVideo?.captions ?? []
|
||||
Picker("Captions", selection: $player.captions) {
|
||||
Picker("Captions".localized(), selection: $player.captions) {
|
||||
if captions.isEmpty {
|
||||
Text("Not available")
|
||||
} else {
|
||||
|
@ -137,12 +137,13 @@ struct AdvancedSettings: View {
|
||||
HStack {
|
||||
Text("Maximum feed items")
|
||||
.frame(minWidth: 200, alignment: .leading)
|
||||
.multilineTextAlignment(.leading)
|
||||
TextField("Limit", text: $feedCacheSize)
|
||||
.multilineTextAlignment(.trailing)
|
||||
#if !os(macOS)
|
||||
.keyboardType(.numberPad)
|
||||
#endif
|
||||
}
|
||||
.multilineTextAlignment(.trailing)
|
||||
}
|
||||
|
||||
private var showCacheStatusToggle: some View {
|
||||
@ -167,7 +168,7 @@ struct AdvancedSettings: View {
|
||||
}
|
||||
|
||||
var cacheSize: some View {
|
||||
Text(String(format: "Total size: %@", BaseCacheModel.shared.totalSizeFormatted))
|
||||
Text(String(format: "Total size: %@".localized(), BaseCacheModel.shared.totalSizeFormatted))
|
||||
.foregroundColor(.secondary)
|
||||
}
|
||||
}
|
||||
|
@ -166,8 +166,8 @@ struct BrowsingSettings: View {
|
||||
Section(header: SettingsHeader(text: "Player Bar".localized()), footer: playerBarFooter) {
|
||||
Toggle("Open expanded", isOn: $playerButtonIsExpanded)
|
||||
Toggle("Always show controls buttons", isOn: $playerButtonShowsControlButtonsWhenMinimized)
|
||||
playerBarGesturePicker("Single tap gesture", selection: $playerButtonSingleTapGesture)
|
||||
playerBarGesturePicker("Double tap gesture", selection: $playerButtonDoubleTapGesture)
|
||||
playerBarGesturePicker("Single tap gesture".localized(), selection: $playerButtonSingleTapGesture)
|
||||
playerBarGesturePicker("Double tap gesture".localized(), selection: $playerButtonDoubleTapGesture)
|
||||
HStack {
|
||||
Text("Maximum width expanded")
|
||||
Spacer()
|
||||
@ -185,7 +185,7 @@ struct BrowsingSettings: View {
|
||||
func playerBarGesturePicker(_ label: String, selection: Binding<PlayerTapGestureAction>) -> some View {
|
||||
Picker(label, selection: selection) {
|
||||
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