Localizations fixes

This commit is contained in:
Arkadiusz Fal
2023-04-22 23:10:05 +02:00
parent 5c0cf7452c
commit 8e829ed3b1
3 changed files with 13 additions and 12 deletions

View File

@@ -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)
}
}

View File

@@ -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)
}
}
}