Skip to content

[Customer Center] Move No subscriptions page strings to Localization#4089

Merged
tonidero merged 1 commit into
integration/customer_support_workflowfrom
move-no-subscriptions-strings-to-localization
Jul 19, 2024
Merged

[Customer Center] Move No subscriptions page strings to Localization#4089
tonidero merged 1 commit into
integration/customer_support_workflowfrom
move-no-subscriptions-strings-to-localization

Conversation

@tonidero

Copy link
Copy Markdown
Contributor

Description

This is based on the changes in #3968

This PR:

  • Moves the strings currently hardcode into the CustomerCenterConfigData.Localization object.
  • Fixes an issue compiling paywall tester introduced in a previous PR
  • Modifies how we read backend strings to not account for the common_ prefix, which is already removed by the backend.


public func commonLocalizedString(for key: CommonLocalizedString) -> String {
return self.localizedStrings["common_\(key.rawValue)"] ?? key.defaultValue
return self.localizedStrings[key.rawValue] ?? key.defaultValue

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This prefix is removed by the backend in the response, so we don't need to use it here.

case .restoreCompleted(_):
print("CustomerCenter: restoreCompleted")
case .purchaseCompleted(_):
print("CustomerCenter: purchaseCompleted")

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was a leftover from a last minute change in #4057 which was causing paywall tester not to build.

Comment thread RevenueCatUI/CustomerCenter/Views/NoSubscriptionsView.swift Outdated
@tonidero tonidero force-pushed the move-no-subscriptions-strings-to-localization branch from f1eba27 to 1c9a6fe Compare July 19, 2024 13:09
@tonidero tonidero marked this pull request as ready for review July 19, 2024 13:17
@tonidero tonidero requested a review from a team July 19, 2024 13:17
Base automatically changed from 06-17-removes_eligibility_from_reponse to integration/customer_support_workflow July 19, 2024 14:30
@tonidero tonidero force-pushed the move-no-subscriptions-strings-to-localization branch from 1c9a6fe to 54b6370 Compare July 19, 2024 15:29
@tonidero tonidero merged commit 0d7530e into integration/customer_support_workflow Jul 19, 2024
@tonidero tonidero deleted the move-no-subscriptions-strings-to-localization branch July 19, 2024 15:51
@vegaro vegaro changed the title Move No subscriptions page strings to Localization [Customer Center] Move No subscriptions page strings to Localization Jul 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants