taler-ios

iOS apps for GNU Taler (wallet)
Log | Files | Refs | README | LICENSE

commit 34af304c504a2e1623494774f370c5b0eb684c39
parent 1fea7a7662e3bced8212c4c6c0b1299740d65ef0
Author: Marc Stibane <marc@taler.net>
Date:   Wed,  9 Jul 2025 00:50:40 +0200

legitimization

Diffstat:
MTalerWallet1/Model/Transaction.swift | 6++++--
MTalerWallet1/Resources/Localizable.xcstrings | 154+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++----
MTalerWallet1/Views/Balances/BalancesPendingRowV.swift | 2+-
MTalerWallet1/Views/Main/MainView.swift | 6+++---
MTalerWallet1/Views/Settings/Bank/BankEditView.swift | 2+-
MTalerWallet1/Views/Transactions/TransactionRowView.swift | 2+-
MTalerWallet1/Views/Transactions/TransactionSummaryV.swift | 12++++++++----
7 files changed, 165 insertions(+), 19 deletions(-)

diff --git a/TalerWallet1/Model/Transaction.swift b/TalerWallet1/Model/Transaction.swift @@ -25,6 +25,7 @@ enum TransactionMinorState: String, Codable { case deposit case aml // AmlRequired case kyc // KycRequired + case kycInit = "kyc-init" case kycAuthRequired = "kyc-auth" case balanceKyc = "balance-kyc" // show kycUrl case balanceKycInit = "balance-kyc-init" // kycUrl not yet ready @@ -67,8 +68,8 @@ enum TransactionMinorState: String, Codable { case .deposit: return self.rawValue case .aml: return String(localized: "MinorState.aml", defaultValue: "AML required", comment: "TxMinorState heading") case .balanceKyc, .balanceKycInit, - .kycAuthRequired, - .kyc, .mergeKycRequired: return String(localized: "MinorState.kyc", defaultValue: "KYC required", comment: "TxMinorState heading") + .kycAuthRequired, .kycInit, + .kyc, .mergeKycRequired: return String(localized: "MinorState.kyc", defaultValue: "Legitimization required", comment: "TxMinorState heading") case .track: return self.rawValue case .submitPayment: return self.rawValue case .rebindSession: return self.rawValue @@ -171,6 +172,7 @@ struct TransactionState: Codable, Hashable { var isReady: Bool { minor == .ready } var isKYC: Bool { minor == .kyc + || minor == .kycInit || minor == .balanceKyc || minor == .mergeKycRequired } var isKYCauth: Bool { minor == .kycAuthRequired } diff --git a/TalerWallet1/Resources/Localizable.xcstrings b/TalerWallet1/Resources/Localizable.xcstrings @@ -58,6 +58,23 @@ } } }, + ". Legitimization required" : { + "comment" : "a11y", + "localizations" : { + "de" : { + "stringUnit" : { + "state" : "translated", + "value" : ". Legitimierung erforderlich" + } + }, + "pl" : { + "stringUnit" : { + "state" : "translated", + "value" : ". Wymagany legitymizacja" + } + } + } + }, ". Needs bank authorization" : { "comment" : "a11y", "localizations" : { @@ -118,6 +135,7 @@ }, ". Needs K Y C" : { "comment" : "a11y", + "extractionState" : "stale", "localizations" : { "de" : { "stringUnit" : { @@ -4448,6 +4466,7 @@ } }, "If you change the account holder name or the IBAN, you may have to perform the KYC procedure again." : { + "extractionState" : "stale", "localizations" : { "de" : { "stringUnit" : { @@ -4469,6 +4488,22 @@ } } }, + "If you change the account holder name or the IBAN, you may have to perform the legitimization procedure again." : { + "localizations" : { + "de" : { + "stringUnit" : { + "state" : "translated", + "value" : "Wenn Sie den Kontoinhaber oder die IBAN ändern, müssen sie evtl. die Legitimierung wiederholen." + } + }, + "pl" : { + "stringUnit" : { + "state" : "translated", + "value" : "W przypadku zmiany nazwy posiadacza konta lub numeru IBAN konieczne może być ponowne przeprowadzenie procedury legitymizacji." + } + } + } + }, "If your banking software runs on another device, you can scan one of these QR codes:" : { "localizations" : { "de" : { @@ -4611,6 +4646,7 @@ } }, "KYC" : { + "extractionState" : "stale", "localizations" : { "de" : { "stringUnit" : { @@ -4689,6 +4725,39 @@ } } }, + "Legitimization" : { + "localizations" : { + "de" : { + "stringUnit" : { + "state" : "translated", + "value" : "Legitimierung" + } + }, + "pl" : { + "stringUnit" : { + "state" : "translated", + "value" : "Legitymizacja" + } + } + } + }, + "Legitimization procedure required" : { + "comment" : "KYC", + "localizations" : { + "de" : { + "stringUnit" : { + "state" : "translated", + "value" : "Legitimierungsverfahren erforderlich" + } + }, + "pl" : { + "stringUnit" : { + "state" : "translated", + "value" : "Wymagana procedura legitymizacji" + } + } + } + }, "LinkTitle_DEMOBANK" : { "extractionState" : "extracted_with_value", "localizations" : { @@ -5396,30 +5465,30 @@ "de" : { "stringUnit" : { "state" : "translated", - "value" : "KYC benötigt" + "value" : "Legitimierung erforderlich" } }, "en" : { "stringUnit" : { "state" : "new", - "value" : "KYC required" + "value" : "Legitimization required" } }, "es" : { "stringUnit" : { - "state" : "translated", + "state" : "needs_review", "value" : "Requiere KYC" } }, "pl" : { "stringUnit" : { "state" : "translated", - "value" : "Wymagany KYC" + "value" : "Wymagany legitymizacja" } }, "uk" : { "stringUnit" : { - "state" : "translated", + "state" : "needs_review", "value" : "Потрібна перевірка KYC" } } @@ -6532,6 +6601,7 @@ } }, "Open KYC website" : { + "extractionState" : "stale", "localizations" : { "de" : { "stringUnit" : { @@ -6559,6 +6629,23 @@ } } }, + "Open legitimization website" : { + "comment" : "KYC", + "localizations" : { + "de" : { + "stringUnit" : { + "state" : "translated", + "value" : "Legitimierungs-Webseite öffnen" + } + }, + "pl" : { + "stringUnit" : { + "state" : "translated", + "value" : "Otwórz stronę legitymizacji" + } + } + } + }, "Open merchant website" : { "localizations" : { "de" : { @@ -9188,11 +9275,12 @@ } }, "Tap the button to go to the KYC website." : { + "extractionState" : "stale", "localizations" : { "de" : { "stringUnit" : { "state" : "translated", - "value" : "Tippen Sie die Taste um auf die KYC Webseite zu gehen." + "value" : "Tippen Sie um auf die Legitimierungs-Webseite zu gehen." } }, "es" : { @@ -9215,6 +9303,22 @@ } } }, + "Tap the button to go to the legitimization website." : { + "localizations" : { + "de" : { + "stringUnit" : { + "state" : "translated", + "value" : "Tippen Sie um auf die Legitimierungs-Webseite zu gehen." + } + }, + "pl" : { + "stringUnit" : { + "state" : "translated", + "value" : "Naciśnij przycisk, aby przejść do strony legitymizacji." + } + } + } + }, "Terms of Service" : { "localizations" : { "de" : { @@ -10964,11 +11068,12 @@ }, "Will go to KYC website to permit this withdrawal." : { "comment" : "a11y", + "extractionState" : "stale", "localizations" : { "de" : { "stringUnit" : { "state" : "translated", - "value" : "Geht zur KYC-Webseite um diese Abhebung zu erlauben." + "value" : "Geht zur Legitimierung-Webseite um diese Abhebung zu erlauben." } }, "es" : { @@ -10991,6 +11096,23 @@ } } }, + "Will go to legitimization website to permit this withdrawal." : { + "comment" : "a11y", + "localizations" : { + "de" : { + "stringUnit" : { + "state" : "translated", + "value" : "Geht zur Legitimierung-Webseite um diese Abhebung zu erlauben." + } + }, + "pl" : { + "stringUnit" : { + "state" : "translated", + "value" : "Przejdź do strony legitymizacji, aby zezwolić na tę wypłatę." + } + } + } + }, "Will go to main transactions list." : { "comment" : "a11y", "localizations" : { @@ -11674,6 +11796,7 @@ } }, "You need to pass a KYC procedure." : { + "extractionState" : "stale", "localizations" : { "de" : { "stringUnit" : { @@ -11701,6 +11824,23 @@ } } }, + "You need to pass a legitimization procedure." : { + "comment" : "KYC", + "localizations" : { + "de" : { + "stringUnit" : { + "state" : "translated", + "value" : "Sie müssen ein Legitimierungsverfahren durchlaufen." + } + }, + "pl" : { + "stringUnit" : { + "state" : "translated", + "value" : "Musisz przejść procedurę legitymizacji." + } + } + } + }, "You need to transfer %@ from your regular bank account to the payment service to receive %@ as electronic cash in this wallet." : { "localizations" : { "de" : { diff --git a/TalerWallet1/Views/Balances/BalancesPendingRowV.swift b/TalerWallet1/Views/Balances/BalancesPendingRowV.swift @@ -27,7 +27,7 @@ struct BalancesPendingRowV: View { let needsKYCout = balance.flags.contains(.outgoingKyc) let shouldConfirm = balance.flags.contains(.incomingConfirmation) let needsKYC = needsKYCin || needsKYCout - let needsKYCStr = String(localized: ". Needs K Y C", comment: "a11y") + let needsKYCStr = String(localized: ". Legitimization required", comment: "a11y") let needsConfStr = String(localized: ". Needs bank confirmation", comment: "a11y") VStack(spacing: 6) { diff --git a/TalerWallet1/Views/Main/MainView.swift b/TalerWallet1/Views/Main/MainView.swift @@ -359,7 +359,7 @@ extension MainView { @State private var iconID: String? = nil private var openKycButton: some View { - Button("KYC") { + Button("Legitimization") { showKycAlert = false if let kycURI { UIApplication.shared.open(kycURI) @@ -544,11 +544,11 @@ extension MainView { } } } - .alert("You need to pass a KYC procedure.", + .alert("You need to pass a legitimization procedure.", isPresented: $showKycAlert, actions: { openKycButton dismissAlertButton }, - message: { Text("Tap the button to go to the KYC website.") }) + message: { Text("Tap the button to go to the legitimization website.") }) .onNotification(.BalanceChange) { notification in logger.info(".onNotification(.BalanceChange) ==> reload balances") shouldReloadBalances += 1 diff --git a/TalerWallet1/Views/Settings/Bank/BankEditView.swift b/TalerWallet1/Views/Settings/Bank/BankEditView.swift @@ -118,7 +118,7 @@ struct BankEditView: View { List { if kycCompleted // || true { Section { - Text("If you change the account holder name or the IBAN, you may have to perform the KYC procedure again.") + Text("If you change the account holder name or the IBAN, you may have to perform the legitimization procedure again.") .talerFont(.body) } } diff --git a/TalerWallet1/Views/Transactions/TransactionRowView.swift b/TalerWallet1/Views/Transactions/TransactionRowView.swift @@ -277,7 +277,7 @@ struct TransactionRowView: View { } .accessibilityElement(children: .combine) .accessibilityValue(!doneOrPending ? EMPTYSTRING - : needsKYC ? String(localized: ". Needs K Y C", comment: "a11y") + : needsKYC ? String(localized: ". Legitimization required", comment: "a11y") : shouldConfirm ? String(localized: ". Needs bank authorization", comment: "a11y") : EMPTYSTRING) .accessibilityHint(String(localized: "Will go to detail view.", comment: "a11y")) diff --git a/TalerWallet1/Views/Transactions/TransactionSummaryV.swift b/TalerWallet1/Views/Transactions/TransactionSummaryV.swift @@ -290,9 +290,9 @@ struct TransactionSummaryV: View { if let kycUrl { if let destination = URL(string: kycUrl) { LinkButton(destination: destination, - hintTitle: String(localized: "You need to pass a KYC procedure."), - buttonTitle: String(localized: "Open KYC website"), - a11yHint: String(localized: "Will go to KYC website to permit this withdrawal.", comment: "a11y"), + hintTitle: String(localized: "You need to pass a legitimization procedure.", comment: "KYC"), + buttonTitle: String(localized: "Open legitimization website", comment: "KYC"), + a11yHint: String(localized: "Will go to legitimization website to permit this withdrawal.", comment: "a11y"), badge: NEEDS_KYC) } } @@ -401,7 +401,11 @@ struct TransactionSummaryV: View { var body: some View { let common = transaction.common if transaction.isPendingKYC { - KYCbutton(kycUrl: common.kycUrl) + if let kycUrl = common.kycUrl { + KYCbutton(kycUrl: common.kycUrl) + } else { + Text("Legitimization procedure required", comment: "KYC") + } } let withdrawalDetails = details.withdrawalDetails switch withdrawalDetails.type {