From bf4ec4982a07048acff32aa5f1d957ef9424320b Mon Sep 17 00:00:00 2001 From: Davide De Rosa Date: Thu, 3 Oct 2024 18:46:54 +0200 Subject: [PATCH] Refactor phrases --- .../Library/Sources/AppUI/IAP/AppFeature.swift | 1 - .../Sources/AppUI/L10n/SwiftGen+Strings.swift | 16 ++++++++-------- .../AppUI/Resources/en.lproj/Localizable.strings | 4 ++-- .../Sources/AppUI/Views/UI/StorageSection.swift | 4 ++-- 4 files changed, 12 insertions(+), 13 deletions(-) diff --git a/Passepartout/Library/Sources/AppUI/IAP/AppFeature.swift b/Passepartout/Library/Sources/AppUI/IAP/AppFeature.swift index 45fca0c3..ad100403 100644 --- a/Passepartout/Library/Sources/AppUI/IAP/AppFeature.swift +++ b/Passepartout/Library/Sources/AppUI/IAP/AppFeature.swift @@ -47,7 +47,6 @@ public enum AppFeature: String { public static let fullVersionFeaturesV2: [AppFeature] = [ .dns, .httpProxy, - .interactiveLogin, .onDemand, .providers, .routing, diff --git a/Passepartout/Library/Sources/AppUI/L10n/SwiftGen+Strings.swift b/Passepartout/Library/Sources/AppUI/L10n/SwiftGen+Strings.swift index 76f46fd8..ea101e17 100644 --- a/Passepartout/Library/Sources/AppUI/L10n/SwiftGen+Strings.swift +++ b/Passepartout/Library/Sources/AppUI/L10n/SwiftGen+Strings.swift @@ -286,20 +286,20 @@ public enum Strings { } } public enum General { + public enum Rows { + /// Share on iCloud + public static let icloudSharing = Strings.tr("Localizable", "modules.general.rows.icloud_sharing", fallback: "Share on iCloud") + public enum IcloudSharing { + /// Share on iCloud + public static let purchase = Strings.tr("Localizable", "modules.general.rows.icloud_sharing.purchase", fallback: "Share on iCloud") + } + } public enum Sections { public enum Storage { /// Profiles are stored to iCloud encrypted. public static let footer = Strings.tr("Localizable", "modules.general.sections.storage.footer", fallback: "Profiles are stored to iCloud encrypted.") } } - public enum Storage { - /// Share on iCloud - public static let shared = Strings.tr("Localizable", "modules.general.storage.shared", fallback: "Share on iCloud") - public enum Shared { - /// Share on iCloud - public static let purchase = Strings.tr("Localizable", "modules.general.storage.shared.purchase", fallback: "Share on iCloud") - } - } } public enum HttpProxy { public enum BypassDomains { diff --git a/Passepartout/Library/Sources/AppUI/Resources/en.lproj/Localizable.strings b/Passepartout/Library/Sources/AppUI/Resources/en.lproj/Localizable.strings index 7f7f80ed..612b9a51 100644 --- a/Passepartout/Library/Sources/AppUI/Resources/en.lproj/Localizable.strings +++ b/Passepartout/Library/Sources/AppUI/Resources/en.lproj/Localizable.strings @@ -160,8 +160,8 @@ // MARK: - Module views "modules.general.sections.storage.footer" = "Profiles are stored to iCloud encrypted."; -"modules.general.storage.shared" = "Share on iCloud"; -"modules.general.storage.shared.purchase" = "Share on iCloud"; +"modules.general.rows.icloud_sharing" = "Share on iCloud"; +"modules.general.rows.icloud_sharing.purchase" = "Share on iCloud"; "modules.dns.servers.add" = "Add address"; "modules.dns.search_domains.add" = "Add domain"; diff --git a/Passepartout/Library/Sources/AppUI/Views/UI/StorageSection.swift b/Passepartout/Library/Sources/AppUI/Views/UI/StorageSection.swift index b9ec5d49..afaba2da 100644 --- a/Passepartout/Library/Sources/AppUI/Views/UI/StorageSection.swift +++ b/Passepartout/Library/Sources/AppUI/Views/UI/StorageSection.swift @@ -62,7 +62,7 @@ private extension StorageSection { var sharingToggle: some View { switch iapManager.paywallReason(forFeature: .sharing) { case .purchase(let appFeature): - Button(Strings.Modules.General.Storage.Shared.purchase) { + Button(Strings.Modules.General.Rows.IcloudSharing.purchase) { paywallReason = .purchase(appFeature) } @@ -70,7 +70,7 @@ private extension StorageSection { EmptyView() default: - Toggle(Strings.Modules.General.Storage.shared, isOn: $profileEditor.isShared) + Toggle(Strings.Modules.General.Rows.icloudSharing, isOn: $profileEditor.isShared) } } }