Localizations

This commit is contained in:
Arkadiusz Fal
2022-09-04 17:28:30 +02:00
parent 2d51f6adff
commit b66e177114
33 changed files with 2180 additions and 122 deletions

View File

@@ -39,7 +39,7 @@ struct HistorySettings: View {
private var sections: some View {
Group {
#if os(tvOS)
Section(header: SettingsHeader(text: "History")) {
Section(header: SettingsHeader(text: "History".localized())) {
Toggle("Save history of searches, channels and playlists", isOn: $saveRecents)
Toggle("Save history of played videos", isOn: $saveHistory)
Toggle("Show progress of watching on thumbnails", isOn: $showWatchingProgress)
@@ -53,7 +53,7 @@ struct HistorySettings: View {
watchedVideoBadgeColorPicker
}
#else
Section(header: SettingsHeader(text: "History")) {
Section(header: SettingsHeader(text: "History".localized())) {
Toggle("Save history of searches, channels and playlists", isOn: $saveRecents)
Toggle("Save history of played videos", isOn: $saveHistory)
Toggle("Show progress of watching on thumbnails", isOn: $showWatchingProgress)
@@ -61,7 +61,7 @@ struct HistorySettings: View {
Toggle("Keep last played video in the queue after restart", isOn: $saveLastPlayed)
}
Section(header: SettingsHeader(text: "Watched")) {
Section(header: SettingsHeader(text: "Watched".localized())) {
watchedVideoPlayNowBehaviorPicker
#if os(macOS)
.padding(.top, 1)
@@ -70,7 +70,7 @@ struct HistorySettings: View {
resetWatchedStatusOnPlayingToggle
}
Section(header: SettingsHeader(text: "Interface")) {
Section(header: SettingsHeader(text: "Interface".localized())) {
watchedVideoStylePicker
#if os(macOS)
.padding(.top, 1)
@@ -88,7 +88,7 @@ struct HistorySettings: View {
}
private var watchedThresholdPicker: some View {
Section(header: SettingsHeader(text: "Mark video as watched after playing", secondary: true)) {
Section(header: SettingsHeader(text: "Mark video as watched after playing".localized(), secondary: true)) {
Picker("Mark video as watched after playing", selection: $watchedThreshold) {
ForEach(Self.watchedThresholds, id: \.self) { threshold in
Text("\(threshold)%").tag(threshold)
@@ -100,7 +100,7 @@ struct HistorySettings: View {
}
private var watchedVideoStylePicker: some View {
Section(header: SettingsHeader(text: "Mark watched videos with", secondary: true)) {
Section(header: SettingsHeader(text: "Mark watched videos with".localized(), secondary: true)) {
Picker("Mark watched videos with", selection: $watchedVideoStyle) {
Text("Nothing").tag(WatchedVideoStyle.nothing)
Text("Badge").tag(WatchedVideoStyle.badge)
@@ -113,7 +113,7 @@ struct HistorySettings: View {
}
private var watchedVideoBadgeColorPicker: some View {
Section(header: SettingsHeader(text: "Badge color", secondary: true)) {
Section(header: SettingsHeader(text: "Badge color".localized(), secondary: true)) {
Picker("Badge color", selection: $watchedVideoBadgeColor) {
Text("Based on system color scheme").tag(WatchedVideoBadgeColor.colorSchemeBased)
Text("Blue").tag(WatchedVideoBadgeColor.blue)
@@ -127,7 +127,7 @@ struct HistorySettings: View {
}
private var watchedVideoPlayNowBehaviorPicker: some View {
Section(header: SettingsHeader(text: "When partially watched video is played", secondary: true)) {
Section(header: SettingsHeader(text: "When partially watched video is played".localized(), secondary: true)) {
Picker("When partially watched video is played", selection: $watchedVideoPlayNowBehavior) {
Text("Continue").tag(WatchedVideoPlayNowBehavior.continue)
Text("Restart").tag(WatchedVideoPlayNowBehavior.restart)