This commit is contained in:
Ethan Pippin 2022-01-10 15:51:24 -07:00
parent 057beca0ff
commit f02c52f20a
58 changed files with 623 additions and 601 deletions

View File

@ -32,7 +32,7 @@ final class LiveTVTabCoordinator: TabCoordinatable {
func makeProgramsTab(isActive: Bool) -> some View {
HStack {
Image(systemName: "tv")
L10n.programs.text
L10n.programs.text
}
}
@ -44,7 +44,7 @@ final class LiveTVTabCoordinator: TabCoordinatable {
func makeChannelsTab(isActive: Bool) -> some View {
HStack {
Image(systemName: "square.grid.3x3")
L10n.channels.text
L10n.channels.text
}
}
@ -56,7 +56,7 @@ final class LiveTVTabCoordinator: TabCoordinatable {
func makeHomeTab(isActive: Bool) -> some View {
HStack {
Image(systemName: "house")
L10n.home.text
L10n.home.text
}
}
}

View File

@ -43,26 +43,26 @@ final class MainTabCoordinator: TabCoordinatable {
}
func makeTv() -> NavigationViewCoordinator<TVLibrariesCoordinator> {
NavigationViewCoordinator(TVLibrariesCoordinator(viewModel: TVLibrariesViewModel(), title: L10n.tvShows))
NavigationViewCoordinator(TVLibrariesCoordinator(viewModel: TVLibrariesViewModel(), title: L10n.tvShows))
}
@ViewBuilder
func makeTvTab(isActive: Bool) -> some View {
HStack {
Image(systemName: "tv")
L10n.tvShows.text
L10n.tvShows.text
}
}
func makeMovies() -> NavigationViewCoordinator<MovieLibrariesCoordinator> {
NavigationViewCoordinator(MovieLibrariesCoordinator(viewModel: MovieLibrariesViewModel(), title: L10n.movies))
NavigationViewCoordinator(MovieLibrariesCoordinator(viewModel: MovieLibrariesViewModel(), title: L10n.movies))
}
@ViewBuilder
func makeMoviesTab(isActive: Bool) -> some View {
HStack {
Image(systemName: "film")
L10n.movies.text
L10n.movies.text
}
}
@ -74,7 +74,7 @@ final class MainTabCoordinator: TabCoordinatable {
func makeOtherTab(isActive: Bool) -> some View {
HStack {
Image(systemName: "folder")
L10n.other.text
L10n.other.text
}
}

View File

@ -67,7 +67,7 @@ enum NetworkError: Error {
{
let errorMessage: ErrorMessage
var logMessage = L10n.unknownError
var logMessage = L10n.unknownError
var logConstructor = logConstructor
switch response {
@ -77,14 +77,14 @@ enum NetworkError: Error {
// https://developer.apple.com/documentation/foundation/1508628-url_loading_system_error_codes
switch err._code {
case -1001:
logMessage = L10n.networkTimedOut
logMessage = L10n.networkTimedOut
logConstructor.message = logMessage
errorMessage = ErrorMessage(code: err._code,
title: L10n.error,
title: L10n.error,
displayMessage: displayMessage,
logConstructor: logConstructor)
case -1004:
logMessage = L10n.cannotConnectToHost
logMessage = L10n.cannotConnectToHost
logConstructor.message = logMessage
errorMessage = ErrorMessage(code: err._code,
title: L10n.error,
@ -128,7 +128,7 @@ enum NetworkError: Error {
{
let errorMessage: ErrorMessage
var logMessage = L10n.unknownError
var logMessage = L10n.unknownError
var logConstructor = logConstructor
switch response {
@ -137,10 +137,10 @@ enum NetworkError: Error {
// Generic HTTP status codes
switch code {
case 401:
logMessage = L10n.unauthorizedUser
logMessage = L10n.unauthorizedUser
logConstructor.message = logMessage
errorMessage = ErrorMessage(code: code,
title: L10n.unauthorized,
title: L10n.unauthorized,
displayMessage: displayMessage,
logConstructor: logConstructor)
default:

View File

@ -248,15 +248,15 @@ public extension BaseItemDto {
var informationItems: [ItemDetail] = []
if let productionYear = productionYear {
informationItems.append(ItemDetail(title: L10n.released, content: "\(productionYear)"))
informationItems.append(ItemDetail(title: L10n.released, content: "\(productionYear)"))
}
if let rating = officialRating {
informationItems.append(ItemDetail(title: L10n.rated, content: "\(rating)"))
informationItems.append(ItemDetail(title: L10n.rated, content: "\(rating)"))
}
if let runtime = getItemRuntime() {
informationItems.append(ItemDetail(title: L10n.runtime, content: runtime))
informationItems.append(ItemDetail(title: L10n.runtime, content: runtime))
}
return informationItems
@ -267,7 +267,7 @@ public extension BaseItemDto {
if let container = container {
let containerList = container.split(separator: ",").joined(separator: ", ")
mediaItems.append(ItemDetail(title: L10n.containers, content: containerList))
mediaItems.append(ItemDetail(title: L10n.containers, content: containerList))
}
if let mediaStreams = mediaStreams {
@ -275,15 +275,15 @@ public extension BaseItemDto {
let subtitleStreams = mediaStreams.filter { $0.type == .subtitle }
if !audioStreams.isEmpty {
let audioList = audioStreams.compactMap { "\($0.displayTitle ?? L10n.noTitle) (\($0.codec ?? L10n.noCodec))" }
let audioList = audioStreams.compactMap { "\($0.displayTitle ?? L10n.noTitle) (\($0.codec ?? L10n.noCodec))" }
.joined(separator: ", ")
mediaItems.append(ItemDetail(title: L10n.audio, content: audioList))
mediaItems.append(ItemDetail(title: L10n.audio, content: audioList))
}
if !subtitleStreams.isEmpty {
let subtitleList = subtitleStreams.compactMap { "\($0.displayTitle ?? L10n.noTitle) (\($0.codec ?? L10n.noCodec))" }
let subtitleList = subtitleStreams.compactMap { "\($0.displayTitle ?? L10n.noTitle) (\($0.codec ?? L10n.noCodec))" }
.joined(separator: ", ")
mediaItems.append(ItemDetail(title: L10n.subtitles, content: subtitleList))
mediaItems.append(ItemDetail(title: L10n.subtitles, content: subtitleList))
}
}

View File

@ -1,3 +1,11 @@
//
// Swiftfin is subject to the terms of the Mozilla Public
// License, v2.0. If a copy of the MPL was not distributed with this
// file, you can obtain one at https://mozilla.org/MPL/2.0/.
//
// Copyright (c) 2022 Jellyfin & Jellyfin Contributors
//
// swiftlint:disable all
// Generated using SwiftGen https://github.com/SwiftGen/SwiftGen
@ -10,385 +18,399 @@ import Foundation
// swiftlint:disable explicit_type_interface function_parameter_count identifier_name line_length
// swiftlint:disable nesting type_body_length type_name vertical_whitespace_opening_braces
internal enum L10n {
/// About
internal static let about = L10n.tr("Localizable", "about")
/// Accessibility
internal static let accessibility = L10n.tr("Localizable", "accessibility")
/// Add URL
internal static let addURL = L10n.tr("Localizable", "addURL")
/// All Genres
internal static let allGenres = L10n.tr("Localizable", "allGenres")
/// All Media
internal static let allMedia = L10n.tr("Localizable", "allMedia")
/// Appearance
internal static let appearance = L10n.tr("Localizable", "appearance")
/// Apply
internal static let apply = L10n.tr("Localizable", "apply")
/// Audio
internal static let audio = L10n.tr("Localizable", "audio")
/// Audio & Captions
internal static let audioAndCaptions = L10n.tr("Localizable", "audioAndCaptions")
/// Audio Track
internal static let audioTrack = L10n.tr("Localizable", "audioTrack")
/// Auto Play
internal static let autoPlay = L10n.tr("Localizable", "autoPlay")
/// Back
internal static let back = L10n.tr("Localizable", "back")
/// Cancel
internal static let cancel = L10n.tr("Localizable", "cancel")
/// Cannot connect to host
internal static let cannotConnectToHost = L10n.tr("Localizable", "cannotConnectToHost")
/// CAST
internal static let cast = L10n.tr("Localizable", "cast")
/// Cast & Crew
internal static let castAndCrew = L10n.tr("Localizable", "castAndCrew")
/// Change Server
internal static let changeServer = L10n.tr("Localizable", "changeServer")
/// Channels
internal static let channels = L10n.tr("Localizable", "channels")
/// Cinematic Views
internal static let cinematicViews = L10n.tr("Localizable", "cinematicViews")
/// Closed Captions
internal static let closedCaptions = L10n.tr("Localizable", "closedCaptions")
/// Compact
internal static let compact = L10n.tr("Localizable", "compact")
/// Confirm Close
internal static let confirmClose = L10n.tr("Localizable", "confirmClose")
/// Connect
internal static let connect = L10n.tr("Localizable", "connect")
/// Connect Manually
internal static let connectManually = L10n.tr("Localizable", "connectManually")
/// Connect to Jellyfin
internal static let connectToJellyfin = L10n.tr("Localizable", "connectToJellyfin")
/// Connect to a Jellyfin server
internal static let connectToJellyfinServer = L10n.tr("Localizable", "connectToJellyfinServer")
/// Connect to a Jellyfin server to get started
internal static let connectToJellyfinServerStart = L10n.tr("Localizable", "connectToJellyfinServerStart")
/// Connect to Server
internal static let connectToServer = L10n.tr("Localizable", "connectToServer")
/// Containers
internal static let containers = L10n.tr("Localizable", "containers")
/// Continue
internal static let `continue` = L10n.tr("Localizable", "continue")
/// Continue Watching
internal static let continueWatching = L10n.tr("Localizable", "continueWatching")
/// Dark
internal static let dark = L10n.tr("Localizable", "dark")
/// Default Scheme
internal static let defaultScheme = L10n.tr("Localizable", "defaultScheme")
/// DIRECTOR
internal static let director = L10n.tr("Localizable", "director")
/// Discovered Servers
internal static let discoveredServers = L10n.tr("Localizable", "discoveredServers")
/// Display order
internal static let displayOrder = L10n.tr("Localizable", "displayOrder")
/// Edit Jump Lengths
internal static let editJumpLengths = L10n.tr("Localizable", "editJumpLengths")
/// Empty Next Up
internal static let emptyNextUp = L10n.tr("Localizable", "emptyNextUp")
/// Episodes
internal static let episodes = L10n.tr("Localizable", "episodes")
/// Error
internal static let error = L10n.tr("Localizable", "error")
/// Existing Server
internal static let existingServer = L10n.tr("Localizable", "existingServer")
/// Existing User
internal static let existingUser = L10n.tr("Localizable", "existingUser")
/// Experimental
internal static let experimental = L10n.tr("Localizable", "experimental")
/// Favorites
internal static let favorites = L10n.tr("Localizable", "favorites")
/// Filter Results
internal static let filterResults = L10n.tr("Localizable", "filterResults")
/// Filters
internal static let filters = L10n.tr("Localizable", "filters")
/// Genres
internal static let genres = L10n.tr("Localizable", "genres")
/// Home
internal static let home = L10n.tr("Localizable", "home")
/// Information
internal static let information = L10n.tr("Localizable", "information")
/// Items
internal static let items = L10n.tr("Localizable", "items")
/// Jump Backward Length
internal static let jumpBackwardLength = L10n.tr("Localizable", "jumpBackwardLength")
/// Jump Forward Length
internal static let jumpForwardLength = L10n.tr("Localizable", "jumpForwardLength")
/// Jump Gestures Enabled
internal static let jumpGesturesEnabled = L10n.tr("Localizable", "jumpGesturesEnabled")
/// %s seconds
internal static func jumpLengthSeconds(_ p1: UnsafePointer<CChar>) -> String {
return L10n.tr("Localizable", "jumpLengthSeconds", p1)
}
/// Larger
internal static let larger = L10n.tr("Localizable", "larger")
/// Largest
internal static let largest = L10n.tr("Localizable", "largest")
/// Latest %@
internal static func latestWithString(_ p1: Any) -> String {
return L10n.tr("Localizable", "latestWithString", String(describing: p1))
}
/// Library
internal static let library = L10n.tr("Localizable", "library")
/// Light
internal static let light = L10n.tr("Localizable", "light")
/// Loading
internal static let loading = L10n.tr("Localizable", "loading")
/// Local Servers
internal static let localServers = L10n.tr("Localizable", "localServers")
/// Login
internal static let login = L10n.tr("Localizable", "login")
/// Login to %@
internal static func loginToWithString(_ p1: Any) -> String {
return L10n.tr("Localizable", "loginToWithString", String(describing: p1))
}
/// Media
internal static let media = L10n.tr("Localizable", "media")
/// More Like This
internal static let moreLikeThis = L10n.tr("Localizable", "moreLikeThis")
/// Movies
internal static let movies = L10n.tr("Localizable", "movies")
/// %d users
internal static func multipleUsers(_ p1: Int) -> String {
return L10n.tr("Localizable", "multipleUsers", p1)
}
/// Name
internal static let name = L10n.tr("Localizable", "name")
/// Networking
internal static let networking = L10n.tr("Localizable", "networking")
/// Network timed out
internal static let networkTimedOut = L10n.tr("Localizable", "networkTimedOut")
/// Next
internal static let next = L10n.tr("Localizable", "next")
/// Next Up
internal static let nextUp = L10n.tr("Localizable", "nextUp")
/// No Cast devices found..
internal static let noCastdevicesfound = L10n.tr("Localizable", "noCastdevicesfound")
/// No Codec
internal static let noCodec = L10n.tr("Localizable", "noCodec")
/// No episodes available
internal static let noEpisodesAvailable = L10n.tr("Localizable", "noEpisodesAvailable")
/// No local servers found
internal static let noLocalServersFound = L10n.tr("Localizable", "noLocalServersFound")
/// None
internal static let `none` = L10n.tr("Localizable", "none")
/// No overview available
internal static let noOverviewAvailable = L10n.tr("Localizable", "noOverviewAvailable")
/// No results.
internal static let noResults = L10n.tr("Localizable", "noResults")
/// Normal
internal static let normal = L10n.tr("Localizable", "normal")
/// N/A
internal static let notAvailableSlash = L10n.tr("Localizable", "notAvailableSlash")
/// Type: %@ not implemented yet :(
internal static func notImplementedYetWithType(_ p1: Any) -> String {
return L10n.tr("Localizable", "notImplementedYetWithType", String(describing: p1))
}
/// No title
internal static let noTitle = L10n.tr("Localizable", "noTitle")
/// Ok
internal static let ok = L10n.tr("Localizable", "ok")
/// 1 user
internal static let oneUser = L10n.tr("Localizable", "oneUser")
/// Operating System
internal static let operatingSystem = L10n.tr("Localizable", "operatingSystem")
/// Other
internal static let other = L10n.tr("Localizable", "other")
/// Other User
internal static let otherUser = L10n.tr("Localizable", "otherUser")
/// Overlay
internal static let overlay = L10n.tr("Localizable", "overlay")
/// Overlay Type
internal static let overlayType = L10n.tr("Localizable", "overlayType")
/// Overview
internal static let overview = L10n.tr("Localizable", "overview")
/// Page %1$@ of %2$@
internal static func pageOfWithNumbers(_ p1: Any, _ p2: Any) -> String {
return L10n.tr("Localizable", "pageOfWithNumbers", String(describing: p1), String(describing: p2))
}
/// Password
internal static let password = L10n.tr("Localizable", "password")
/// Play
internal static let play = L10n.tr("Localizable", "play")
/// Playback settings
internal static let playbackSettings = L10n.tr("Localizable", "playbackSettings")
/// Playback Speed
internal static let playbackSpeed = L10n.tr("Localizable", "playbackSpeed")
/// Play Next
internal static let playNext = L10n.tr("Localizable", "playNext")
/// Play Next Item
internal static let playNextItem = L10n.tr("Localizable", "playNextItem")
/// Play Previous Item
internal static let playPreviousItem = L10n.tr("Localizable", "playPreviousItem")
/// Present
internal static let present = L10n.tr("Localizable", "present")
/// Press Down for Menu
internal static let pressDownForMenu = L10n.tr("Localizable", "pressDownForMenu")
/// Programs
internal static let programs = L10n.tr("Localizable", "programs")
/// Rated
internal static let rated = L10n.tr("Localizable", "rated")
/// Recently Added
internal static let recentlyAdded = L10n.tr("Localizable", "recentlyAdded")
/// Recommended
internal static let recommended = L10n.tr("Localizable", "recommended")
/// Refresh
internal static let refresh = L10n.tr("Localizable", "refresh")
/// Regular
internal static let regular = L10n.tr("Localizable", "regular")
/// Released
internal static let released = L10n.tr("Localizable", "released")
/// Remove
internal static let remove = L10n.tr("Localizable", "remove")
/// Remove All Users
internal static let removeAllUsers = L10n.tr("Localizable", "removeAllUsers")
/// Reset
internal static let reset = L10n.tr("Localizable", "reset")
/// Reset App Settings
internal static let resetAppSettings = L10n.tr("Localizable", "resetAppSettings")
/// Reset User Settings
internal static let resetUserSettings = L10n.tr("Localizable", "resetUserSettings")
/// Resume 5 Second Offset
internal static let resume5SecondOffset = L10n.tr("Localizable", "resume5SecondOffset")
/// Retry
internal static let retry = L10n.tr("Localizable", "retry")
/// Runtime
internal static let runtime = L10n.tr("Localizable", "runtime")
/// Search
internal static let search = L10n.tr("Localizable", "search")
/// Search
internal static let searchDots = L10n.tr("Localizable", "searchDots")
/// Searching
internal static let searchingDots = L10n.tr("Localizable", "searchingDots")
/// Season
internal static let season = L10n.tr("Localizable", "season")
/// S%1$@:E%2$@
internal static func seasonAndEpisode(_ p1: Any, _ p2: Any) -> String {
return L10n.tr("Localizable", "seasonAndEpisode", String(describing: p1), String(describing: p2))
}
/// Seasons
internal static let seasons = L10n.tr("Localizable", "seasons")
/// See All
internal static let seeAll = L10n.tr("Localizable", "seeAll")
/// See More
internal static let seeMore = L10n.tr("Localizable", "seeMore")
/// Select Cast Destination
internal static let selectCastDestination = L10n.tr("Localizable", "selectCastDestination")
/// Series
internal static let series = L10n.tr("Localizable", "series")
/// Server
internal static let server = L10n.tr("Localizable", "server")
/// Server %s is already connected
internal static func serverAlreadyConnected(_ p1: UnsafePointer<CChar>) -> String {
return L10n.tr("Localizable", "serverAlreadyConnected", p1)
}
/// Server %s already exists. Add new URL?
internal static func serverAlreadyExistsPrompt(_ p1: UnsafePointer<CChar>) -> String {
return L10n.tr("Localizable", "serverAlreadyExistsPrompt", p1)
}
/// Server Details
internal static let serverDetails = L10n.tr("Localizable", "serverDetails")
/// Server Information
internal static let serverInformation = L10n.tr("Localizable", "serverInformation")
/// Servers
internal static let servers = L10n.tr("Localizable", "servers")
/// Server URL
internal static let serverURL = L10n.tr("Localizable", "serverURL")
/// Settings
internal static let settings = L10n.tr("Localizable", "settings")
/// Show Cast & Crew
internal static let showCastAndCrew = L10n.tr("Localizable", "showCastAndCrew")
/// Show Poster Labels
internal static let showPosterLabels = L10n.tr("Localizable", "showPosterLabels")
/// Signed in as %@
internal static func signedInAsWithString(_ p1: Any) -> String {
return L10n.tr("Localizable", "signedInAsWithString", String(describing: p1))
}
/// Sign In
internal static let signIn = L10n.tr("Localizable", "signIn")
/// Sign in to get started
internal static let signInGetStarted = L10n.tr("Localizable", "signInGetStarted")
/// Sign In to %s
internal static func signInToServer(_ p1: UnsafePointer<CChar>) -> String {
return L10n.tr("Localizable", "signInToServer", p1)
}
/// Smaller
internal static let smaller = L10n.tr("Localizable", "smaller")
/// Smallest
internal static let smallest = L10n.tr("Localizable", "smallest")
/// Sort by
internal static let sortBy = L10n.tr("Localizable", "sortBy")
/// STUDIO
internal static let studio = L10n.tr("Localizable", "studio")
/// Studios
internal static let studios = L10n.tr("Localizable", "studios")
/// Subtitles
internal static let subtitles = L10n.tr("Localizable", "subtitles")
/// Subtitle Size
internal static let subtitleSize = L10n.tr("Localizable", "subtitleSize")
/// Suggestions
internal static let suggestions = L10n.tr("Localizable", "suggestions")
/// Switch User
internal static let switchUser = L10n.tr("Localizable", "switchUser")
/// System
internal static let system = L10n.tr("Localizable", "system")
/// Tags
internal static let tags = L10n.tr("Localizable", "tags")
/// Try again
internal static let tryAgain = L10n.tr("Localizable", "tryAgain")
/// TV Shows
internal static let tvShows = L10n.tr("Localizable", "tvShows")
/// Unable to connect to server
internal static let unableToConnectServer = L10n.tr("Localizable", "unableToConnectServer")
/// Unauthorized
internal static let unauthorized = L10n.tr("Localizable", "unauthorized")
/// Unauthorized user
internal static let unauthorizedUser = L10n.tr("Localizable", "unauthorizedUser")
/// Unknown
internal static let unknown = L10n.tr("Localizable", "unknown")
/// Unknown Error
internal static let unknownError = L10n.tr("Localizable", "unknownError")
/// URL
internal static let url = L10n.tr("Localizable", "url")
/// User
internal static let user = L10n.tr("Localizable", "user")
/// User %s is already signed in
internal static func userAlreadySignedIn(_ p1: UnsafePointer<CChar>) -> String {
return L10n.tr("Localizable", "userAlreadySignedIn", p1)
}
/// Username
internal static let username = L10n.tr("Localizable", "username")
/// Version
internal static let version = L10n.tr("Localizable", "version")
/// Video Player
internal static let videoPlayer = L10n.tr("Localizable", "videoPlayer")
/// Who's watching?
internal static let whosWatching = L10n.tr("Localizable", "WhosWatching")
/// WIP
internal static let wip = L10n.tr("Localizable", "wip")
/// Your Favorites
internal static let yourFavorites = L10n.tr("Localizable", "yourFavorites")
/// About
internal static let about = L10n.tr("Localizable", "about")
/// Accessibility
internal static let accessibility = L10n.tr("Localizable", "accessibility")
/// Add URL
internal static let addURL = L10n.tr("Localizable", "addURL")
/// All Genres
internal static let allGenres = L10n.tr("Localizable", "allGenres")
/// All Media
internal static let allMedia = L10n.tr("Localizable", "allMedia")
/// Appearance
internal static let appearance = L10n.tr("Localizable", "appearance")
/// Apply
internal static let apply = L10n.tr("Localizable", "apply")
/// Audio
internal static let audio = L10n.tr("Localizable", "audio")
/// Audio & Captions
internal static let audioAndCaptions = L10n.tr("Localizable", "audioAndCaptions")
/// Audio Track
internal static let audioTrack = L10n.tr("Localizable", "audioTrack")
/// Auto Play
internal static let autoPlay = L10n.tr("Localizable", "autoPlay")
/// Back
internal static let back = L10n.tr("Localizable", "back")
/// Cancel
internal static let cancel = L10n.tr("Localizable", "cancel")
/// Cannot connect to host
internal static let cannotConnectToHost = L10n.tr("Localizable", "cannotConnectToHost")
/// CAST
internal static let cast = L10n.tr("Localizable", "cast")
/// Cast & Crew
internal static let castAndCrew = L10n.tr("Localizable", "castAndCrew")
/// Change Server
internal static let changeServer = L10n.tr("Localizable", "changeServer")
/// Channels
internal static let channels = L10n.tr("Localizable", "channels")
/// Cinematic Views
internal static let cinematicViews = L10n.tr("Localizable", "cinematicViews")
/// Closed Captions
internal static let closedCaptions = L10n.tr("Localizable", "closedCaptions")
/// Compact
internal static let compact = L10n.tr("Localizable", "compact")
/// Confirm Close
internal static let confirmClose = L10n.tr("Localizable", "confirmClose")
/// Connect
internal static let connect = L10n.tr("Localizable", "connect")
/// Connect Manually
internal static let connectManually = L10n.tr("Localizable", "connectManually")
/// Connect to Jellyfin
internal static let connectToJellyfin = L10n.tr("Localizable", "connectToJellyfin")
/// Connect to a Jellyfin server
internal static let connectToJellyfinServer = L10n.tr("Localizable", "connectToJellyfinServer")
/// Connect to a Jellyfin server to get started
internal static let connectToJellyfinServerStart = L10n.tr("Localizable", "connectToJellyfinServerStart")
/// Connect to Server
internal static let connectToServer = L10n.tr("Localizable", "connectToServer")
/// Containers
internal static let containers = L10n.tr("Localizable", "containers")
/// Continue
internal static let `continue` = L10n.tr("Localizable", "continue")
/// Continue Watching
internal static let continueWatching = L10n.tr("Localizable", "continueWatching")
/// Dark
internal static let dark = L10n.tr("Localizable", "dark")
/// Default Scheme
internal static let defaultScheme = L10n.tr("Localizable", "defaultScheme")
/// DIRECTOR
internal static let director = L10n.tr("Localizable", "director")
/// Discovered Servers
internal static let discoveredServers = L10n.tr("Localizable", "discoveredServers")
/// Display order
internal static let displayOrder = L10n.tr("Localizable", "displayOrder")
/// Edit Jump Lengths
internal static let editJumpLengths = L10n.tr("Localizable", "editJumpLengths")
/// Empty Next Up
internal static let emptyNextUp = L10n.tr("Localizable", "emptyNextUp")
/// Episodes
internal static let episodes = L10n.tr("Localizable", "episodes")
/// Error
internal static let error = L10n.tr("Localizable", "error")
/// Existing Server
internal static let existingServer = L10n.tr("Localizable", "existingServer")
/// Existing User
internal static let existingUser = L10n.tr("Localizable", "existingUser")
/// Experimental
internal static let experimental = L10n.tr("Localizable", "experimental")
/// Favorites
internal static let favorites = L10n.tr("Localizable", "favorites")
/// Filter Results
internal static let filterResults = L10n.tr("Localizable", "filterResults")
/// Filters
internal static let filters = L10n.tr("Localizable", "filters")
/// Genres
internal static let genres = L10n.tr("Localizable", "genres")
/// Home
internal static let home = L10n.tr("Localizable", "home")
/// Information
internal static let information = L10n.tr("Localizable", "information")
/// Items
internal static let items = L10n.tr("Localizable", "items")
/// Jump Backward Length
internal static let jumpBackwardLength = L10n.tr("Localizable", "jumpBackwardLength")
/// Jump Forward Length
internal static let jumpForwardLength = L10n.tr("Localizable", "jumpForwardLength")
/// Jump Gestures Enabled
internal static let jumpGesturesEnabled = L10n.tr("Localizable", "jumpGesturesEnabled")
/// %s seconds
internal static func jumpLengthSeconds(_ p1: UnsafePointer<CChar>) -> String {
L10n.tr("Localizable", "jumpLengthSeconds", p1)
}
/// Larger
internal static let larger = L10n.tr("Localizable", "larger")
/// Largest
internal static let largest = L10n.tr("Localizable", "largest")
/// Latest %@
internal static func latestWithString(_ p1: Any) -> String {
L10n.tr("Localizable", "latestWithString", String(describing: p1))
}
/// Library
internal static let library = L10n.tr("Localizable", "library")
/// Light
internal static let light = L10n.tr("Localizable", "light")
/// Loading
internal static let loading = L10n.tr("Localizable", "loading")
/// Local Servers
internal static let localServers = L10n.tr("Localizable", "localServers")
/// Login
internal static let login = L10n.tr("Localizable", "login")
/// Login to %@
internal static func loginToWithString(_ p1: Any) -> String {
L10n.tr("Localizable", "loginToWithString", String(describing: p1))
}
/// Media
internal static let media = L10n.tr("Localizable", "media")
/// More Like This
internal static let moreLikeThis = L10n.tr("Localizable", "moreLikeThis")
/// Movies
internal static let movies = L10n.tr("Localizable", "movies")
/// %d users
internal static func multipleUsers(_ p1: Int) -> String {
L10n.tr("Localizable", "multipleUsers", p1)
}
/// Name
internal static let name = L10n.tr("Localizable", "name")
/// Networking
internal static let networking = L10n.tr("Localizable", "networking")
/// Network timed out
internal static let networkTimedOut = L10n.tr("Localizable", "networkTimedOut")
/// Next
internal static let next = L10n.tr("Localizable", "next")
/// Next Up
internal static let nextUp = L10n.tr("Localizable", "nextUp")
/// No Cast devices found..
internal static let noCastdevicesfound = L10n.tr("Localizable", "noCastdevicesfound")
/// No Codec
internal static let noCodec = L10n.tr("Localizable", "noCodec")
/// No episodes available
internal static let noEpisodesAvailable = L10n.tr("Localizable", "noEpisodesAvailable")
/// No local servers found
internal static let noLocalServersFound = L10n.tr("Localizable", "noLocalServersFound")
/// None
internal static let none = L10n.tr("Localizable", "none")
/// No overview available
internal static let noOverviewAvailable = L10n.tr("Localizable", "noOverviewAvailable")
/// No results.
internal static let noResults = L10n.tr("Localizable", "noResults")
/// Normal
internal static let normal = L10n.tr("Localizable", "normal")
/// N/A
internal static let notAvailableSlash = L10n.tr("Localizable", "notAvailableSlash")
/// Type: %@ not implemented yet :(
internal static func notImplementedYetWithType(_ p1: Any) -> String {
L10n.tr("Localizable", "notImplementedYetWithType", String(describing: p1))
}
/// No title
internal static let noTitle = L10n.tr("Localizable", "noTitle")
/// Ok
internal static let ok = L10n.tr("Localizable", "ok")
/// 1 user
internal static let oneUser = L10n.tr("Localizable", "oneUser")
/// Operating System
internal static let operatingSystem = L10n.tr("Localizable", "operatingSystem")
/// Other
internal static let other = L10n.tr("Localizable", "other")
/// Other User
internal static let otherUser = L10n.tr("Localizable", "otherUser")
/// Overlay
internal static let overlay = L10n.tr("Localizable", "overlay")
/// Overlay Type
internal static let overlayType = L10n.tr("Localizable", "overlayType")
/// Overview
internal static let overview = L10n.tr("Localizable", "overview")
/// Page %1$@ of %2$@
internal static func pageOfWithNumbers(_ p1: Any, _ p2: Any) -> String {
L10n.tr("Localizable", "pageOfWithNumbers", String(describing: p1), String(describing: p2))
}
/// Password
internal static let password = L10n.tr("Localizable", "password")
/// Play
internal static let play = L10n.tr("Localizable", "play")
/// Playback settings
internal static let playbackSettings = L10n.tr("Localizable", "playbackSettings")
/// Playback Speed
internal static let playbackSpeed = L10n.tr("Localizable", "playbackSpeed")
/// Play Next
internal static let playNext = L10n.tr("Localizable", "playNext")
/// Play Next Item
internal static let playNextItem = L10n.tr("Localizable", "playNextItem")
/// Play Previous Item
internal static let playPreviousItem = L10n.tr("Localizable", "playPreviousItem")
/// Present
internal static let present = L10n.tr("Localizable", "present")
/// Press Down for Menu
internal static let pressDownForMenu = L10n.tr("Localizable", "pressDownForMenu")
/// Programs
internal static let programs = L10n.tr("Localizable", "programs")
/// Rated
internal static let rated = L10n.tr("Localizable", "rated")
/// Recently Added
internal static let recentlyAdded = L10n.tr("Localizable", "recentlyAdded")
/// Recommended
internal static let recommended = L10n.tr("Localizable", "recommended")
/// Refresh
internal static let refresh = L10n.tr("Localizable", "refresh")
/// Regular
internal static let regular = L10n.tr("Localizable", "regular")
/// Released
internal static let released = L10n.tr("Localizable", "released")
/// Remove
internal static let remove = L10n.tr("Localizable", "remove")
/// Remove All Users
internal static let removeAllUsers = L10n.tr("Localizable", "removeAllUsers")
/// Reset
internal static let reset = L10n.tr("Localizable", "reset")
/// Reset App Settings
internal static let resetAppSettings = L10n.tr("Localizable", "resetAppSettings")
/// Reset User Settings
internal static let resetUserSettings = L10n.tr("Localizable", "resetUserSettings")
/// Resume 5 Second Offset
internal static let resume5SecondOffset = L10n.tr("Localizable", "resume5SecondOffset")
/// Retry
internal static let retry = L10n.tr("Localizable", "retry")
/// Runtime
internal static let runtime = L10n.tr("Localizable", "runtime")
/// Search
internal static let search = L10n.tr("Localizable", "search")
/// Search
internal static let searchDots = L10n.tr("Localizable", "searchDots")
/// Searching
internal static let searchingDots = L10n.tr("Localizable", "searchingDots")
/// Season
internal static let season = L10n.tr("Localizable", "season")
/// S%1$@:E%2$@
internal static func seasonAndEpisode(_ p1: Any, _ p2: Any) -> String {
L10n.tr("Localizable", "seasonAndEpisode", String(describing: p1), String(describing: p2))
}
/// Seasons
internal static let seasons = L10n.tr("Localizable", "seasons")
/// See All
internal static let seeAll = L10n.tr("Localizable", "seeAll")
/// See More
internal static let seeMore = L10n.tr("Localizable", "seeMore")
/// Select Cast Destination
internal static let selectCastDestination = L10n.tr("Localizable", "selectCastDestination")
/// Series
internal static let series = L10n.tr("Localizable", "series")
/// Server
internal static let server = L10n.tr("Localizable", "server")
/// Server %s is already connected
internal static func serverAlreadyConnected(_ p1: UnsafePointer<CChar>) -> String {
L10n.tr("Localizable", "serverAlreadyConnected", p1)
}
/// Server %s already exists. Add new URL?
internal static func serverAlreadyExistsPrompt(_ p1: UnsafePointer<CChar>) -> String {
L10n.tr("Localizable", "serverAlreadyExistsPrompt", p1)
}
/// Server Details
internal static let serverDetails = L10n.tr("Localizable", "serverDetails")
/// Server Information
internal static let serverInformation = L10n.tr("Localizable", "serverInformation")
/// Servers
internal static let servers = L10n.tr("Localizable", "servers")
/// Server URL
internal static let serverURL = L10n.tr("Localizable", "serverURL")
/// Settings
internal static let settings = L10n.tr("Localizable", "settings")
/// Show Cast & Crew
internal static let showCastAndCrew = L10n.tr("Localizable", "showCastAndCrew")
/// Show Poster Labels
internal static let showPosterLabels = L10n.tr("Localizable", "showPosterLabels")
/// Signed in as %@
internal static func signedInAsWithString(_ p1: Any) -> String {
L10n.tr("Localizable", "signedInAsWithString", String(describing: p1))
}
/// Sign In
internal static let signIn = L10n.tr("Localizable", "signIn")
/// Sign in to get started
internal static let signInGetStarted = L10n.tr("Localizable", "signInGetStarted")
/// Sign In to %s
internal static func signInToServer(_ p1: UnsafePointer<CChar>) -> String {
L10n.tr("Localizable", "signInToServer", p1)
}
/// Smaller
internal static let smaller = L10n.tr("Localizable", "smaller")
/// Smallest
internal static let smallest = L10n.tr("Localizable", "smallest")
/// Sort by
internal static let sortBy = L10n.tr("Localizable", "sortBy")
/// STUDIO
internal static let studio = L10n.tr("Localizable", "studio")
/// Studios
internal static let studios = L10n.tr("Localizable", "studios")
/// Subtitles
internal static let subtitles = L10n.tr("Localizable", "subtitles")
/// Subtitle Size
internal static let subtitleSize = L10n.tr("Localizable", "subtitleSize")
/// Suggestions
internal static let suggestions = L10n.tr("Localizable", "suggestions")
/// Switch User
internal static let switchUser = L10n.tr("Localizable", "switchUser")
/// System
internal static let system = L10n.tr("Localizable", "system")
/// Tags
internal static let tags = L10n.tr("Localizable", "tags")
/// Try again
internal static let tryAgain = L10n.tr("Localizable", "tryAgain")
/// TV Shows
internal static let tvShows = L10n.tr("Localizable", "tvShows")
/// Unable to connect to server
internal static let unableToConnectServer = L10n.tr("Localizable", "unableToConnectServer")
/// Unauthorized
internal static let unauthorized = L10n.tr("Localizable", "unauthorized")
/// Unauthorized user
internal static let unauthorizedUser = L10n.tr("Localizable", "unauthorizedUser")
/// Unknown
internal static let unknown = L10n.tr("Localizable", "unknown")
/// Unknown Error
internal static let unknownError = L10n.tr("Localizable", "unknownError")
/// URL
internal static let url = L10n.tr("Localizable", "url")
/// User
internal static let user = L10n.tr("Localizable", "user")
/// User %s is already signed in
internal static func userAlreadySignedIn(_ p1: UnsafePointer<CChar>) -> String {
L10n.tr("Localizable", "userAlreadySignedIn", p1)
}
/// Username
internal static let username = L10n.tr("Localizable", "username")
/// Version
internal static let version = L10n.tr("Localizable", "version")
/// Video Player
internal static let videoPlayer = L10n.tr("Localizable", "videoPlayer")
/// Who's watching?
internal static let whosWatching = L10n.tr("Localizable", "WhosWatching")
/// WIP
internal static let wip = L10n.tr("Localizable", "wip")
/// Your Favorites
internal static let yourFavorites = L10n.tr("Localizable", "yourFavorites")
}
// swiftlint:enable explicit_type_interface function_parameter_count identifier_name line_length
// swiftlint:enable nesting type_body_length type_name vertical_whitespace_opening_braces
// MARK: - Implementation Details
extension L10n {
private static func tr(_ table: String, _ key: String, _ args: CVarArg...) -> String {
let format = BundleToken.bundle.localizedString(forKey: key, value: nil, table: table)
return String(format: format, locale: Locale.current, arguments: args)
}
private static func tr(_ table: String, _ key: String, _ args: CVarArg...) -> String {
let format = BundleToken.bundle.localizedString(forKey: key, value: nil, table: table)
return String(format: format, locale: Locale.current, arguments: args)
}
}
// swiftlint:disable convenience_type
private final class BundleToken {
static let bundle: Bundle = {
#if SWIFT_PACKAGE
return Bundle.module
#else
return Bundle(for: BundleToken.self)
#endif
}()
static let bundle: Bundle = {
#if SWIFT_PACKAGE
return Bundle.module
#else
return Bundle(for: BundleToken.self)
#endif
}()
}
// swiftlint:enable convenience_type

View File

@ -16,9 +16,9 @@ enum OverlayType: String, CaseIterable, Defaults.Serializable {
var label: String {
switch self {
case .normal:
return L10n.normal
return L10n.normal
case .compact:
return L10n.compact
return L10n.compact
}
}
}

View File

@ -22,15 +22,15 @@ extension SubtitleSize {
var label: String {
switch self {
case .smallest:
return L10n.smallest
return L10n.smallest
case .smaller:
return L10n.smaller
return L10n.smaller
case .regular:
return L10n.regular
return L10n.regular
case .larger:
return L10n.larger
return L10n.larger
case .largest:
return L10n.largest
return L10n.largest
}
}
}

View File

@ -16,7 +16,7 @@ enum VideoPlayerJumpLength: Int32, CaseIterable, Defaults.Serializable {
case five = 5
var label: String {
L10n.jumpLengthSeconds("\(self.rawValue)")
L10n.jumpLengthSeconds("\(self.rawValue)")
}
var shortLabel: String {

View File

@ -198,18 +198,18 @@ extension SwiftfinStore.Errors: LocalizedError {
var title: String {
switch self {
case .existingServer:
return L10n.existingServer
return L10n.existingServer
case .existingUser:
return L10n.existingUser
return L10n.existingUser
}
}
var errorDescription: String? {
switch self {
case let .existingServer(server):
return L10n.serverAlreadyConnected(server.name)
return L10n.serverAlreadyConnected(server.name)
case let .existingUser(user):
return L10n.userAlreadySignedIn(user.username)
return L10n.userAlreadySignedIn(user.username)
}
}
}

View File

@ -40,7 +40,7 @@ final class ConnectToServerViewModel: ViewModel {
if errorMessage?.code != ErrorMessage.noShowErrorCode {
message.append(contentsOf: "\(errorMessage?.code ?? ErrorMessage.noShowErrorCode)\n")
}
message.append(contentsOf: "\(errorMessage?.title ?? L10n.unknownError)")
message.append(contentsOf: "\(errorMessage?.title ?? L10n.unknownError)")
return message
}
@ -70,12 +70,12 @@ final class ConnectToServerViewModel: ViewModel {
self.addServerURIPayload = AddServerURIPayload(server: server, uri: uri)
self.backAddServerURIPayload = AddServerURIPayload(server: server, uri: uri)
default:
self.handleAPIRequestError(displayMessage: L10n.unableToConnectServer, logLevel: .critical,
self.handleAPIRequestError(displayMessage: L10n.unableToConnectServer, logLevel: .critical,
tag: "connectToServer",
completion: completion)
}
default:
self.handleAPIRequestError(displayMessage: L10n.unableToConnectServer, logLevel: .critical,
self.handleAPIRequestError(displayMessage: L10n.unableToConnectServer, logLevel: .critical,
tag: "connectToServer",
completion: completion)
}
@ -106,12 +106,12 @@ final class ConnectToServerViewModel: ViewModel {
func addURIToServer(addServerURIPayload: AddServerURIPayload) {
SessionManager.main.addURIToServer(server: addServerURIPayload.server, uri: addServerURIPayload.uri)
.sink { completion in
self.handleAPIRequestError(displayMessage: L10n.unableToConnectServer, logLevel: .critical, tag: "connectToServer",
self.handleAPIRequestError(displayMessage: L10n.unableToConnectServer, logLevel: .critical, tag: "connectToServer",
completion: completion)
} receiveValue: { server in
SessionManager.main.setServerCurrentURI(server: server, uri: addServerURIPayload.uri)
.sink { completion in
self.handleAPIRequestError(displayMessage: L10n.unableToConnectServer, logLevel: .critical,
self.handleAPIRequestError(displayMessage: L10n.unableToConnectServer, logLevel: .critical,
tag: "connectToServer",
completion: completion)
} receiveValue: { _ in

View File

@ -64,7 +64,7 @@ final class SeriesItemViewModel: ItemViewModel {
endYear = dateFormatter.string(from: item.endDate!)
}
return "\(startYear ?? L10n.unknown) - \(endYear ?? L10n.present)"
return "\(startYear ?? L10n.unknown) - \(endYear ?? L10n.present)"
}
private func requestSeasons() {

View File

@ -30,9 +30,9 @@ class ServerListViewModel: ObservableObject {
func userTextFor(server: SwiftfinStore.State.Server) -> String {
if server.userIDs.count == 1 {
return L10n.oneUser
return L10n.oneUser
} else {
return L10n.multipleUsers(server.userIDs.count)
return L10n.multipleUsers(server.userIDs.count)
}
}

View File

@ -36,7 +36,7 @@ final class UserSignInViewModel: ViewModel {
SessionManager.main.loginUser(server: server, username: username, password: password)
.trackActivity(loading)
.sink { completion in
self.handleAPIRequestError(displayMessage: L10n.unableToConnectServer, logLevel: .critical, tag: "login",
self.handleAPIRequestError(displayMessage: L10n.unableToConnectServer, logLevel: .critical, tag: "login",
completion: completion)
} receiveValue: { _ in
}

View File

@ -36,7 +36,7 @@ struct LiveTVChannelItemElement: View {
.font(.footnote)
.lineLimit(1)
.frame(alignment: .center)
Text(program?.name ?? L10n.notAvailableSlash)
Text(program?.name ?? L10n.notAvailableSlash)
.font(.body)
.lineLimit(1)
.foregroundColor(.green)

View File

@ -19,7 +19,7 @@ struct EpisodesRowView: View {
var body: some View {
VStack(alignment: .leading) {
Text(viewModel.selectedSeason?.name ?? L10n.episodes)
Text(viewModel.selectedSeason?.name ?? L10n.episodes)
.font(.title3)
.padding(.horizontal, 50)
@ -67,7 +67,7 @@ struct EpisodesRowView: View {
Text("--")
.font(.caption)
.foregroundColor(.secondary)
L10n.noEpisodesAvailable.text
L10n.noEpisodesAvailable.text
.font(.footnote)
.padding(.bottom, 1)
}

View File

@ -39,7 +39,7 @@ struct CinematicNextUpCardView: View {
if showOverlay {
VStack(alignment: .leading, spacing: 0) {
L10n.next.text
L10n.next.text
.font(.subheadline)
.padding(.vertical, 5)
.padding(.leading, 10)

View File

@ -24,7 +24,7 @@ struct ItemDetailsView: View {
HStack(alignment: .top) {
VStack(alignment: .leading, spacing: 20) {
L10n.information.text
L10n.information.text
.font(.title3)
.padding(.bottom, 5)
@ -36,7 +36,7 @@ struct ItemDetailsView: View {
Spacer()
VStack(alignment: .leading, spacing: 20) {
L10n.media.text
L10n.media.text
.font(.title3)
.padding(.bottom, 5)

View File

@ -19,7 +19,7 @@ struct SingleSeasonEpisodesRowView: View {
var body: some View {
VStack(alignment: .leading) {
L10n.episodes.text
L10n.episodes.text
.font(.title3)
.padding(.horizontal, 50)
@ -66,7 +66,7 @@ struct SingleSeasonEpisodesRowView: View {
Text("--")
.font(.caption)
.foregroundColor(.secondary)
L10n.noEpisodesAvailable.text
L10n.noEpisodesAvailable.text
.font(.footnote)
.padding(.bottom, 1)
}

View File

@ -48,6 +48,6 @@ struct BasicAppSettingsView: View {
L10n.reset.text
}
})
.navigationTitle(L10n.settings)
.navigationTitle(L10n.settings)
}
}

View File

@ -46,7 +46,7 @@ struct ConnectToServerView: View {
}
.disabled(viewModel.isLoading || uri.isEmpty)
} header: {
L10n.connectToJellyfinServer.text
L10n.connectToJellyfinServer.text
}
Section(header: L10n.localServers.text) {
@ -77,7 +77,7 @@ struct ConnectToServerView: View {
}
.alert(item: $viewModel.errorMessage) { _ in
Alert(title: Text(viewModel.alertTitle),
message: Text(viewModel.errorMessage?.displayMessage ?? L10n.unknownError),
message: Text(viewModel.errorMessage?.displayMessage ?? L10n.unknownError),
dismissButton: .cancel())
}
.navigationTitle(L10n.connect)

View File

@ -33,7 +33,7 @@ struct HomeView: View {
if viewModel.resumeItems.isEmpty {
HomeCinematicView(items: viewModel.latestAddedItems.map { .init(item: $0, type: .plain) },
forcedItemSubtitle: L10n.recentlyAdded)
forcedItemSubtitle: L10n.recentlyAdded)
if !viewModel.nextUpItems.isEmpty {
NextUpView(items: viewModel.nextUpItems)
@ -47,7 +47,7 @@ struct HomeView: View {
.focusSection()
}
PortraitItemsRowView(rowTitle: L10n.recentlyAdded,
PortraitItemsRowView(rowTitle: L10n.recentlyAdded,
items: viewModel.latestAddedItems,
showItemTitles: showPosterLabels) { item in
homeRouter.route(to: \.modalItem, item)
@ -67,7 +67,7 @@ struct HomeView: View {
Button {
viewModel.refresh()
} label: {
L10n.refresh.text
L10n.refresh.text
}
Spacer()

View File

@ -46,13 +46,13 @@ struct CinematicCollectionItemView: View {
CinematicItemAboutView(viewModel: viewModel)
PortraitItemsRowView(rowTitle: L10n.items,
PortraitItemsRowView(rowTitle: L10n.items,
items: viewModel.collectionItems) { item in
itemRouter.route(to: \.item, item)
}
if !viewModel.similarItems.isEmpty {
PortraitItemsRowView(rowTitle: L10n.recommended,
PortraitItemsRowView(rowTitle: L10n.recommended,
items: viewModel.similarItems,
showItemTitles: showPosterLabels) { item in
itemRouter.route(to: \.item, item)

View File

@ -60,14 +60,14 @@ struct CinematicEpisodeItemView: View {
.focusSection()
if let seriesItem = viewModel.series {
PortraitItemsRowView(rowTitle: L10n.series,
PortraitItemsRowView(rowTitle: L10n.series,
items: [seriesItem]) { seriesItem in
itemRouter.route(to: \.item, seriesItem)
}
}
if !viewModel.similarItems.isEmpty {
PortraitItemsRowView(rowTitle: L10n.recommended,
PortraitItemsRowView(rowTitle: L10n.recommended,
items: viewModel.similarItems,
showItemTitles: showPosterLabels) { item in
itemRouter.route(to: \.item, item)

View File

@ -26,10 +26,10 @@ struct CinematicItemAboutView: View {
.frame(height: 385.5)
VStack(alignment: .leading) {
L10n.about.text
L10n.about.text
.font(.title3)
Text(viewModel.item.overview ?? L10n.noOverviewAvailable)
Text(viewModel.item.overview ?? L10n.noOverviewAvailable)
.padding(.top, 2)
.lineLimit(7)
}

View File

@ -47,7 +47,7 @@ struct CinematicMovieItemView: View {
CinematicItemAboutView(viewModel: viewModel)
if !viewModel.similarItems.isEmpty {
PortraitItemsRowView(rowTitle: L10n.recommended,
PortraitItemsRowView(rowTitle: L10n.recommended,
items: viewModel.similarItems,
showItemTitles: showPosterLabels) { item in
itemRouter.route(to: \.item, item)

View File

@ -56,14 +56,14 @@ struct CinematicSeasonItemView: View {
SingleSeasonEpisodesRowView(viewModel: SingleSeasonEpisodesRowViewModel(seasonItemViewModel: viewModel))
if let seriesItem = viewModel.seriesItem {
PortraitItemsRowView(rowTitle: L10n.series,
PortraitItemsRowView(rowTitle: L10n.series,
items: [seriesItem]) { seriesItem in
itemRouter.route(to: \.item, seriesItem)
}
}
if !viewModel.similarItems.isEmpty {
PortraitItemsRowView(rowTitle: L10n.recommended,
PortraitItemsRowView(rowTitle: L10n.recommended,
items: viewModel.similarItems,
showItemTitles: showPosterLabels) { item in
itemRouter.route(to: \.item, item)

View File

@ -45,14 +45,14 @@ struct CinematicSeriesItemView: View {
CinematicItemAboutView(viewModel: viewModel)
PortraitItemsRowView(rowTitle: L10n.seasons,
PortraitItemsRowView(rowTitle: L10n.seasons,
items: viewModel.seasons,
showItemTitles: showPosterLabels) { season in
itemRouter.route(to: \.item, season)
}
if !viewModel.similarItems.isEmpty {
PortraitItemsRowView(rowTitle: L10n.recommended,
PortraitItemsRowView(rowTitle: L10n.recommended,
items: viewModel.similarItems,
showItemTitles: showPosterLabels) { item in
itemRouter.route(to: \.item, item)

View File

@ -42,7 +42,7 @@ struct LibrarySearchView: View {
.onChange(of: searchQuery) { query in
viewModel.searchQuerySubject.send(query)
}
.navigationBarTitle(L10n.search)
.navigationBarTitle(L10n.search)
}
var suggestionsListView: some View {

View File

@ -85,7 +85,7 @@ struct LibraryView: View {
VStack {
L10n.noResults.text
Button {} label: {
L10n.refresh.text
L10n.refresh.text
}
}
}

View File

@ -73,7 +73,7 @@ struct MovieLibrariesView: View {
Button {
print("movieLibraries reload")
} label: {
L10n.refresh.text
L10n.refresh.text
}
}
}

View File

@ -15,9 +15,9 @@ struct ServerDetailView: View {
var body: some View {
Form {
Section(header: L10n.serverDetails.text) {
Section(header: L10n.serverDetails.text) {
HStack {
L10n.name.text
L10n.name.text
Spacer()
Text(SessionManager.main.currentLogin.server.name)
.foregroundColor(.secondary)
@ -25,21 +25,21 @@ struct ServerDetailView: View {
.focusable()
HStack {
L10n.url.text
L10n.url.text
Spacer()
Text(SessionManager.main.currentLogin.server.currentURI)
.foregroundColor(.secondary)
}
HStack {
L10n.version.text
L10n.version.text
Spacer()
Text(SessionManager.main.currentLogin.server.version)
.foregroundColor(.secondary)
}
HStack {
L10n.operatingSystem.text
L10n.operatingSystem.text
Spacer()
Text(SessionManager.main.currentLogin.server.os)
.foregroundColor(.secondary)

View File

@ -52,7 +52,7 @@ struct ServerListView: View {
Button(role: .destructive) {
viewModel.remove(server: server)
} label: {
Label(L10n.remove, systemImage: "trash")
Label(L10n.remove, systemImage: "trash")
}
}
}
@ -65,7 +65,7 @@ struct ServerListView: View {
@ViewBuilder
private var noServerView: some View {
VStack {
L10n.connectToJellyfinServerStart.text
L10n.connectToJellyfinServerStart.text
.frame(minWidth: 50, maxWidth: 500)
.multilineTextAlignment(.center)
.font(.body)
@ -109,7 +109,7 @@ struct ServerListView: View {
Button {
serverListRouter.route(to: \.basicAppSettings)
} label: {
L10n.settings.text
L10n.settings.text
}
}
}
@ -117,7 +117,7 @@ struct ServerListView: View {
var body: some View {
innerBody
.navigationTitle(L10n.servers)
.navigationTitle(L10n.servers)
.toolbar {
ToolbarItemGroup(placement: .navigationBarTrailing) {
trailingToolbarContent

View File

@ -25,7 +25,7 @@ struct ExperimentalSettingsView: View {
Toggle("Live TV (Alpha)", isOn: $liveTVAlphaEnabled)
} header: {
L10n.experimental.text
L10n.experimental.text
}
}
}

View File

@ -20,28 +20,28 @@ struct OverlaySettingsView: View {
var body: some View {
Form {
Section(header: L10n.overlay.text) {
Section(header: L10n.overlay.text) {
Toggle(isOn: $shouldShowPlayPreviousItem) {
HStack {
Image(systemName: "chevron.left.circle")
L10n.playPreviousItem.text
}
}
Toggle(isOn: $shouldShowPlayNextItem) {
HStack {
Image(systemName: "chevron.right.circle")
L10n.playNextItem.text
}
}
Toggle(isOn: $shouldShowAutoPlay) {
HStack {
Image(systemName: "play.circle.fill")
L10n.autoPlay.text
}
}
Toggle(isOn: $shouldShowPlayPreviousItem) {
HStack {
Image(systemName: "chevron.left.circle")
L10n.playPreviousItem.text
}
}
Toggle(isOn: $shouldShowPlayNextItem) {
HStack {
Image(systemName: "chevron.right.circle")
L10n.playNextItem.text
}
}
Toggle(isOn: $shouldShowAutoPlay) {
HStack {
Image(systemName: "play.circle.fill")
L10n.autoPlay.text
}
}
}
}
}

View File

@ -51,7 +51,7 @@ struct SettingsView: View {
Button {} label: {
HStack {
L10n.user.text
L10n.user.text
Spacer()
Text(viewModel.user.username)
.foregroundColor(.jellyfinPurple)
@ -62,7 +62,7 @@ struct SettingsView: View {
settingsRouter.route(to: \.serverDetail)
} label: {
HStack {
L10n.server.text
L10n.server.text
.foregroundColor(.primary)
Spacer()
Text(viewModel.server.name)
@ -76,36 +76,36 @@ struct SettingsView: View {
Button {
SessionManager.main.logout()
} label: {
L10n.switchUser.text
L10n.switchUser.text
.foregroundColor(Color.jellyfinPurple)
.font(.callout)
}
}
Section(header: L10n.videoPlayer.text) {
Picker(L10n.jumpForwardLength, selection: $jumpForwardLength) {
Section(header: L10n.videoPlayer.text) {
Picker(L10n.jumpForwardLength, selection: $jumpForwardLength) {
ForEach(VideoPlayerJumpLength.allCases, id: \.self) { length in
Text(length.label).tag(length.rawValue)
}
}
Picker(L10n.jumpBackwardLength, selection: $jumpBackwardLength) {
Picker(L10n.jumpBackwardLength, selection: $jumpBackwardLength) {
ForEach(VideoPlayerJumpLength.allCases, id: \.self) { length in
Text(length.label).tag(length.rawValue)
}
}
Toggle(L10n.resume5SecondOffset, isOn: $resumeOffset)
Toggle(L10n.resume5SecondOffset, isOn: $resumeOffset)
Toggle(L10n.pressDownForMenu, isOn: $downActionShowsMenu)
Toggle(L10n.pressDownForMenu, isOn: $downActionShowsMenu)
Toggle(L10n.confirmClose, isOn: $confirmClose)
Toggle(L10n.confirmClose, isOn: $confirmClose)
Button {
settingsRouter.route(to: \.overlaySettings)
} label: {
HStack {
L10n.overlay.text
L10n.overlay.text
.foregroundColor(.primary)
Spacer()
Image(systemName: "chevron.right")
@ -116,7 +116,7 @@ struct SettingsView: View {
settingsRouter.route(to: \.experimentalSettings)
} label: {
HStack {
L10n.experimental.text
L10n.experimental.text
.foregroundColor(.primary)
Spacer()
Image(systemName: "chevron.right")
@ -125,15 +125,15 @@ struct SettingsView: View {
}
Section {
Toggle(L10n.cinematicViews, isOn: $tvOSCinematicViews)
Toggle(L10n.cinematicViews, isOn: $tvOSCinematicViews)
} header: {
L10n.appearance.text
L10n.appearance.text
}
Section(header: L10n.accessibility.text) {
Toggle(L10n.showPosterLabels, isOn: $showPosterLabels)
Toggle(L10n.showPosterLabels, isOn: $showPosterLabels)
Picker(L10n.subtitleSize, selection: $subtitleSize) {
Picker(L10n.subtitleSize, selection: $subtitleSize) {
ForEach(SubtitleSize.allCases, id: \.self) { size in
Text(size.label).tag(size.rawValue)
}

View File

@ -73,7 +73,7 @@ struct TVLibrariesView: View {
Button {
print("tvLibraries reload")
} label: {
L10n.refresh.text
L10n.refresh.text
}
}
}

View File

@ -39,7 +39,7 @@ struct UserListView: View {
Button(role: .destructive) {
viewModel.remove(user: user)
} label: {
Label(L10n.remove, systemImage: "trash")
Label(L10n.remove, systemImage: "trash")
}
}
}
@ -52,7 +52,7 @@ struct UserListView: View {
@ViewBuilder
private var noUserView: some View {
VStack {
L10n.signInGetStarted.text
L10n.signInGetStarted.text
.frame(minWidth: 50, maxWidth: 500)
.multilineTextAlignment(.center)
.font(.callout)
@ -60,7 +60,7 @@ struct UserListView: View {
Button {
userListRouter.route(to: \.userSignIn, viewModel.server)
} label: {
L10n.signIn.text
L10n.signIn.text
.bold()
.font(.callout)
}

View File

@ -44,14 +44,14 @@ struct UserSignInView: View {
.disabled(viewModel.isLoading || username.isEmpty)
} header: {
L10n.signInToServer(viewModel.server.name).text
L10n.signInToServer(viewModel.server.name).text
}
}
.alert(item: $viewModel.errorMessage) { _ in
Alert(title: Text(viewModel.alertTitle),
message: Text(viewModel.errorMessage?.displayMessage ?? L10n.unknownError),
message: Text(viewModel.errorMessage?.displayMessage ?? L10n.unknownError),
dismissButton: .cancel())
}
.navigationTitle(L10n.signIn)
.navigationTitle(L10n.signIn)
}
}

View File

@ -74,7 +74,7 @@ struct SmallMediaStreamSelectionView: View {
if updateFocusedLayer == .subtitles {
HStack(spacing: 15) {
Image(systemName: "captions.bubble")
L10n.subtitles.text
L10n.subtitles.text
}
.padding()
.background(Color.white)
@ -82,7 +82,7 @@ struct SmallMediaStreamSelectionView: View {
} else {
HStack(spacing: 15) {
Image(systemName: "captions.bubble")
L10n.subtitles.text
L10n.subtitles.text
}
.padding()
}
@ -106,7 +106,7 @@ struct SmallMediaStreamSelectionView: View {
if updateFocusedLayer == .audio {
HStack(spacing: 15) {
Image(systemName: "speaker.wave.3")
L10n.audio.text
L10n.audio.text
}
.padding()
.background(Color.white)
@ -114,7 +114,7 @@ struct SmallMediaStreamSelectionView: View {
} else {
HStack(spacing: 15) {
Image(systemName: "speaker.wave.3")
L10n.audio.text
L10n.audio.text
}
.padding()
}
@ -138,7 +138,7 @@ struct SmallMediaStreamSelectionView: View {
if updateFocusedLayer == .playbackSpeed {
HStack(spacing: 15) {
Image(systemName: "speedometer")
L10n.playbackSpeed.text
L10n.playbackSpeed.text
}
.padding()
.background(Color.white)
@ -146,7 +146,7 @@ struct SmallMediaStreamSelectionView: View {
} else {
HStack(spacing: 15) {
Image(systemName: "speedometer")
L10n.playbackSpeed.text
L10n.playbackSpeed.text
}
.padding()
}
@ -185,7 +185,7 @@ struct SmallMediaStreamSelectionView: View {
HStack {
if viewModel.subtitleStreams.isEmpty {
Button {} label: {
L10n.none.text
L10n.none.text
}
} else {
ForEach(viewModel.subtitleStreams, id: \.self) { subtitleStream in
@ -193,9 +193,9 @@ struct SmallMediaStreamSelectionView: View {
viewModel.selectedSubtitleStreamIndex = subtitleStream.index ?? -1
} label: {
if subtitleStream.index == viewModel.selectedSubtitleStreamIndex {
Label(subtitleStream.displayTitle ?? L10n.noTitle, systemImage: "checkmark")
Label(subtitleStream.displayTitle ?? L10n.noTitle, systemImage: "checkmark")
} else {
Text(subtitleStream.displayTitle ?? L10n.noTitle)
Text(subtitleStream.displayTitle ?? L10n.noTitle)
}
}
}
@ -220,9 +220,9 @@ struct SmallMediaStreamSelectionView: View {
viewModel.selectedAudioStreamIndex = audioStream.index ?? -1
} label: {
if audioStream.index == viewModel.selectedAudioStreamIndex {
Label(audioStream.displayTitle ?? L10n.noTitle, systemImage: "checkmark")
Label(audioStream.displayTitle ?? L10n.noTitle, systemImage: "checkmark")
} else {
Text(audioStream.displayTitle ?? L10n.noTitle)
Text(audioStream.displayTitle ?? L10n.noTitle)
}
}
}

View File

@ -26,15 +26,15 @@ struct EpisodesRowView: View {
viewModel.selectedSeason = season
} label: {
if season.id == viewModel.selectedSeason?.id {
Label(season.name ?? L10n.season, systemImage: "checkmark")
Label(season.name ?? L10n.season, systemImage: "checkmark")
} else {
Text(season.name ?? L10n.season)
Text(season.name ?? L10n.season)
}
}
}
} label: {
HStack(spacing: 5) {
Text(viewModel.selectedSeason?.name ?? L10n.unknown)
Text(viewModel.selectedSeason?.name ?? L10n.unknown)
.fontWeight(.semibold)
.fixedSize()
Image(systemName: "chevron.down")
@ -85,8 +85,8 @@ struct EpisodesRowView: View {
Text("--")
.font(.footnote)
.foregroundColor(.secondary)
L10n.noEpisodesAvailable.text
L10n.noEpisodesAvailable.text
.font(.body)
.padding(.bottom, 1)
.lineLimit(2)

View File

@ -23,7 +23,7 @@ struct TruncatedTextView: View {
if !truncated {
return ""
} else {
return L10n.seeMore
return L10n.seeMore
}
}

View File

@ -41,55 +41,55 @@ struct BasicAppSettingsView: View {
}
Section {
Picker(L10n.defaultScheme, selection: $defaultHTTPScheme) {
Picker(L10n.defaultScheme, selection: $defaultHTTPScheme) {
ForEach(HTTPScheme.allCases, id: \.self) { scheme in
Text("\(scheme.rawValue)")
}
}
} header: {
L10n.networking.text
L10n.networking.text
}
Button {
resetUserSettingsTapped = true
} label: {
L10n.resetUserSettings.text
L10n.resetUserSettings.text
}
Button {
resetAppSettingsTapped = true
} label: {
L10n.resetAppSettings.text
L10n.resetAppSettings.text
}
Button {
removeAllUsersTapped = true
} label: {
L10n.removeAllUsers.text
L10n.removeAllUsers.text
}
}
.alert(L10n.resetUserSettings, isPresented: $resetUserSettingsTapped, actions: {
.alert(L10n.resetUserSettings, isPresented: $resetUserSettingsTapped, actions: {
Button(role: .destructive) {
viewModel.resetUserSettings()
} label: {
L10n.reset.text
}
})
.alert(L10n.resetAppSettings, isPresented: $resetAppSettingsTapped, actions: {
.alert(L10n.resetAppSettings, isPresented: $resetAppSettingsTapped, actions: {
Button(role: .destructive) {
viewModel.resetAppSettings()
} label: {
L10n.reset.text
}
})
.alert(L10n.removeAllUsers, isPresented: $removeAllUsersTapped, actions: {
.alert(L10n.removeAllUsers, isPresented: $removeAllUsersTapped, actions: {
Button(role: .destructive) {
viewModel.removeAllUsers()
} label: {
L10n.reset.text
}
})
.navigationBarTitle(L10n.settings, displayMode: .inline)
.navigationBarTitle(L10n.settings, displayMode: .inline)
.toolbar {
ToolbarItemGroup(placement: .navigationBarLeading) {
Button {

View File

@ -37,7 +37,7 @@ struct ConnectToServerView: View {
Button(role: .destructive) {
viewModel.cancelConnection()
} label: {
L10n.cancel.text
L10n.cancel.text
}
} else {
Button {
@ -48,14 +48,14 @@ struct ConnectToServerView: View {
.disabled(uri.isEmpty)
}
} header: {
L10n.connectToJellyfinServer.text
L10n.connectToJellyfinServer.text
}
Section {
if viewModel.searching {
HStack(alignment: .center, spacing: 5) {
Spacer()
L10n.searchingDots.text
L10n.searchingDots.text
.foregroundColor(.secondary)
Spacer()
}
@ -63,7 +63,7 @@ struct ConnectToServerView: View {
if viewModel.discoveredServers.isEmpty {
HStack(alignment: .center) {
Spacer()
L10n.noLocalServersFound.text
L10n.noLocalServersFound.text
.font(.callout)
.foregroundColor(.secondary)
Spacer()
@ -103,7 +103,7 @@ struct ConnectToServerView: View {
}
.alert(item: $viewModel.errorMessage) { _ in
Alert(title: Text(viewModel.alertTitle),
message: Text(viewModel.errorMessage?.displayMessage ?? L10n.unknownError),
message: Text(viewModel.errorMessage?.displayMessage ?? L10n.unknownError),
dismissButton: .cancel())
}
.alert(item: $viewModel.addServerURIPayload) { _ in

View File

@ -43,7 +43,7 @@ struct ContinueWatchingView: View {
.frame(height: 35)
VStack(alignment: .leading, spacing: 0) {
Text(item.getItemProgressString() ?? L10n.continue)
Text(item.getItemProgressString() ?? L10n.continue)
.font(.subheadline)
.padding(.bottom, 5)
.padding(.leading, 10)

View File

@ -39,7 +39,7 @@ struct HomeView: View {
.frame(minWidth: 50, maxWidth: 240)
.multilineTextAlignment(.center)
PrimaryButtonView(title: L10n.retry) {
PrimaryButtonView(title: L10n.retry) {
viewModel.refresh()
}
}
@ -69,7 +69,7 @@ struct HomeView: View {
if !viewModel.latestAddedItems.isEmpty {
PortraitImageHStackView(items: viewModel.latestAddedItems) {
L10n.recentlyAdded.text
L10n.recentlyAdded.text
.font(.title2)
.fontWeight(.bold)
.padding()

View File

@ -21,7 +21,7 @@ struct ItemOverviewView: View {
.font(.footnote)
.padding()
}
.navigationBarTitle(L10n.overview, displayMode: .inline)
.navigationBarTitle(L10n.overview, displayMode: .inline)
.toolbar {
ToolbarItemGroup(placement: .navigationBarLeading) {
Button {

View File

@ -42,7 +42,7 @@ struct ItemViewBody: View {
.padding()
}
} else {
L10n.noOverviewAvailable.text
L10n.noOverviewAvailable.text
.font(.footnote)
.padding()
}
@ -92,7 +92,7 @@ struct ItemViewBody: View {
if let seriesItem = episodeViewModel.series {
let a = [seriesItem]
PortraitImageHStackView(items: a) {
L10n.series.text
L10n.series.text
.fontWeight(.semibold)
.padding(.bottom)
.padding(.horizontal)
@ -106,7 +106,7 @@ struct ItemViewBody: View {
if let collectionViewModel = viewModel as? CollectionItemViewModel {
PortraitImageHStackView(items: collectionViewModel.collectionItems) {
L10n.items.text
L10n.items.text
.fontWeight(.semibold)
.padding(.bottom)
.padding(.horizontal)
@ -121,7 +121,7 @@ struct ItemViewBody: View {
if let castAndCrew = viewModel.item.people {
PortraitImageHStackView(items: castAndCrew.filter { BaseItemPerson.DisplayedType.allCasesRaw.contains($0.type ?? "") },
topBarView: {
L10n.castAndCrew.text
L10n.castAndCrew.text
.fontWeight(.semibold)
.padding(.bottom)
.padding(.horizontal)

View File

@ -19,7 +19,7 @@ struct ItemViewDetailsView: View {
if !viewModel.informationItems.isEmpty {
VStack(alignment: .leading, spacing: 20) {
L10n.information.text
L10n.information.text
.font(.title3)
.fontWeight(.bold)
@ -38,7 +38,7 @@ struct ItemViewDetailsView: View {
if !viewModel.mediaItems.isEmpty {
VStack(alignment: .leading, spacing: 20) {
L10n.media.text
L10n.media.text
.font(.title3)
.fontWeight(.bold)

View File

@ -21,7 +21,7 @@ struct LibraryListView: View {
LazyVStack {
Button {
libraryListRouter.route(to: \.library,
(viewModel: LibraryViewModel(filters: viewModel.withFavorites), title: L10n.favorites))
(viewModel: LibraryViewModel(filters: viewModel.withFavorites), title: L10n.favorites))
} label: {
ZStack {
HStack {

View File

@ -45,7 +45,7 @@ struct LibrarySearchView: View {
.onChange(of: searchQuery) { query in
viewModel.searchQuerySubject.send(query)
}
.navigationBarTitle(L10n.search, displayMode: .inline)
.navigationBarTitle(L10n.search, displayMode: .inline)
}
var suggestionsListView: some View {

View File

@ -22,15 +22,15 @@ struct ServerDetailView: View {
var body: some View {
Form {
Section(header: L10n.serverDetails.text) {
Section(header: L10n.serverDetails.text) {
HStack {
L10n.name.text
L10n.name.text
Spacer()
Text(viewModel.server.name)
.foregroundColor(.secondary)
}
Picker(L10n.url, selection: $currentServerURI) {
Picker(L10n.url, selection: $currentServerURI) {
ForEach(viewModel.server.uris.sorted(), id: \.self) { uri in
Text(uri).tag(uri)
.foregroundColor(.secondary)
@ -40,14 +40,14 @@ struct ServerDetailView: View {
}
HStack {
L10n.version.text
L10n.version.text
Spacer()
Text(viewModel.server.version)
.foregroundColor(.secondary)
}
HStack {
L10n.operatingSystem.text
L10n.operatingSystem.text
Spacer()
Text(viewModel.server.os)
.foregroundColor(.secondary)

View File

@ -56,7 +56,7 @@ struct ServerListView: View {
Button(role: .destructive) {
viewModel.remove(server: server)
} label: {
Label(L10n.remove, systemImage: "trash")
Label(L10n.remove, systemImage: "trash")
}
}
}
@ -66,7 +66,7 @@ struct ServerListView: View {
private var noServerView: some View {
VStack {
L10n.connectToJellyfinServerStart.text
L10n.connectToJellyfinServerStart.text
.frame(minWidth: 50, maxWidth: 240)
.multilineTextAlignment(.center)
@ -109,7 +109,7 @@ struct ServerListView: View {
var body: some View {
innerBody
.navigationTitle(L10n.servers)
.navigationTitle(L10n.servers)
.toolbar {
ToolbarItemGroup(placement: .navigationBarTrailing) {
trailingToolbarContent

View File

@ -21,7 +21,7 @@ struct ExperimentalSettingsView: View {
Toggle("Sync Subtitles with Adjacent Episodes", isOn: $syncSubtitleStateWithAdjacent)
} header: {
L10n.experimental.text
L10n.experimental.text
}
}
}

View File

@ -24,35 +24,35 @@ struct OverlaySettingsView: View {
var body: some View {
Form {
Section(header: L10n.overlay.text) {
Picker(L10n.overlayType, selection: $overlayType) {
Section(header: L10n.overlay.text) {
Picker(L10n.overlayType, selection: $overlayType) {
ForEach(OverlayType.allCases, id: \.self) { overlay in
Text(overlay.label).tag(overlay)
}
}
Toggle(isOn: $shouldShowPlayPreviousItem) {
HStack {
Image(systemName: "chevron.left.circle")
L10n.playPreviousItem.text
}
}
Toggle(isOn: $shouldShowPlayNextItem) {
HStack {
Image(systemName: "chevron.right.circle")
L10n.playNextItem.text
}
}
Toggle(isOn: $shouldShowAutoPlay) {
HStack {
Image(systemName: "play.circle.fill")
L10n.autoPlay.text
}
}
Toggle(L10n.editJumpLengths, isOn: $shouldShowJumpButtonsInOverlayMenu)
Toggle(isOn: $shouldShowPlayPreviousItem) {
HStack {
Image(systemName: "chevron.left.circle")
L10n.playPreviousItem.text
}
}
Toggle(isOn: $shouldShowPlayNextItem) {
HStack {
Image(systemName: "chevron.right.circle")
L10n.playNextItem.text
}
}
Toggle(isOn: $shouldShowAutoPlay) {
HStack {
Image(systemName: "play.circle.fill")
L10n.autoPlay.text
}
}
Toggle(L10n.editJumpLengths, isOn: $shouldShowJumpButtonsInOverlayMenu)
}
}
}

View File

@ -51,7 +51,7 @@ struct SettingsView: View {
Form {
Section(header: EmptyView()) {
HStack {
L10n.user.text
L10n.user.text
Spacer()
Text(viewModel.user.username)
.foregroundColor(.jellyfinPurple)
@ -61,7 +61,7 @@ struct SettingsView: View {
settingsRouter.route(to: \.serverDetail)
} label: {
HStack {
L10n.server.text
L10n.server.text
.foregroundColor(.primary)
Spacer()
Text(viewModel.server.name)
@ -76,7 +76,7 @@ struct SettingsView: View {
SessionManager.main.logout()
}
} label: {
L10n.switchUser.text
L10n.switchUser.text
.font(.callout)
}
}
@ -96,28 +96,28 @@ struct SettingsView: View {
// }
// }
Section(header: L10n.videoPlayer.text) {
Picker(L10n.jumpForwardLength, selection: $jumpForwardLength) {
Section(header: L10n.videoPlayer.text) {
Picker(L10n.jumpForwardLength, selection: $jumpForwardLength) {
ForEach(VideoPlayerJumpLength.allCases, id: \.self) { length in
Text(length.label).tag(length.rawValue)
}
}
Picker(L10n.jumpBackwardLength, selection: $jumpBackwardLength) {
Picker(L10n.jumpBackwardLength, selection: $jumpBackwardLength) {
ForEach(VideoPlayerJumpLength.allCases, id: \.self) { length in
Text(length.label).tag(length.rawValue)
}
}
Toggle(L10n.jumpGesturesEnabled, isOn: $jumpGesturesEnabled)
Toggle(L10n.jumpGesturesEnabled, isOn: $jumpGesturesEnabled)
Toggle(L10n.resume5SecondOffset, isOn: $resumeOffset)
Toggle(L10n.resume5SecondOffset, isOn: $resumeOffset)
Button {
settingsRouter.route(to: \.overlaySettings)
} label: {
HStack {
L10n.overlay.text
L10n.overlay.text
.foregroundColor(.primary)
Spacer()
Text(overlayType.label)
@ -129,7 +129,7 @@ struct SettingsView: View {
settingsRouter.route(to: \.experimentalSettings)
} label: {
HStack {
L10n.experimental.text
L10n.experimental.text
.foregroundColor(.primary)
Spacer()
Image(systemName: "chevron.right")
@ -138,22 +138,22 @@ struct SettingsView: View {
}
Section(header: L10n.accessibility.text) {
Toggle(L10n.showPosterLabels, isOn: $showPosterLabels)
Toggle(L10n.showCastAndCrew, isOn: $showCastAndCrew)
Toggle(L10n.showPosterLabels, isOn: $showPosterLabels)
Toggle(L10n.showCastAndCrew, isOn: $showCastAndCrew)
Picker(L10n.appearance, selection: $appAppearance) {
ForEach(AppAppearance.allCases, id: \.self) { appearance in
Text(appearance.localizedName).tag(appearance.rawValue)
}
}
Picker(L10n.subtitleSize, selection: $subtitleSize) {
Picker(L10n.subtitleSize, selection: $subtitleSize) {
ForEach(SubtitleSize.allCases, id: \.self) { size in
Text(size.label).tag(size.rawValue)
}
}
}
}
.navigationBarTitle(L10n.settings, displayMode: .inline)
.navigationBarTitle(L10n.settings, displayMode: .inline)
.toolbar {
ToolbarItemGroup(placement: .navigationBarLeading) {
Button {

View File

@ -45,7 +45,7 @@ struct UserListView: View {
Button(role: .destructive) {
viewModel.remove(user: user)
} label: {
Label(L10n.remove, systemImage: "trash")
Label(L10n.remove, systemImage: "trash")
}
}
}
@ -55,7 +55,7 @@ struct UserListView: View {
private var noUserView: some View {
VStack {
L10n.signInGetStarted.text
L10n.signInGetStarted.text
.frame(minWidth: 50, maxWidth: 240)
.multilineTextAlignment(.center)
@ -71,7 +71,7 @@ struct UserListView: View {
.padding(.horizontal, 30)
.padding([.top, .bottom], 20)
L10n.signIn.text
L10n.signIn.text
.foregroundColor(Color.white)
.bold()
}

View File

@ -34,26 +34,26 @@ struct UserSignInView: View {
Button(role: .destructive) {
viewModel.cancelSignIn()
} label: {
L10n.cancel.text
L10n.cancel.text
}
} else {
Button {
viewModel.login(username: username, password: password)
} label: {
L10n.signIn.text
L10n.signIn.text
}
.disabled(username.isEmpty)
}
} header: {
L10n.signInToServer(viewModel.server.name).text
L10n.signInToServer(viewModel.server.name).text
}
}
.alert(item: $viewModel.errorMessage) { _ in
Alert(title: Text(viewModel.alertTitle),
message: Text(viewModel.errorMessage?.displayMessage ?? L10n.unknownError),
message: Text(viewModel.errorMessage?.displayMessage ?? L10n.unknownError),
dismissButton: .cancel())
}
.navigationTitle(L10n.signIn)
.navigationTitle(L10n.signIn)
.navigationBarBackButtonHidden(viewModel.isLoading)
}
}

View File

@ -142,16 +142,16 @@ struct VLCPlayerOverlayView: View {
viewModel.selectedAudioStreamIndex = audioStream.index ?? -1
} label: {
if audioStream.index == viewModel.selectedAudioStreamIndex {
Label(audioStream.displayTitle ?? L10n.noTitle, systemImage: "checkmark")
Label(audioStream.displayTitle ?? L10n.noTitle, systemImage: "checkmark")
} else {
Text(audioStream.displayTitle ?? L10n.noTitle)
Text(audioStream.displayTitle ?? L10n.noTitle)
}
}
}
} label: {
HStack {
Image(systemName: "speaker.wave.3")
L10n.audio.text
L10n.audio.text
}
}
@ -161,16 +161,16 @@ struct VLCPlayerOverlayView: View {
viewModel.selectedSubtitleStreamIndex = subtitleStream.index ?? -1
} label: {
if subtitleStream.index == viewModel.selectedSubtitleStreamIndex {
Label(subtitleStream.displayTitle ?? L10n.noTitle, systemImage: "checkmark")
Label(subtitleStream.displayTitle ?? L10n.noTitle, systemImage: "checkmark")
} else {
Text(subtitleStream.displayTitle ?? L10n.noTitle)
Text(subtitleStream.displayTitle ?? L10n.noTitle)
}
}
}
} label: {
HStack {
Image(systemName: "captions.bubble")
L10n.subtitles.text
L10n.subtitles.text
}
}
@ -189,7 +189,7 @@ struct VLCPlayerOverlayView: View {
} label: {
HStack {
Image(systemName: "speedometer")
L10n.playbackSpeed.text
L10n.playbackSpeed.text
}
}
@ -209,7 +209,7 @@ struct VLCPlayerOverlayView: View {
} label: {
HStack {
Image(systemName: "goforward")
L10n.jumpForwardLength.text
L10n.jumpForwardLength.text
}
}
@ -228,7 +228,7 @@ struct VLCPlayerOverlayView: View {
} label: {
HStack {
Image(systemName: "gobackward")
L10n.jumpBackwardLength.text
L10n.jumpBackwardLength.text
}
}
}