Skip to content

Commit

Permalink
Paywalls: localize default template (#3295)
Browse files Browse the repository at this point in the history
![Screenshot 2023-10-09 at 14 00
55](https://github.com/RevenueCat/purchases-ios/assets/685609/4e766486-c082-452d-9abf-22d3d0080812)

_Note: the package names in this screenshot aren't localized because
they're hardcoded in these `TestStoreProduct`._
  • Loading branch information
NachoSoto authored Oct 10, 2023
1 parent 7368d7d commit eccddc0
Show file tree
Hide file tree
Showing 50 changed files with 188 additions and 22 deletions.
8 changes: 5 additions & 3 deletions RevenueCatUI/Data/PaywallData+Validation.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
//
// Created by Nacho Soto on 8/15/23.

import Foundation

import RevenueCat

// MARK: - Errors
Expand Down Expand Up @@ -39,7 +41,7 @@ extension Offering {
extension Offering {

/// - Returns: a validated paywall suitable to be displayed, and any associated error.
func validatedPaywall() -> ValidationResult {
func validatedPaywall(locale: Locale = .current) -> ValidationResult {
if let paywall = self.paywall {
switch paywall.validate() {
case let .success(template):
Expand All @@ -48,13 +50,13 @@ extension Offering {
case let .failure(error):
// If there are any errors, create a default paywall
// with only the configured packages.
return (.createDefault(with: paywall.config.packages),
return (.createDefault(with: paywall.config.packages, locale: locale),
PaywallData.defaultTemplate,
error)
}
} else {
// If `Offering` has no paywall, create a default one with all available packages.
return (displayablePaywall: .createDefault(with: self.availablePackages),
return (displayablePaywall: .createDefault(with: self.availablePackages, locale: locale),
PaywallData.defaultTemplate,
error: .missingPaywall)
}
Expand Down
49 changes: 33 additions & 16 deletions RevenueCatUI/Helpers/PaywallData+Default.swift
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,17 @@ extension PaywallData {

/// Default `PaywallData` to display when attempting to present a ``PaywallView`` with an offering
/// that has no paywall configuration, or when that configuration is invalid.
static func createDefault(with packages: [Package]) -> Self {
return self.createDefault(with: packages.map(\.identifier))
static func createDefault(
with packages: [Package],
locale: Locale
) -> Self {
return self.createDefault(with: packages.map(\.identifier), locale: locale)
}

static func createDefault(with packageIdentifiers: [String]) -> Self {
static func createDefault(
with packageIdentifiers: [String],
locale: Locale
) -> Self {
return .init(
templateName: Self.defaultTemplate.rawValue,
config: .init(
Expand All @@ -39,7 +45,7 @@ extension PaywallData {
blurredBackgroundImage: true,
displayRestorePurchases: true
),
localization: Self.localization,
localization: Self.localization(Localization.localizedBundle(locale)),
assetBaseURL: Self.defaultTemplateBaseURL,
revision: Self.revisionID
)
Expand Down Expand Up @@ -90,13 +96,21 @@ private extension PaywallData {
))
}()

static let localization: PaywallData.LocalizedConfiguration = .init(
title: "{{ app_name }}",
subtitle: nil,
callToAction: "Continue",
offerDetails: "{{ total_price_and_per_month }}",
offerDetailsWithIntroOffer: "Start your {{ sub_offer_duration }} trial, then {{ total_price_and_per_month }}."
)
static func localization(_ localizedBundle: Bundle) -> PaywallData.LocalizedConfiguration {
.init(
title: "{{ app_name }}",
subtitle: nil,
callToAction: localizedBundle
.localizedString(forKey: "Continue", value: nil, table: nil),
offerDetails: "{{ total_price_and_per_month }}",
offerDetailsWithIntroOffer: localizedBundle
.localizedString(
forKey: "Default_offer_details_with_intro_offer",
value: "Start your {{ sub_offer_duration }} trial, then {{ total_price_and_per_month }}.",
table: nil
)
)
}

static let backgroundImage = "background.jpg"
static let defaultTemplateBaseURL = Bundle.module.resourceURL ?? Bundle.module.bundleURL
Expand Down Expand Up @@ -124,11 +138,14 @@ struct DefaultPaywall_Previews: PreviewProvider {
identifier: "offering",
serverDescription: "Main offering",
metadata: [:],
paywall: .createDefault(with: [
TestData.weeklyPackage,
TestData.monthlyPackage,
TestData.annualPackage
]),
paywall: .createDefault(
with: [
TestData.weeklyPackage,
TestData.monthlyPackage,
TestData.annualPackage
],
locale: .current
),
availablePackages: TestData.packages
)

Expand Down
5 changes: 4 additions & 1 deletion RevenueCatUI/PaywallView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ public struct PaywallView: View {
private let mode: PaywallViewMode
private let fonts: PaywallFontProvider

@Environment(\.locale)
private var locale

@StateObject
private var purchaseHandler: PurchaseHandler

Expand Down Expand Up @@ -150,7 +153,7 @@ public struct PaywallView: View {
checker: TrialOrIntroEligibilityChecker,
purchaseHandler: PurchaseHandler
) -> some View {
let (paywall, template, error) = offering.validatedPaywall()
let (paywall, template, error) = offering.validatedPaywall(locale: self.locale)

let paywallView = LoadedOfferingPaywallView(
offering: offering,
Expand Down
2 changes: 2 additions & 0 deletions RevenueCatUI/Resources/ar.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,5 @@
"Weekly" = "أسبوعي";
"Lifetime" = "حياة";
"%d%% off" = "خصم %d%%";
"Continue" = "يكمل";
"Default_offer_details_with_intro_offer" = "ابدأ الفترة التجريبية التي تبلغ {{ sub_offer_duration }}، ثم {{ Total_price_and_per_month }}.";
2 changes: 2 additions & 0 deletions RevenueCatUI/Resources/bg.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,5 @@
"Weekly" = "Ежеседмично";
"Lifetime" = "Живот";
"%d%% off" = "%d%% намаление";
"Continue" = "продължи";
"Default_offer_details_with_intro_offer" = "Започнете своя пробен период от {{ sub_offer_duration }}, след което {{ total_price_and_per_month }}.";
2 changes: 2 additions & 0 deletions RevenueCatUI/Resources/ca.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,5 @@
"Weekly" = "Setmanalment";
"Lifetime" = "Tota una vida";
"%d%% off" = "%d%% de descompte";
"Continue" = "Continua";
"Default_offer_details_with_intro_offer" = "Inicieu la vostra prova de {{ sub_offer_duration }} i després {{ total_price_and_per_month }}.";
2 changes: 2 additions & 0 deletions RevenueCatUI/Resources/cs.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,5 @@
"Weekly" = "Týdně";
"Lifetime" = "Život";
"%d%% off" = "%d%% sleva";
"Continue" = "Pokračovat";
"Default_offer_details_with_intro_offer" = "Začněte {{ sub_offer_duration }} zkušební období, poté {{ total_price_and_per_month }}.";
2 changes: 2 additions & 0 deletions RevenueCatUI/Resources/da.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,5 @@
"Weekly" = "Ugentlig";
"Lifetime" = "Livstid";
"%d%% off" = "%d%% rabat";
"Continue" = "Blive ved";
"Default_offer_details_with_intro_offer" = "Start din prøveperiode på {{ sub_offer_duration }} og derefter {{ total_price_and_per_month }}.";
2 changes: 2 additions & 0 deletions RevenueCatUI/Resources/de.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,5 @@
"Weekly" = "Wöchentlich";
"Lifetime" = "Lebensdauer";
"%d%% off" = "%d %% Rabatt";
"Continue" = "Weitermachen";
"Default_offer_details_with_intro_offer" = "Starten Sie Ihre Testversion für {{ sub_offer_duration }} und dann für {{ total_price_and_per_month }}.";
2 changes: 2 additions & 0 deletions RevenueCatUI/Resources/el.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,5 @@
"Weekly" = "Εβδομαδιαίος";
"Lifetime" = "Διάρκεια Ζωής";
"%d%% off" = "Έκπτωση %d%%";
"Continue" = "Να συνεχίσει";
"Default_offer_details_with_intro_offer" = "Ξεκινήστε τη δοκιμή {{ sub_offer_duration }} και μετά {{ total_price_and_per_month }}.";
2 changes: 2 additions & 0 deletions RevenueCatUI/Resources/en.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,5 @@
"Weekly" = "Weekly";
"Lifetime" = "Lifetime";
"%d%% off" = "%d%% off";
"Continue" = "Continue";
"Default_offer_details_with_intro_offer" = "Start your {{ sub_offer_duration }} trial, then {{ total_price_and_per_month }}.";
2 changes: 2 additions & 0 deletions RevenueCatUI/Resources/en_AU.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,5 @@
"Weekly" = "Weekly";
"Lifetime" = "Lifetime";
"%d%% off" = "%d%% off";
"Continue" = "Continue";
"Default_offer_details_with_intro_offer" = "Start your {{ sub_offer_duration }} trial, then {{ total_price_and_per_month }}.";
2 changes: 2 additions & 0 deletions RevenueCatUI/Resources/en_CA.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,5 @@
"Weekly" = "Weekly";
"Lifetime" = "Lifetime";
"%d%% off" = "%d%% off";
"Continue" = "Continue";
"Default_offer_details_with_intro_offer" = "Start your {{ sub_offer_duration }} trial, then {{ total_price_and_per_month }}.";
2 changes: 2 additions & 0 deletions RevenueCatUI/Resources/en_GB.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,5 @@
"Weekly" = "Weekly";
"Lifetime" = "Lifetime";
"%d%% off" = "%d%% off";
"Continue" = "Continue";
"Default_offer_details_with_intro_offer" = "Start your {{ sub_offer_duration }} trial, then {{ total_price_and_per_month }}.";
2 changes: 2 additions & 0 deletions RevenueCatUI/Resources/en_US.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,5 @@
"Weekly" = "Weekly";
"Lifetime" = "Lifetime";
"%d%% off" = "%d%% off";
"Continue" = "Continue";
"Default_offer_details_with_intro_offer" = "Start your {{ sub_offer_duration }} trial, then {{ total_price_and_per_month }}.";
2 changes: 2 additions & 0 deletions RevenueCatUI/Resources/es_419.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,5 @@
"Weekly" = "Semanalmente";
"Lifetime" = "Toda la vida";
"%d%% off" = "%d%% de descuento";
"Continue" = "Continuar";
"Default_offer_details_with_intro_offer" = "{{ sub_offer_duration }} gratis y luego {{ total_price_and_per_month }}.";
2 changes: 2 additions & 0 deletions RevenueCatUI/Resources/es_ES.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,5 @@
"Weekly" = "Semanalmente";
"Lifetime" = "Toda la vida";
"%d%% off" = "%d%% de descuento";
"Continue" = "Continuar";
"Default_offer_details_with_intro_offer" = "{{ sub_offer_duration }} gratis y luego {{ total_price_and_per_month }}.";
2 changes: 2 additions & 0 deletions RevenueCatUI/Resources/fi.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,5 @@
"Weekly" = "Viikoittain";
"Lifetime" = "Elinikä";
"%d%% off" = "%d%% alennus";
"Continue" = "Jatkaa";
"Default_offer_details_with_intro_offer" = "Aloita {{ sub_offer_duration }} -kokeilu ja sitten {{ total_price_and_per_month }}.";
2 changes: 2 additions & 0 deletions RevenueCatUI/Resources/fr_CA.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,5 @@
"Weekly" = "Hebdomadaire";
"Lifetime" = "Durée de vie";
"%d%% off" = "%d%% de réduction";
"Continue" = "Continuer";
"Default_offer_details_with_intro_offer" = "Démarrez votre essai de {{ sub_offer_duration }}, puis de {{ total_price_and_per_month }}.";
2 changes: 2 additions & 0 deletions RevenueCatUI/Resources/he.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,5 @@
"Weekly" = "שְׁבוּעִי";
"Lifetime" = "לכל החיים";
"%d%% off" = "%d%% הנחה";
"Continue" = "לְהַמשִׁיך";
"Default_offer_details_with_intro_offer" = "התחל את תקופת הניסיון של {{ sub_offer_duration }} ולאחר מכן {{ total_price_and_per_month }}.";
2 changes: 2 additions & 0 deletions RevenueCatUI/Resources/hi.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,5 @@
"Weekly" = "साप्ताहिक";
"Lifetime" = "जीवनभर";
"%d%% off" = "%d%% छूट";
"Continue" = "जारी रखना";
"Default_offer_details_with_intro_offer" = "अपना {{sub_offer_duration }} परीक्षण शुरू करें, फिर {{ total_price_and_per_month }}।";
2 changes: 2 additions & 0 deletions RevenueCatUI/Resources/hr.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,5 @@
"Weekly" = "Tjedni";
"Lifetime" = "Doživotno";
"%d%% off" = "%d%% popusta";
"Continue" = "Nastaviti";
"Default_offer_details_with_intro_offer" = "Započnite probno razdoblje od {{ sub_offer_duration }}, a zatim {{ total_price_and_per_month }}.";
2 changes: 2 additions & 0 deletions RevenueCatUI/Resources/hu.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,5 @@
"Weekly" = "Heti";
"Lifetime" = "Élettartam";
"%d%% off" = "%d%% kedvezménnyel";
"Continue" = "Folytatni";
"Default_offer_details_with_intro_offer" = "Indítsa el a {{ sub_offer_duration }} próbaidőszakot, majd {{ total_price_and_per_month }}.";
2 changes: 2 additions & 0 deletions RevenueCatUI/Resources/id.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,5 @@
"Weekly" = "Mingguan";
"Lifetime" = "Seumur hidup";
"%d%% off" = "Diskon %d%%";
"Continue" = "Melanjutkan";
"Default_offer_details_with_intro_offer" = "Mulai uji coba {{ sub_offer_duration }} Anda, lalu {{ total_price_and_per_month }}.";
2 changes: 2 additions & 0 deletions RevenueCatUI/Resources/it.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,5 @@
"Weekly" = "settimanalmente";
"Lifetime" = "Tutta la vita";
"%d%% off" = "Sconto del %d%%";
"Continue" = "Continua";
"Default_offer_details_with_intro_offer" = "Inizia la tua prova di {{ sub_offer_duration }}, poi {{ total_price_and_per_month }}.";
2 changes: 2 additions & 0 deletions RevenueCatUI/Resources/ja.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,5 @@
"Weekly" = "毎週";
"Lifetime" = "一生";
"%d%% off" = "%d%%オフ";
"Continue" = "続く";
"Default_offer_details_with_intro_offer" = "{{ sub_offer_duration }} トライアルを開始してから、{{ total_price_and_per_month }} を開始してください。";
2 changes: 2 additions & 0 deletions RevenueCatUI/Resources/kk.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,5 @@
"Weekly" = "Апта сайын";
"Lifetime" = "Өмір кезеңі";
"%d%% off" = "%d%% жеңілдік";
"Continue" = "Жалғастыру";
"Default_offer_details_with_intro_offer" = "{{ sub_offer_duration }} сынақ нұсқасын бастаңыз, содан кейін {{ total_price_and_per_month }}.";
2 changes: 2 additions & 0 deletions RevenueCatUI/Resources/ko.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,5 @@
"Weekly" = "주간";
"Lifetime" = "일생";
"%d%% off" = "%d%% 할인";
"Continue" = "계속하다";
"Default_offer_details_with_intro_offer" = "{{ sub_offer_duration }} 무료 체험을 시작한 후 {{ total_price_and_per_month }}를 시작하세요.";
2 changes: 2 additions & 0 deletions RevenueCatUI/Resources/ms.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,5 @@
"Weekly" = "Setiap minggu";
"Lifetime" = "Seumur hidup";
"%d%% off" = "%d%% diskaun";
"Continue" = "teruskan";
"Default_offer_details_with_intro_offer" = "Mulakan percubaan {{ sub_offer_duration }} anda, kemudian {{ total_price_and_per_month }}.";
2 changes: 2 additions & 0 deletions RevenueCatUI/Resources/nl.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,5 @@
"Weekly" = "Wekelijks";
"Lifetime" = "Levenslang";
"%d%% off" = "%d%% korting";
"Continue" = "Doorgaan";
"Default_offer_details_with_intro_offer" = "Start uw proefperiode van {{ sub_offer_duration }} en daarna {{ total_price_and_per_month }}.";
2 changes: 2 additions & 0 deletions RevenueCatUI/Resources/no.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,5 @@
"Weekly" = "Ukentlig";
"Lifetime" = "Livstid";
"%d%% off" = "%d %% rabatt";
"Continue" = "Fortsette";
"Default_offer_details_with_intro_offer" = "Start prøveperioden på {{ sub_offer_duration }}, og deretter {{ total_price_and_per_month }}.";
2 changes: 2 additions & 0 deletions RevenueCatUI/Resources/pl.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,5 @@
"Weekly" = "Co tydzień";
"Lifetime" = "Dożywotni";
"%d%% off" = "%d%% zniżki";
"Continue" = "Kontynuować";
"Default_offer_details_with_intro_offer" = "Rozpocznij okres próbny {{ sub_offer_duration }}, a następnie {{ total_price_and_per_month }}.";
2 changes: 2 additions & 0 deletions RevenueCatUI/Resources/pt_BR.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,5 @@
"Weekly" = "Semanalmente";
"Lifetime" = "Vida";
"%d%% off" = "%d%% de desconto";
"Continue" = "Continuar";
"Default_offer_details_with_intro_offer" = "Comece sua avaliação de {{ sub_offer_duration }} e depois {{ total_price_and_per_month }}.";
2 changes: 2 additions & 0 deletions RevenueCatUI/Resources/pt_PT.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,5 @@
"Weekly" = "Semanalmente";
"Lifetime" = "Vida";
"%d%% off" = "%d%% de desconto";
"Continue" = "Continuar";
"Default_offer_details_with_intro_offer" = "Comece sua avaliação de {{ sub_offer_duration }} e depois {{ total_price_and_per_month }}.";
2 changes: 2 additions & 0 deletions RevenueCatUI/Resources/ro.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,5 @@
"Weekly" = "Săptămânal";
"Lifetime" = "Durata de viață";
"%d%% off" = "%d%% reducere";
"Continue" = "Continua";
"Default_offer_details_with_intro_offer" = "Începeți perioada de încercare de {{ sub_offer_duration }}, apoi {{ total_price_and_per_month }}.";
2 changes: 2 additions & 0 deletions RevenueCatUI/Resources/ru.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,5 @@
"Weekly" = "Еженедельно";
"Lifetime" = "Продолжительность жизни";
"%d%% off" = "Скидка %d%%";
"Continue" = "Продолжать";
"Default_offer_details_with_intro_offer" = "Начните пробную версию {{ sub_offer_duration }}, затем {{ total_price_and_per_month }}.";
2 changes: 2 additions & 0 deletions RevenueCatUI/Resources/sk.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,5 @@
"Weekly" = "Týždenne";
"Lifetime" = "Život";
"%d%% off" = "%d%% zľava";
"Continue" = "ďalej";
"Default_offer_details_with_intro_offer" = "Začnite skúšobnú verziu {{ sub_offer_duration }}, potom {{ total_price_and_per_month }}.";
2 changes: 2 additions & 0 deletions RevenueCatUI/Resources/sv.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,5 @@
"Weekly" = "Varje vecka";
"Lifetime" = "Livstid";
"%d%% off" = "%d%% rabatt";
"Continue" = "Fortsätta";
"Default_offer_details_with_intro_offer" = "Starta din provperiod på {{ sub_offer_duration }} och sedan {{ total_price_and_per_month }}.";
2 changes: 2 additions & 0 deletions RevenueCatUI/Resources/th.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,5 @@
"Weekly" = "รายสัปดาห์";
"Lifetime" = "อายุการใช้งาน";
"%d%% off" = "ลด %d%%";
"Continue" = "ดำเนินการต่อ";
"Default_offer_details_with_intro_offer" = "เริ่มทดลองใช้ {{ sub_offer_duration }} จากนั้นจ่ายเป็น {{ Total_price_and_per_month }}";
2 changes: 2 additions & 0 deletions RevenueCatUI/Resources/tr.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,5 @@
"Weekly" = "Haftalık";
"Lifetime" = "Ömür";
"%d%% off" = "%%d%% indirim";
"Continue" = "Devam etmek";
"Default_offer_details_with_intro_offer" = "{{ sub_offer_duration }} denemenizi başlatın, ardından {{ total_price_and_per_month }}.";
2 changes: 2 additions & 0 deletions RevenueCatUI/Resources/uk.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,5 @@
"Weekly" = "Щотижня";
"Lifetime" = "Час життя";
"%d%% off" = "Знижка %d%%";
"Continue" = "Продовжити";
"Default_offer_details_with_intro_offer" = "Розпочніть {{ sub_offer_duration }} пробний період, а потім {{ total_price_and_per_month }}.";
2 changes: 2 additions & 0 deletions RevenueCatUI/Resources/vi.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,5 @@
"Weekly" = "hàng tuần";
"Lifetime" = "Cả đời";
"%d%% off" = "giảm giá %d%%";
"Continue" = "Tiếp tục";
"Default_offer_details_with_intro_offer" = "Bắt đầu dùng thử {{ sub_offer_duration }}, sau đó là {{ Total_price_and_per_month }}.";
2 changes: 2 additions & 0 deletions RevenueCatUI/Resources/zh-Hans.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,5 @@
"Weekly" = "每周";
"Lifetime" = "寿命";
"%d%% off" = "%d%%折";
"Continue" = "继续";
"Default_offer_details_with_intro_offer" = "开始 {{ sub_offer_duration }} 试用,然后 {{total_price_and_per_month }}。";
2 changes: 2 additions & 0 deletions RevenueCatUI/Resources/zh_HK.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,5 @@
"Weekly" = "每週";
"Lifetime" = "壽命";
"%d%% off" = "%d%%折";
"Continue" = "繼續";
"Default_offer_details_with_intro_offer" = "開始 {{ sub_offer_duration }} 試用,然後 {{total_price_and_per_month }}。";
2 changes: 2 additions & 0 deletions RevenueCatUI/Resources/zh_TW.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,5 @@
"Weekly" = "每週";
"Lifetime" = "壽命";
"%d%% off" = "%d%%折";
"Continue" = "繼續";
"Default_offer_details_with_intro_offer" = "開始 {{ sub_offer_duration }} 試用,然後 {{total_price_and_per_month }}。";
2 changes: 1 addition & 1 deletion RevenueCatUI/Views/LoadingPaywallView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ struct LoadingPaywallView: View {
}

private static let template: PaywallTemplate = PaywallData.defaultTemplate
private static let defaultPaywall: PaywallData = .createDefault(with: Self.packages)
private static let defaultPaywall: PaywallData = .createDefault(with: Self.packages, locale: .current)

private static let paywall: PaywallData = {
var paywall: PaywallData = Self.defaultPaywall
Expand Down
Loading

0 comments on commit eccddc0

Please sign in to comment.