From 9722305b7df114d042f43c0075baa1e2ab3205e0 Mon Sep 17 00:00:00 2001 From: Satindar Dhillon Date: Thu, 19 Jan 2023 19:03:45 -0800 Subject: [PATCH] use strings file for 'clubs' and 'push notifications' --- apple/OmnivoreKit/Sources/App/Views/Profile/ProfileView.swift | 4 ++-- .../App/Views/Profile/PushNotificationSettingsView.swift | 2 +- .../Sources/App/Views/Profile/RecommendationGroupsView.swift | 2 +- apple/OmnivoreKit/Sources/Views/LocalText.swift | 2 ++ .../Sources/Views/Resources/en.lproj/Localizable.strings | 2 ++ .../Sources/Views/Resources/zh-Hans.lproj/Localizable.strings | 2 ++ 6 files changed, 10 insertions(+), 4 deletions(-) diff --git a/apple/OmnivoreKit/Sources/App/Views/Profile/ProfileView.swift b/apple/OmnivoreKit/Sources/App/Views/Profile/ProfileView.swift index 40458b7d8..57620e2fe 100644 --- a/apple/OmnivoreKit/Sources/App/Views/Profile/ProfileView.swift +++ b/apple/OmnivoreKit/Sources/App/Views/Profile/ProfileView.swift @@ -91,7 +91,7 @@ struct ProfileView: View { } NavigationLink(destination: GroupsView()) { - Text("Clubs") + Text(LocalText.clubsGeneric) } } } @@ -110,7 +110,7 @@ struct ProfileView: View { #if os(iOS) Section { NavigationLink(destination: PushNotificationSettingsView()) { - Text("Push Notifications") + Text(LocalText.pushNotificationsGeneric) } NavigationLink(destination: TextToSpeechView()) { Text(LocalText.textToSpeechGeneric) diff --git a/apple/OmnivoreKit/Sources/App/Views/Profile/PushNotificationSettingsView.swift b/apple/OmnivoreKit/Sources/App/Views/Profile/PushNotificationSettingsView.swift index 8cbd83784..afd361772 100644 --- a/apple/OmnivoreKit/Sources/App/Views/Profile/PushNotificationSettingsView.swift +++ b/apple/OmnivoreKit/Sources/App/Views/Profile/PushNotificationSettingsView.swift @@ -91,6 +91,6 @@ struct PushNotificationSettingsView: View { } } } - .navigationTitle("Push Notifications") + .navigationTitle(LocalText.pushNotificationsGeneric) } } diff --git a/apple/OmnivoreKit/Sources/App/Views/Profile/RecommendationGroupsView.swift b/apple/OmnivoreKit/Sources/App/Views/Profile/RecommendationGroupsView.swift index 201ff11f6..0df891584 100644 --- a/apple/OmnivoreKit/Sources/App/Views/Profile/RecommendationGroupsView.swift +++ b/apple/OmnivoreKit/Sources/App/Views/Profile/RecommendationGroupsView.swift @@ -132,7 +132,7 @@ struct GroupsView: View { } } .task { await viewModel.loadGroups(dataService: dataService) } - .navigationTitle("Clubs") + .navigationTitle(LocalText.clubsGeneric) } private var innerBody: some View { diff --git a/apple/OmnivoreKit/Sources/Views/LocalText.swift b/apple/OmnivoreKit/Sources/Views/LocalText.swift index 9b383c964..daed0b979 100644 --- a/apple/OmnivoreKit/Sources/Views/LocalText.swift +++ b/apple/OmnivoreKit/Sources/Views/LocalText.swift @@ -42,4 +42,6 @@ public enum LocalText { public static let newslettersDescription = localText(key: "newsletters.description") public static let labelsPurposeDescription = localText(key: "labels.purpose.description") public static let noCurrentSubscriptionsMessage = localText(key: "no.current.subscriptions.message") + public static let clubsGeneric = localText(key: "clubs.generic") + public static let pushNotificationsGeneric = localText(key: "pushNotifications.generic") } diff --git a/apple/OmnivoreKit/Sources/Views/Resources/en.lproj/Localizable.strings b/apple/OmnivoreKit/Sources/Views/Resources/en.lproj/Localizable.strings index 3ddd00f25..37a7901c1 100644 --- a/apple/OmnivoreKit/Sources/Views/Resources/en.lproj/Localizable.strings +++ b/apple/OmnivoreKit/Sources/Views/Resources/en.lproj/Localizable.strings @@ -35,3 +35,5 @@ "newsletters.description" = "Add PDFs to your library, or subscribe to newsletters using an Omnivore email address."; "labels.purpose.description" = "Use labels to create curated collections of links."; "no.current.subscriptions.message" = "You have no current Subscriptions."; +"clubs.generic" = "Clubs"; +"pushNotifications.generic" = "Push Notifications"; diff --git a/apple/OmnivoreKit/Sources/Views/Resources/zh-Hans.lproj/Localizable.strings b/apple/OmnivoreKit/Sources/Views/Resources/zh-Hans.lproj/Localizable.strings index 34d1d45e3..5cce13d03 100644 --- a/apple/OmnivoreKit/Sources/Views/Resources/zh-Hans.lproj/Localizable.strings +++ b/apple/OmnivoreKit/Sources/Views/Resources/zh-Hans.lproj/Localizable.strings @@ -35,3 +35,5 @@ "newsletters.description" = "将 PDF 添加到您的资料库,或使用 Omnivore 电子邮件地址订阅新闻稿件。"; "labels.purpose.description" = "使用标签创建精选的链接集合。"; "no.current.subscriptions.message" = "您当前没有任何订阅。"; +"clubs.generic" = "读书俱乐部"; +"pushNotifications.generic" = "推送通知";