Corrects naming convention

[iOS]
Twitter: Notify about new tweets
Reddit: Notify about new posts
Default: Notify about new articles
+ Fixes alignment issues in the inspector view

[macOS]
Twitter: Show notifications for new tweets
Reddit: Show notifications for new posts
Default: Show notifications for new articles
This commit is contained in:
Stuart Breckenridge
2021-04-19 11:10:57 +08:00
parent 8e2de9237c
commit d4130e7c65
5 changed files with 46 additions and 11 deletions

View File

@@ -240,6 +240,27 @@ public final class WebFeed: Feed, Renamable, Hashable {
return true
}
}
// MARK: - NotificationDisplayName
public var notifyNameDisplay: String {
#if os(macOS)
if self.url.contains("twitter.com") {
return NSLocalizedString("Show notifications for new tweets", comment: "notifyNameDisplay / Twitter")
} else if self.url.contains("www.reddit.com") {
return NSLocalizedString("Show notifications for new posts", comment: "notifyNameDisplay / Reddit")
} else {
return NSLocalizedString("Show notifications for new articles", comment: "notifyNameDisplay / Default")
}
#else
if self.url.contains("twitter.com") {
return NSLocalizedString("Notify about new tweets", comment: "notifyNameDisplay / Twitter")
} else if self.url.contains("www.reddit.com") {
return NSLocalizedString("Notify about new posts", comment: "notifyNameDisplay / Reddit")
} else {
return NSLocalizedString("Notify about new articles", comment: "notifyNameDisplay / Default")
}
#endif
}
var metadata: WebFeedMetadata