taler-ios

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

commit 8f2956d707639404e45669bc70582ba65184bc01
parent da73eff09ab38c098b656f3ea01898e2eb5d58f8
Author: Marc Stibane <marc@taler.net>
Date:   Thu, 11 Dec 2025 18:53:11 +0100

localizedCommand

Diffstat:
MTalerWallet1/Controllers/Controller.swift | 26+++++++++++++++++++++++++-
1 file changed, 25 insertions(+), 1 deletion(-)

diff --git a/TalerWallet1/Controllers/Controller.swift b/TalerWallet1/Controllers/Controller.swift @@ -23,7 +23,7 @@ enum BackendState { case error } -enum UrlCommand { +enum UrlCommand: String, Codable { case unknown case withdraw case withdrawExchange @@ -45,6 +45,30 @@ enum UrlCommand { false } } + + var localizedCommand: String { + switch self { + case .unknown: String(EMPTYSTRING) + case .withdraw, + .withdrawExchange: String(localized: "Withdraw", + comment: "UrlCommand") + case .addExchange: String(localized: "Add Exchange", + comment: "UrlCommand") + case .pay: String(localized: "Pay merchant", + comment: "UrlCommand") + case .payPull: String(localized: "Pay others", + comment: "UrlCommand") + case .payPush: String(localized: "Receive", + comment: "UrlCommand") + case .payTemplate: String(localized: "Pay ...", + comment: "UrlCommand") + case .refund: String(localized: "Refund", + comment: "UrlCommand") +#if GNU_TALER + case .devExperiment: String("DevExperiment") +#endif + } + } } // MARK: -