From e9fed8ddc1c6864bb590330e3d868e70f7989f94 Mon Sep 17 00:00:00 2001 From: Stuart Breckenridge Date: Sun, 4 Jun 2023 18:32:28 +0800 Subject: [PATCH] Internationalises `notificationDisplayName` & provides en, en-gb strings; simplified chinese pending --- Account/Sources/Account/WebFeed.swift | 8 ++++---- Mac/Resources/en-GB.lproj/Localizable.strings | 6 ++++++ Mac/Resources/en.lproj/Localizable.strings | 6 ++++++ Mac/Resources/zh-Hans.lproj/Localizable.strings | 6 ++++++ iOS/Resources/en-GB.lproj/Localizable.strings | 6 ++++++ iOS/Resources/en.lproj/Localizable.strings | 6 ++++++ iOS/Resources/zh-Hans.lproj/Localizable.strings | 6 ++++++ 7 files changed, 40 insertions(+), 4 deletions(-) diff --git a/Account/Sources/Account/WebFeed.swift b/Account/Sources/Account/WebFeed.swift index f1ac92d82..aad148c41 100644 --- a/Account/Sources/Account/WebFeed.swift +++ b/Account/Sources/Account/WebFeed.swift @@ -254,15 +254,15 @@ public final class WebFeed: Feed, Renamable, Hashable, ObservableObject { public var notificationDisplayName: String { #if os(macOS) if self.url.contains("www.reddit.com") { - return NSLocalizedString("Show notifications for new posts", comment: "notifyNameDisplay / Reddit") + return NSLocalizedString("label.text.show-notifications-for-new-posts", comment: "Show notifications for new posts") } else { - return NSLocalizedString("Show notifications for new articles", comment: "notifyNameDisplay / Default") + return NSLocalizedString("label.text.show-notifications-for-new-articles", comment: "Show notifications for new articles") } #else if self.url.contains("www.reddit.com") { - return NSLocalizedString("Notify about new posts", comment: "notifyNameDisplay / Reddit") + return NSLocalizedString("label.text.show-notifications-for-new-posts", comment: "Notify about new posts") } else { - return NSLocalizedString("Notify about new articles", comment: "notifyNameDisplay / Default") + return NSLocalizedString("label.text.show-notifications-for-new-articles", comment: "Notify about new articles") } #endif } diff --git a/Mac/Resources/en-GB.lproj/Localizable.strings b/Mac/Resources/en-GB.lproj/Localizable.strings index 20a466e6d..01c8eacea 100644 --- a/Mac/Resources/en-GB.lproj/Localizable.strings +++ b/Mac/Resources/en-GB.lproj/Localizable.strings @@ -574,6 +574,12 @@ /* An extension that enables a share menu item that passes article data to a third-party application. */ "label.text.share-extension-explainer" = "An extension that enables a share menu item that passes article data to a third-party application."; +/* Show notifications for new articles */ +"label.text.show-notifications-for-new-articles" = "Show notifications for new articles"; + +/* Show notifications for new posts */ +"label.text.show-notifications-for-new-posts" = "Show notifications for new posts"; + /* Sign in to your BazQux account. */ "label.text.sign-in-bazqux" = "Sign in to your BazQux account."; diff --git a/Mac/Resources/en.lproj/Localizable.strings b/Mac/Resources/en.lproj/Localizable.strings index 729706083..d6cdd2539 100644 --- a/Mac/Resources/en.lproj/Localizable.strings +++ b/Mac/Resources/en.lproj/Localizable.strings @@ -567,6 +567,12 @@ /* An extension that enables a share menu item that passes article data to a third-party application. */ "label.text.share-extension-explainer" = "An extension that enables a share menu item that passes article data to a third-party application."; +/* Show notifications for new articles */ +"label.text.show-notifications-for-new-articles" = "Show notifications for new articles"; + +/* Show notifications for new posts */ +"label.text.show-notifications-for-new-posts" = "Show notifications for new posts"; + /* Sign in to your BazQux account. */ "label.text.sign-in-bazqux" = "Sign in to your BazQux account."; diff --git a/Mac/Resources/zh-Hans.lproj/Localizable.strings b/Mac/Resources/zh-Hans.lproj/Localizable.strings index 3b987e2dd..af8480179 100644 --- a/Mac/Resources/zh-Hans.lproj/Localizable.strings +++ b/Mac/Resources/zh-Hans.lproj/Localizable.strings @@ -573,6 +573,12 @@ /* An extension that enables a share menu item that passes article data to a third-party application. */ "label.text.share-extension-explainer" = "一个通过共享菜单将文章数据传输给第三方应用的扩展。"; +/* Show notifications for new articles */ +"label.text.show-notifications-for-new-articles" = "Show notifications for new articles"; + +/* Show notifications for new posts */ +"label.text.show-notifications-for-new-posts" = "Show notifications for new posts"; + /* Sign in to your BazQux account. */ "label.text.sign-in-bazqux" = "登录到你的 BazQux 账户。"; diff --git a/iOS/Resources/en-GB.lproj/Localizable.strings b/iOS/Resources/en-GB.lproj/Localizable.strings index 31a2d9add..1eab7fdf5 100644 --- a/iOS/Resources/en-GB.lproj/Localizable.strings +++ b/iOS/Resources/en-GB.lproj/Localizable.strings @@ -754,6 +754,12 @@ /* Self-hosted accounts sync your feeds across all your devices */ "label.text.self-hosted-accounts-explainer" = "Self-hosted accounts sync your feeds across all your devices"; +/* Show notifications for new articles */ +"label.text.show-notifications-for-new-articles" = "Notify about new articles"; + +/* Show notifications for new posts */ +"label.text.show-notifications-for-new-posts" = "Notify about new posts"; + /* Small */ "label.text.small" = "Small"; diff --git a/iOS/Resources/en.lproj/Localizable.strings b/iOS/Resources/en.lproj/Localizable.strings index 0c25dbaec..489e41610 100644 --- a/iOS/Resources/en.lproj/Localizable.strings +++ b/iOS/Resources/en.lproj/Localizable.strings @@ -739,6 +739,12 @@ /* Self-hosted accounts sync your feeds across all your devices */ "label.text.self-hosted-accounts-explainer" = "Self-hosted accounts sync your feeds across all your devices"; +/* Show notifications for new articles */ +"label.text.show-notifications-for-new-articles" = "Notify about new articles"; + +/* Show notifications for new posts */ +"label.text.show-notifications-for-new-posts" = "Notify about new posts"; + /* Small */ "label.text.small" = "Small"; diff --git a/iOS/Resources/zh-Hans.lproj/Localizable.strings b/iOS/Resources/zh-Hans.lproj/Localizable.strings index d4ad12ee7..1c05ece15 100644 --- a/iOS/Resources/zh-Hans.lproj/Localizable.strings +++ b/iOS/Resources/zh-Hans.lproj/Localizable.strings @@ -748,6 +748,12 @@ /* Self-hosted accounts sync your feeds across all your devices */ "label.text.self-hosted-accounts-explainer" = "自托管帐户可以在所有设备上同步你的订阅。"; +/* Show notifications for new articles */ +"label.text.show-notifications-for-new-articles" = "Notify about new articles"; + +/* Show notifications for new posts */ +"label.text.show-notifications-for-new-posts" = "Notify about new posts"; + /* Small */ "label.text.small" = "小";