mirror of
https://github.com/yattee/yattee.git
synced 2024-11-14 01:58:24 +00:00
Localizations fixes
This commit is contained in:
parent
be2af82300
commit
780b7ab130
@ -65,7 +65,7 @@ struct OpenVideosModel {
|
|||||||
|
|
||||||
func openURLsFromClipboard(removeQueueItems: Bool = false, playbackMode: OpenVideosModel.PlaybackMode = .playNow) {
|
func openURLsFromClipboard(removeQueueItems: Bool = false, playbackMode: OpenVideosModel.PlaybackMode = .playNow) {
|
||||||
if urlsFromClipboard.isEmpty {
|
if urlsFromClipboard.isEmpty {
|
||||||
NavigationModel.shared.alert = Alert(title: Text("Could not find any links to open in your clipboard"))
|
NavigationModel.shared.alert = Alert(title: Text("Could not find any links to open in your clipboard".localized()))
|
||||||
if NavigationModel.shared.presentingOpenVideos {
|
if NavigationModel.shared.presentingOpenVideos {
|
||||||
NavigationModel.shared.presentingAlertInOpenVideos = true
|
NavigationModel.shared.presentingAlertInOpenVideos = true
|
||||||
} else {
|
} else {
|
||||||
|
@ -119,9 +119,9 @@ struct FavoriteItemView: View {
|
|||||||
|
|
||||||
private var label: String {
|
private var label: String {
|
||||||
if case let .playlist(id) = item.section {
|
if case let .playlist(id) = item.section {
|
||||||
return playlists.find(id: id)?.title ?? "Playlist"
|
return playlists.find(id: id)?.title ?? "Playlist".localized()
|
||||||
}
|
}
|
||||||
|
|
||||||
return item.section.label
|
return item.section.label.localized()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -182,7 +182,7 @@ struct HomeView: View {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func sectionLabel(_ label: String) -> some View {
|
func sectionLabel(_ label: String) -> some View {
|
||||||
Text(label)
|
Text(label.localized())
|
||||||
#if os(tvOS)
|
#if os(tvOS)
|
||||||
.padding(.horizontal, 40)
|
.padding(.horizontal, 40)
|
||||||
#else
|
#else
|
||||||
|
@ -64,7 +64,7 @@ struct InspectorView: View {
|
|||||||
if let systemName {
|
if let systemName {
|
||||||
Image(systemName: systemName)
|
Image(systemName: systemName)
|
||||||
}
|
}
|
||||||
Text(heading.uppercased())
|
Text(heading.localized().uppercased())
|
||||||
.font(.footnote)
|
.font(.footnote)
|
||||||
}
|
}
|
||||||
.foregroundColor(.secondary)
|
.foregroundColor(.secondary)
|
||||||
@ -72,7 +72,7 @@ struct InspectorView: View {
|
|||||||
|
|
||||||
@ViewBuilder func videoDetailRow(_ detail: String, value: String) -> some View {
|
@ViewBuilder func videoDetailRow(_ detail: String, value: String) -> some View {
|
||||||
HStack {
|
HStack {
|
||||||
Text(detail)
|
Text(detail.localized())
|
||||||
.foregroundColor(.secondary)
|
.foregroundColor(.secondary)
|
||||||
Spacer()
|
Spacer()
|
||||||
let value = Text(value).lineLimit(1)
|
let value = Text(value).lineLimit(1)
|
||||||
|
@ -85,7 +85,7 @@ struct VideoActions: View {
|
|||||||
Image(systemName: systemImage)
|
Image(systemName: systemImage)
|
||||||
.frame(width: 20, height: 20)
|
.frame(width: 20, height: 20)
|
||||||
if playerActionsButtonLabelStyle.text {
|
if playerActionsButtonLabelStyle.text {
|
||||||
Text(name)
|
Text(name.localized())
|
||||||
.foregroundColor(.secondary)
|
.foregroundColor(.secondary)
|
||||||
.font(.caption2)
|
.font(.caption2)
|
||||||
.allowsTightening(true)
|
.allowsTightening(true)
|
||||||
|
@ -122,7 +122,7 @@ struct VideoDetailsToolbar: View {
|
|||||||
playerDetailsPageButtonLabelStyle.text,
|
playerDetailsPageButtonLabelStyle.text,
|
||||||
player.playerSize.width > 450
|
player.playerSize.width > 450
|
||||||
{
|
{
|
||||||
Text(tool.wrappedValue.name)
|
Text(tool.wrappedValue.name.localized())
|
||||||
.font(.system(size: 14).bold())
|
.font(.system(size: 14).bold())
|
||||||
.padding(.trailing, 4)
|
.padding(.trailing, 4)
|
||||||
.foregroundColor(.white)
|
.foregroundColor(.white)
|
||||||
|
@ -76,8 +76,8 @@ struct BrowsingSettings: View {
|
|||||||
#endif
|
#endif
|
||||||
Toggle("Show Open Videos quick actions", isOn: $showOpenActionsInHome)
|
Toggle("Show Open Videos quick actions", isOn: $showOpenActionsInHome)
|
||||||
HStack {
|
HStack {
|
||||||
Text("Recent history")
|
Text("Recent History")
|
||||||
TextField("Recent history", text: $homeHistoryItemsText)
|
TextField("Recent History", text: $homeHistoryItemsText)
|
||||||
.labelsHidden()
|
.labelsHidden()
|
||||||
#if !os(macOS)
|
#if !os(macOS)
|
||||||
.keyboardType(.numberPad)
|
.keyboardType(.numberPad)
|
||||||
@ -92,8 +92,8 @@ struct BrowsingSettings: View {
|
|||||||
.multilineTextAlignment(.trailing)
|
.multilineTextAlignment(.trailing)
|
||||||
|
|
||||||
HStack {
|
HStack {
|
||||||
Text("Recent documents")
|
Text("Recent Documents")
|
||||||
TextField("Recent documents", text: $homeRecentDocumentsItemsText)
|
TextField("Recent Documents", text: $homeRecentDocumentsItemsText)
|
||||||
.labelsHidden()
|
.labelsHidden()
|
||||||
#if !os(macOS)
|
#if !os(macOS)
|
||||||
.keyboardType(.numberPad)
|
.keyboardType(.numberPad)
|
||||||
@ -131,7 +131,7 @@ struct BrowsingSettings: View {
|
|||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
NavigationLink(destination: LazyView(EditFavorites())) {
|
NavigationLink(destination: LazyView(EditFavorites())) {
|
||||||
Text("Edit Favorites...")
|
Text("Edit Favorites…")
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
@ -237,7 +237,7 @@ struct PlayerSettings: View {
|
|||||||
private var detailsToolbarPositionPicker: some View {
|
private var detailsToolbarPositionPicker: some View {
|
||||||
Picker("Pages toolbar position", selection: $detailsToolbarPosition) {
|
Picker("Pages toolbar position", selection: $detailsToolbarPosition) {
|
||||||
ForEach(DetailsToolbarPositionSetting.allCases, id: \.self) { setting in
|
ForEach(DetailsToolbarPositionSetting.allCases, id: \.self) { setting in
|
||||||
Text(setting.rawValue.capitalized).tag(setting)
|
Text(setting.rawValue.capitalized.localized()).tag(setting)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.modifier(SettingsPickerModifier())
|
.modifier(SettingsPickerModifier())
|
||||||
|
@ -12,7 +12,7 @@ struct OpenVideosButton: View {
|
|||||||
Image(systemName: imageSystemName)
|
Image(systemName: imageSystemName)
|
||||||
}
|
}
|
||||||
if let text {
|
if let text {
|
||||||
Text(text)
|
Text(text.localized())
|
||||||
.fontWeight(.bold)
|
.fontWeight(.bold)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -96,7 +96,6 @@ struct OpenVideosView: View {
|
|||||||
Spacer()
|
Spacer()
|
||||||
|
|
||||||
#if !os(tvOS)
|
#if !os(tvOS)
|
||||||
|
|
||||||
openFromClipboardButton
|
openFromClipboardButton
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
@ -248,7 +248,7 @@ struct VideoContextMenuView: View {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
let label = Label("Remove...", systemImage: "trash.fill")
|
let label = Label("Remove…", systemImage: "trash.fill")
|
||||||
.foregroundColor(Color("AppRedColor"))
|
.foregroundColor(Color("AppRedColor"))
|
||||||
|
|
||||||
if #available(iOS 15, macOS 12, *) {
|
if #available(iOS 15, macOS 12, *) {
|
||||||
|
@ -432,7 +432,7 @@
|
|||||||
"No documents" = "No documents";
|
"No documents" = "No documents";
|
||||||
"Recent Documents" = "Recent Documents";
|
"Recent Documents" = "Recent Documents";
|
||||||
"Home" = "Home";
|
"Home" = "Home";
|
||||||
"Share files from Finder on a Mac\nor iTunes on Windows" = "Share files from Finder on a Mac\\nor iTunes on Windows";
|
"Share files from Finder on a Mac\nor iTunes on Windows" = "Share files from Finder on a Mac\nor iTunes on Windows";
|
||||||
"Show Home" = "Show Home";
|
"Show Home" = "Show Home";
|
||||||
"Show Open Videos quick actions" = "Show Open Videos quick actions";
|
"Show Open Videos quick actions" = "Show Open Videos quick actions";
|
||||||
"Recent History" = "Recent History";
|
"Recent History" = "Recent History";
|
||||||
|
@ -461,7 +461,7 @@
|
|||||||
"Home" = "Główna";
|
"Home" = "Główna";
|
||||||
"Center" = "Środek";
|
"Center" = "Środek";
|
||||||
"Documents" = "Dokumenty";
|
"Documents" = "Dokumenty";
|
||||||
"Share files from Finder on a Mac\nor iTunes on Windows" = "Udostępniaj pliki z Findera na komputerze Mac\\nlub z iTunes w systemie Windows";
|
"Share files from Finder on a Mac\nor iTunes on Windows" = "Udostępniaj pliki z Findera na komputerze Mac\nlub z iTunes w systemie Windows";
|
||||||
"Show Open Videos toolbar button" = "Pokaż \"Otwórz wideo\" na pasku narzędzi";
|
"Show Open Videos toolbar button" = "Pokaż \"Otwórz wideo\" na pasku narzędzi";
|
||||||
"Share" = "Udostępnij";
|
"Share" = "Udostępnij";
|
||||||
"Hide" = "Ukryj";
|
"Hide" = "Ukryj";
|
||||||
|
Loading…
Reference in New Issue
Block a user