Localizations fixes

This commit is contained in:
Arkadiusz Fal 2022-11-19 00:06:13 +01:00
parent be2af82300
commit 780b7ab130
13 changed files with 18 additions and 19 deletions

View File

@ -65,7 +65,7 @@ struct OpenVideosModel {
func openURLsFromClipboard(removeQueueItems: Bool = false, playbackMode: OpenVideosModel.PlaybackMode = .playNow) {
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 {
NavigationModel.shared.presentingAlertInOpenVideos = true
} else {

View File

@ -119,9 +119,9 @@ struct FavoriteItemView: View {
private var label: String {
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()
}
}

View File

@ -182,7 +182,7 @@ struct HomeView: View {
}
func sectionLabel(_ label: String) -> some View {
Text(label)
Text(label.localized())
#if os(tvOS)
.padding(.horizontal, 40)
#else

View File

@ -64,7 +64,7 @@ struct InspectorView: View {
if let systemName {
Image(systemName: systemName)
}
Text(heading.uppercased())
Text(heading.localized().uppercased())
.font(.footnote)
}
.foregroundColor(.secondary)
@ -72,7 +72,7 @@ struct InspectorView: View {
@ViewBuilder func videoDetailRow(_ detail: String, value: String) -> some View {
HStack {
Text(detail)
Text(detail.localized())
.foregroundColor(.secondary)
Spacer()
let value = Text(value).lineLimit(1)

View File

@ -85,7 +85,7 @@ struct VideoActions: View {
Image(systemName: systemImage)
.frame(width: 20, height: 20)
if playerActionsButtonLabelStyle.text {
Text(name)
Text(name.localized())
.foregroundColor(.secondary)
.font(.caption2)
.allowsTightening(true)

View File

@ -122,7 +122,7 @@ struct VideoDetailsToolbar: View {
playerDetailsPageButtonLabelStyle.text,
player.playerSize.width > 450
{
Text(tool.wrappedValue.name)
Text(tool.wrappedValue.name.localized())
.font(.system(size: 14).bold())
.padding(.trailing, 4)
.foregroundColor(.white)

View File

@ -76,8 +76,8 @@ struct BrowsingSettings: View {
#endif
Toggle("Show Open Videos quick actions", isOn: $showOpenActionsInHome)
HStack {
Text("Recent history")
TextField("Recent history", text: $homeHistoryItemsText)
Text("Recent History")
TextField("Recent History", text: $homeHistoryItemsText)
.labelsHidden()
#if !os(macOS)
.keyboardType(.numberPad)
@ -92,8 +92,8 @@ struct BrowsingSettings: View {
.multilineTextAlignment(.trailing)
HStack {
Text("Recent documents")
TextField("Recent documents", text: $homeRecentDocumentsItemsText)
Text("Recent Documents")
TextField("Recent Documents", text: $homeRecentDocumentsItemsText)
.labelsHidden()
#if !os(macOS)
.keyboardType(.numberPad)
@ -131,7 +131,7 @@ struct BrowsingSettings: View {
}
#else
NavigationLink(destination: LazyView(EditFavorites())) {
Text("Edit Favorites...")
Text("Edit Favorites")
}
#endif
}

View File

@ -237,7 +237,7 @@ struct PlayerSettings: View {
private var detailsToolbarPositionPicker: some View {
Picker("Pages toolbar position", selection: $detailsToolbarPosition) {
ForEach(DetailsToolbarPositionSetting.allCases, id: \.self) { setting in
Text(setting.rawValue.capitalized).tag(setting)
Text(setting.rawValue.capitalized.localized()).tag(setting)
}
}
.modifier(SettingsPickerModifier())

View File

@ -12,7 +12,7 @@ struct OpenVideosButton: View {
Image(systemName: imageSystemName)
}
if let text {
Text(text)
Text(text.localized())
.fontWeight(.bold)
}
}

View File

@ -96,7 +96,6 @@ struct OpenVideosView: View {
Spacer()
#if !os(tvOS)
openFromClipboardButton
#endif
}

View File

@ -248,7 +248,7 @@ struct VideoContextMenuView: View {
)
}
}
let label = Label("Remove...", systemImage: "trash.fill")
let label = Label("Remove", systemImage: "trash.fill")
.foregroundColor(Color("AppRedColor"))
if #available(iOS 15, macOS 12, *) {

View File

@ -432,7 +432,7 @@
"No documents" = "No documents";
"Recent Documents" = "Recent Documents";
"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 Open Videos quick actions" = "Show Open Videos quick actions";
"Recent History" = "Recent History";

View File

@ -461,7 +461,7 @@
"Home" = "Główna";
"Center" = "Środek";
"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";
"Share" = "Udostępnij";
"Hide" = "Ukryj";