Clickable dev link

This commit is contained in:
Kylmakalle 2025-03-08 01:22:51 +02:00
parent 5cef50c2f4
commit 26b4d1bfe5
3 changed files with 24 additions and 4 deletions

View File

@ -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()
}
}

View File

@ -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)")

View File

@ -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.";