mirror of
https://github.com/yattee/yattee.git
synced 2025-08-09 20:24:06 +00:00
Localizations
This commit is contained in:
@@ -227,7 +227,8 @@ struct ControlsBar: View {
|
||||
}
|
||||
|
||||
VStack(alignment: .leading, spacing: 0) {
|
||||
Text(model.currentVideo?.title ?? "Not Playing")
|
||||
let notPlaying = "Not Playing".localized()
|
||||
Text(model.currentVideo?.title ?? notPlaying)
|
||||
.font(.system(size: 14))
|
||||
.fontWeight(.semibold)
|
||||
.foregroundColor(model.currentVideo.isNil ? .secondary : .accentColor)
|
||||
|
@@ -89,13 +89,19 @@ struct ShareButton: View {
|
||||
}
|
||||
|
||||
private func labelForShareURL(_ app: String, withTime: Bool = false) -> String {
|
||||
let time = withTime ? "with time" : ""
|
||||
|
||||
#if os(macOS)
|
||||
return "Copy \(app) link \(time)"
|
||||
#else
|
||||
return "Share \(app) link \(time)"
|
||||
#endif
|
||||
if withTime {
|
||||
#if os(macOS)
|
||||
return String(format: "Copy %@ link with time".localized(), app)
|
||||
#else
|
||||
return String(format: "Share %@ link with time".localized(), app)
|
||||
#endif
|
||||
} else {
|
||||
#if os(macOS)
|
||||
return String(format: "Copy %@ link".localized(), app)
|
||||
#else
|
||||
return String(format: "Share %@ link".localized(), app)
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -16,7 +16,7 @@ struct SubscriptionsView: View {
|
||||
|
||||
var body: some View {
|
||||
BrowserPlayerControls {
|
||||
SignInRequiredView(title: "Subscriptions") {
|
||||
SignInRequiredView(title: "Subscriptions".localized()) {
|
||||
VerticalCells(items: videos)
|
||||
.onAppear {
|
||||
loadResources()
|
||||
|
@@ -112,14 +112,15 @@ struct VideoContextMenuView: View {
|
||||
|
||||
private var watchedAtString: String? {
|
||||
if watchingNow {
|
||||
return "Watching now"
|
||||
return "Watching now".localized()
|
||||
}
|
||||
|
||||
if let watch = watch, let watchedAtString = watch.watchedAtString {
|
||||
if watchedAtString == "in 0 seconds" {
|
||||
return "Just watched"
|
||||
return "Just watched".localized()
|
||||
}
|
||||
return "Watched \(watchedAtString)"
|
||||
let localizedWatchedString = "Watched %@".localized()
|
||||
return String(format: localizedWatchedString, watchedAtString)
|
||||
}
|
||||
|
||||
return nil
|
||||
|
@@ -61,8 +61,8 @@ struct WelcomeScreen: View {
|
||||
.background(RoundedRectangle(cornerRadius: 4).foregroundColor(Color.accentColor))
|
||||
.frame(maxWidth: .infinity)
|
||||
#endif
|
||||
Text("This information will be processed only on your device and used to connect you to the server in the specified country.\n" +
|
||||
"It can be changed later in settings. You can use your own locations too.")
|
||||
Text("This information will be processed only on your device and used to connect you to the server in the specified country.".localized() + "\n" +
|
||||
"It can be changed later in settings. You can use your own locations too.".localized())
|
||||
.font(.caption)
|
||||
.foregroundColor(.secondary)
|
||||
}
|
||||
|
Reference in New Issue
Block a user