diff --git a/RevenueCatUI/CustomerCenter/Data/CustomerCenterConfigData.swift b/RevenueCatUI/CustomerCenter/Data/CustomerCenterConfigData.swift index 8390ff4384..12685ef769 100644 --- a/RevenueCatUI/CustomerCenter/Data/CustomerCenterConfigData.swift +++ b/RevenueCatUI/CustomerCenter/Data/CustomerCenterConfigData.swift @@ -20,7 +20,7 @@ struct CustomerCenterConfigData { let id: String let paths: [HelpPath] - let title: LocalizedString + let title: String enum HelpPathType: String { case missingPurchase = "MISSING_PURCHASE" @@ -40,22 +40,15 @@ struct CustomerCenterConfigData { struct HelpPath { let id: String - let title: LocalizedString + let title: String let type: HelpPathType let detail: HelpPathDetail? } - struct LocalizedString { - - // swiftlint:disable:next identifier_name - let en_US: String - - } - struct FeedbackSurvey { - let title: LocalizedString + let title: String let options: [FeedbackSurveyOption] } @@ -63,7 +56,7 @@ struct CustomerCenterConfigData { struct FeedbackSurveyOption { let id: String - let title: LocalizedString + let title: String } diff --git a/RevenueCatUI/CustomerCenter/Data/CustomerCenterConfigTestData.swift b/RevenueCatUI/CustomerCenter/Data/CustomerCenterConfigTestData.swift index 44d5db8f6b..b4cee4fbfc 100644 --- a/RevenueCatUI/CustomerCenter/Data/CustomerCenterConfigTestData.swift +++ b/RevenueCatUI/CustomerCenter/Data/CustomerCenterConfigTestData.swift @@ -26,46 +26,46 @@ enum CustomerCenterConfigTestData { paths: [ .init( id: "1", - title: .init(en_US: "Didn't receive purchase"), + title: "Didn't receive purchase", type: .missingPurchase, detail: nil ), .init( id: "2", - title: .init(en_US: "Request a refund"), + title: "Request a refund", type: .refundRequest, detail: nil ), .init( id: "3", - title: .init(en_US: "Change plans"), + title: "Change plans", type: .changePlans, detail: nil ), .init( id: "4", - title: .init(en_US: "Cancel subscription"), + title: "Cancel subscription", type: .cancel, detail: .feedbackSurvey(.init( - title: .init(en_US: "Why are you cancelling?"), + title: "Why are you cancelling?", options: [ .init( id: "1", - title: CustomerCenterConfigData.LocalizedString(en_US: "Too expensive") + title: "Too expensive" ), .init( id: "2", - title: CustomerCenterConfigData.LocalizedString(en_US: "Don't use the app") + title: "Don't use the app" ), .init( id: "3", - title: CustomerCenterConfigData.LocalizedString(en_US: "Bought by mistake") + title: "Bought by mistake" ) ] )) ) ], - title: .init(en_US: "How can we help?") + title: "How can we help?" ) static let subscriptionInformation: SubscriptionInformation = .init( diff --git a/RevenueCatUI/CustomerCenter/Views/ManageSubscriptionsView.swift b/RevenueCatUI/CustomerCenter/Views/ManageSubscriptionsView.swift index 3378910657..1f74b0efbf 100644 --- a/RevenueCatUI/CustomerCenter/Views/ManageSubscriptionsView.swift +++ b/RevenueCatUI/CustomerCenter/Views/ManageSubscriptionsView.swift @@ -89,7 +89,7 @@ struct HeaderView: View { var body: some View { if let configuration = viewModel.configuration { - Text(configuration.title.en_US) + Text(configuration.title) .font(.title) .padding() } @@ -157,7 +157,7 @@ struct ManageSubscriptionsButtonsView: View { #endif } ForEach(filteredPaths, id: \.id) { path in - Button(path.title.en_US) { + Button(path.title) { self.viewModel.handleAction(for: path) } .restorePurchasesAlert(isPresented: $viewModel.showRestoreAlert) diff --git a/Tests/RevenueCatUITests/CustomerCenter/ManageSubscriptionsViewModelTests.swift b/Tests/RevenueCatUITests/CustomerCenter/ManageSubscriptionsViewModelTests.swift index 57e4169682..1bd560ea4f 100644 --- a/Tests/RevenueCatUITests/CustomerCenter/ManageSubscriptionsViewModelTests.swift +++ b/Tests/RevenueCatUITests/CustomerCenter/ManageSubscriptionsViewModelTests.swift @@ -42,7 +42,7 @@ class ManageSubscriptionsViewModelTests: TestCase { expect(viewModel.state) == .notLoaded expect(viewModel.subscriptionInformation).to(beNil()) - expect(viewModel.refundRequestStatus).to(beNil()) + expect(viewModel.refundRequestStatusMessage).to(beNil()) expect(viewModel.configuration).to(beNil()) expect(viewModel.showRestoreAlert) == false expect(viewModel.isLoaded) == false