diff --git a/Swiftgram/SGPayWall/Sources/SGPayWall.swift b/Swiftgram/SGPayWall/Sources/SGPayWall.swift index d3958f9415..10ba8506a4 100644 --- a/Swiftgram/SGPayWall/Sources/SGPayWall.swift +++ b/Swiftgram/SGPayWall/Sources/SGPayWall.swift @@ -236,7 +236,7 @@ struct SGPayWallView: View { .onReceive(validationErrorPub) { notification in if state == .validating { if let userInfo = notification.userInfo, let error = userInfo["error"] as? String, !error.isEmpty { - showErrorAlert(error) + showErrorAlert(error.i18n(lang)) } else { showErrorAlert("PayWall.ValidationError".i18n(lang)) } @@ -361,8 +361,18 @@ struct SGPayWallView: View { HStack { Text("PayWall.About.Notice".i18n(lang)) - .font(.subheadline) - .foregroundColor(.secondary) + .font(.subheadline) + .foregroundColor(.secondary) + Spacer() + } + HStack { + Button(action: { + openUrl("PayWall.About.SignatureURL".i18n(lang)) + }) { + Text("PayWall.About.Signature".i18n(lang)) + .font(.caption) + .foregroundColor(Color(hex: accentColorHex)) + } Spacer() } } diff --git a/Swiftgram/SGStrings/Sources/LocalizationManager.swift b/Swiftgram/SGStrings/Sources/LocalizationManager.swift index bbaef436ac..331586aa41 100644 --- a/Swiftgram/SGStrings/Sources/LocalizationManager.swift +++ b/Swiftgram/SGStrings/Sources/LocalizationManager.swift @@ -65,6 +65,12 @@ public class SGLocalizationManager { } public func downloadLocale(_ locale: String) { + #if DEBUG + SGLogger.shared.log("Strings", "DEBUG ignoring locale download: \(locale)") + if ({ return true }()) { + return + } + #endif let sanitizedLocale = self.sanitizeLocale(locale) guard let url = URL(string: self.getStringsUrl(for: sanitizedLocale)) else { SGLogger.shared.log("Strings", "Invalid URL for locale: \(sanitizedLocale)") diff --git a/Swiftgram/SGStrings/Strings/en.lproj/SGLocalizable.strings b/Swiftgram/SGStrings/Strings/en.lproj/SGLocalizable.strings index c4ec243b99..ba92059e9c 100644 --- a/Swiftgram/SGStrings/Strings/en.lproj/SGLocalizable.strings +++ b/Swiftgram/SGStrings/Strings/en.lproj/SGLocalizable.strings @@ -207,7 +207,10 @@ "PayWall.AppIcons.Notice" = "Customize Swiftgram look on your home screen."; "PayWall.About.Title" = "About Swiftgram Pro"; -"PayWall.About.Notice" = "Free version of Swiftgram provides dozens of features and improvements over Telegram app. Innovating and keeping Swiftgram in sync with monthly Telegram updates is a huge effort that requires a lot of time and expensive hardware.\n\nSwiftgram is an open-source app that respects your privacy and doesn't bother you with ads. Subscribing to Swiftgram Pro you get access to exclusive features and support an independent developer.\n\n- @Kylmakalle"; +"PayWall.About.Notice" = "Free version of Swiftgram provides dozens of features and improvements over Telegram app. Innovating and keeping Swiftgram in sync with monthly Telegram updates is a huge effort that requires a lot of time and expensive hardware.\n\nSwiftgram is an open-source app that respects your privacy and doesn't bother you with ads. Subscribing to Swiftgram Pro you get access to exclusive features and support an independent developer."; +"PayWall.About.Signature" = "@Kylmakalle"; +/* DO NOT TRANSLATE */ +"PayWall.About.SignatureURL" = "https://t.me/Kylmakalle"; "PayWall.RestorePurchases" = "Restore Purchases"; "PayWall.Terms" = "Terms of Service"; @@ -228,3 +231,4 @@ "Paywall.Error.Title" = "Error"; "PayWall.ValidationError" = "Validation Error"; "PayWall.ValidationError.TryAgain" = "Something went wrong during purchase validation. No worries! Try to Restore Purchases a bit later."; +"PayWall.ValidationError.Expired" = "Your subscription expired. Subscribe again to regain access to Pro features.";