From e9fed8ddc1c6864bb590330e3d868e70f7989f94 Mon Sep 17 00:00:00 2001 From: Stuart Breckenridge Date: Sun, 4 Jun 2023 18:32:28 +0800 Subject: [PATCH 1/4] 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" = "小"; From f1446856e30edc4ad97cff0b3843d07c8adae263 Mon Sep 17 00:00:00 2001 From: Stuart Breckenridge Date: Sun, 4 Jun 2023 18:58:14 +0800 Subject: [PATCH 2/4] Adds Simplified Chinese translations --- Mac/Resources/zh-Hans.lproj/Localizable.strings | 4 ++-- iOS/Resources/zh-Hans.lproj/Localizable.strings | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Mac/Resources/zh-Hans.lproj/Localizable.strings b/Mac/Resources/zh-Hans.lproj/Localizable.strings index af8480179..7a52cb36b 100644 --- a/Mac/Resources/zh-Hans.lproj/Localizable.strings +++ b/Mac/Resources/zh-Hans.lproj/Localizable.strings @@ -574,10 +574,10 @@ "label.text.share-extension-explainer" = "一个通过共享菜单将文章数据传输给第三方应用的扩展。"; /* Show notifications for new articles */ -"label.text.show-notifications-for-new-articles" = "Show notifications for new articles"; +"label.text.show-notifications-for-new-articles" = "有新文章时推送通知"; /* Show notifications for new posts */ -"label.text.show-notifications-for-new-posts" = "Show notifications for new posts"; +"label.text.show-notifications-for-new-posts" = "有新帖子时推送通知"; /* Sign in to your BazQux account. */ "label.text.sign-in-bazqux" = "登录到你的 BazQux 账户。"; diff --git a/iOS/Resources/zh-Hans.lproj/Localizable.strings b/iOS/Resources/zh-Hans.lproj/Localizable.strings index 1c05ece15..494fe252a 100644 --- a/iOS/Resources/zh-Hans.lproj/Localizable.strings +++ b/iOS/Resources/zh-Hans.lproj/Localizable.strings @@ -749,10 +749,10 @@ "label.text.self-hosted-accounts-explainer" = "自托管帐户可以在所有设备上同步你的订阅。"; /* Show notifications for new articles */ -"label.text.show-notifications-for-new-articles" = "Notify about new articles"; +"label.text.show-notifications-for-new-articles" = "新文章通知"; /* Show notifications for new posts */ -"label.text.show-notifications-for-new-posts" = "Notify about new posts"; +"label.text.show-notifications-for-new-posts" = "新帖子通知"; /* Small */ "label.text.small" = "小"; From 8bf0744d3ba62acb2c8290161d432001d92a4763 Mon Sep 17 00:00:00 2001 From: Stuart Breckenridge Date: Sun, 4 Jun 2023 18:59:42 +0800 Subject: [PATCH 3/4] Correct description --- iOS/Resources/zh-Hans.lproj/Localizable.strings | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/iOS/Resources/zh-Hans.lproj/Localizable.strings b/iOS/Resources/zh-Hans.lproj/Localizable.strings index 494fe252a..09d699b32 100644 --- a/iOS/Resources/zh-Hans.lproj/Localizable.strings +++ b/iOS/Resources/zh-Hans.lproj/Localizable.strings @@ -748,10 +748,10 @@ /* Self-hosted accounts sync your feeds across all your devices */ "label.text.self-hosted-accounts-explainer" = "自托管帐户可以在所有设备上同步你的订阅。"; -/* Show notifications for new articles */ +/* Notify about new articles */ "label.text.show-notifications-for-new-articles" = "新文章通知"; -/* Show notifications for new posts */ +/* Notify about new posts */ "label.text.show-notifications-for-new-posts" = "新帖子通知"; /* Small */ From 413cede1ff84e82ab7a34e191404aabd3d49f150 Mon Sep 17 00:00:00 2001 From: Stuart Breckenridge Date: Sun, 4 Jun 2023 20:39:38 +0800 Subject: [PATCH 4/4] Fix 4000 too --- Mac/Resources/en-GB.lproj/Localizable.strings | 2 +- Mac/Resources/en.lproj/Localizable.strings | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Mac/Resources/en-GB.lproj/Localizable.strings b/Mac/Resources/en-GB.lproj/Localizable.strings index 01c8eacea..53d9af2e4 100644 --- a/Mac/Resources/en-GB.lproj/Localizable.strings +++ b/Mac/Resources/en-GB.lproj/Localizable.strings @@ -208,7 +208,7 @@ "button.title.advanced" = "Advanced"; /* Always Use Reader View */ -"button.title.always-use-reader-view" = "Always User Reader View"; +"button.title.always-use-reader-view" = "Always Use Reader View"; /* Article Theme */ "button.title.article-theme" = "Article Theme"; diff --git a/Mac/Resources/en.lproj/Localizable.strings b/Mac/Resources/en.lproj/Localizable.strings index d6cdd2539..c769a332f 100644 --- a/Mac/Resources/en.lproj/Localizable.strings +++ b/Mac/Resources/en.lproj/Localizable.strings @@ -204,7 +204,7 @@ "button.title.advanced" = "Advanced"; /* Always Use Reader View */ -"button.title.always-use-reader-view" = "Always User Reader View"; +"button.title.always-use-reader-view" = "Always Use Reader View"; /* Article Theme */ "button.title.article-theme" = "Article Theme";