mirror of
https://github.com/yattee/yattee.git
synced 2025-08-05 02:04:07 +00:00
Localizations
This commit is contained in:
@@ -3,7 +3,7 @@ import Foundation
|
||||
import SwiftUI
|
||||
|
||||
struct Buffering: View {
|
||||
var reason = "Buffering stream..."
|
||||
var reason = "Buffering stream...".localized()
|
||||
var state: String?
|
||||
|
||||
#if os(iOS)
|
||||
|
@@ -14,7 +14,15 @@ struct OpeningStream: View {
|
||||
}
|
||||
|
||||
var reason: String {
|
||||
player.videoBeingOpened.isNil ? "Opening\(streamQuality)stream..." : "Loading streams..."
|
||||
guard player.videoBeingOpened != nil else {
|
||||
return "Loading streams...".localized()
|
||||
}
|
||||
|
||||
if player.musicMode {
|
||||
return "Opening audio stream...".localized()
|
||||
}
|
||||
|
||||
return String(format: "Opening %@ stream...".localized(), streamQuality)
|
||||
}
|
||||
|
||||
var state: String? {
|
||||
|
@@ -45,11 +45,11 @@ enum PlayerControlsLayout: String, CaseIterable, Defaults.Serializable {
|
||||
var description: String {
|
||||
switch self {
|
||||
case .tvRegular:
|
||||
return "TV"
|
||||
return "TV".localized()
|
||||
case .veryLarge:
|
||||
return "Very Large"
|
||||
return "Very Large".localized()
|
||||
default:
|
||||
return rawValue.capitalized
|
||||
return rawValue.capitalized.localized()
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -70,11 +70,26 @@ struct VideoDetails: View {
|
||||
)
|
||||
|
||||
HStack(spacing: 4) {
|
||||
pageButton("Info", "info.circle", .info, !video.isNil)
|
||||
pageButton("Chapters", "bookmark", .chapters, !(video?.chapters.isEmpty ?? true))
|
||||
pageButton("Comments", "text.bubble", .comments, !video.isNil) { comments.load() }
|
||||
pageButton("Related", "rectangle.stack.fill", .related, !video.isNil)
|
||||
pageButton("Queue", "list.number", .queue, !player.queue.isEmpty)
|
||||
pageButton(
|
||||
"Info".localized(),
|
||||
"info.circle", .info, !video.isNil
|
||||
)
|
||||
pageButton(
|
||||
"Chapters".localized(),
|
||||
"bookmark", .chapters, !(video?.chapters.isEmpty ?? true)
|
||||
)
|
||||
pageButton(
|
||||
"Comments".localized(),
|
||||
"text.bubble", .comments, !video.isNil
|
||||
) { comments.load() }
|
||||
pageButton(
|
||||
"Related".localized(),
|
||||
"rectangle.stack.fill", .related, !video.isNil
|
||||
)
|
||||
pageButton(
|
||||
"Queue".localized(),
|
||||
"list.number", .queue, !player.queue.isEmpty
|
||||
)
|
||||
}
|
||||
.onChange(of: player.currentItem) { _ in
|
||||
page.update(.moveToFirst)
|
||||
|
@@ -328,6 +328,7 @@ struct VideoPlayerView: View {
|
||||
if !fullScreenPlayer {
|
||||
VideoDetails(sidebarQueue: sidebarQueue, fullScreen: $fullScreenDetails)
|
||||
#if os(iOS)
|
||||
// .zIndex(-1)
|
||||
.ignoresSafeArea(.all, edges: .bottom)
|
||||
#endif
|
||||
.background(colorScheme == .dark ? Color.black : Color.white)
|
||||
|
Reference in New Issue
Block a user