diff --git a/BankSDK/GiniBankSDK/Sources/GiniBankSDK/Core/DocumentPagesPreview/DocumentPagesViewController.swift b/BankSDK/GiniBankSDK/Sources/GiniBankSDK/Core/DocumentPagesPreview/DocumentPagesViewController.swift index 7605fd6ea..9608c73c0 100644 --- a/BankSDK/GiniBankSDK/Sources/GiniBankSDK/Core/DocumentPagesPreview/DocumentPagesViewController.swift +++ b/BankSDK/GiniBankSDK/Sources/GiniBankSDK/Core/DocumentPagesPreview/DocumentPagesViewController.swift @@ -68,14 +68,16 @@ final class DocumentPagesViewController: UIViewController { private var viewModel: DocumentPagesViewModelProtocol? private let configuration = GiniBankConfiguration.shared private let screenTitle: String? + private let errorButtonTitle: String private var errorView: DocumentPagesErrorView? // Constraints private var contentStackViewTopConstraint: NSLayoutConstraint? // MARK: - Init - init(screenTitle: String? = nil) { + init(screenTitle: String? = nil, errorButtonTitle: String) { self.screenTitle = screenTitle + self.errorButtonTitle = errorButtonTitle super.init(nibName: nil, bundle: nil) } @@ -107,9 +109,7 @@ final class DocumentPagesViewController: UIViewController { func setError(errorType: ErrorType, tryAgainAction: @escaping () -> Void) { let errorView = DocumentPagesErrorView( errorType: errorType, - buttonTitle: NSLocalizedStringPreferredGiniBankFormat( - "ginibank.transactionDocs.preview.error.tryAgain.buttonTitle", - comment: "Try again"), + buttonTitle: errorButtonTitle, buttonAction: { tryAgainAction() self.removeErrorView() diff --git a/BankSDK/GiniBankSDK/Sources/GiniBankSDK/Core/GiniBankNetworkingScreenApiCoordinator.swift b/BankSDK/GiniBankSDK/Sources/GiniBankSDK/Core/GiniBankNetworkingScreenApiCoordinator.swift index e9a7bf85c..c131ee620 100644 --- a/BankSDK/GiniBankSDK/Sources/GiniBankSDK/Core/GiniBankNetworkingScreenApiCoordinator.swift +++ b/BankSDK/GiniBankSDK/Sources/GiniBankSDK/Core/GiniBankNetworkingScreenApiCoordinator.swift @@ -596,7 +596,10 @@ extension GiniBankNetworkingScreenApiCoordinator: SkontoCoordinatorDelegate { } func didTapDocumentPreview(_ coordinator: Coordinator, _ skontoViewModel: SkontoViewModel) { - let viewController = DocumentPagesViewController(screenTitle: SkontoDocumentPagesViewModel.screenTitle) + let errorButtonTitle = SkontoDocumentPagesViewModel.errorButtonTitle + let screenTitle = SkontoDocumentPagesViewModel.screenTitle + let viewController = DocumentPagesViewController(screenTitle: screenTitle, + errorButtonTitle: errorButtonTitle) viewController.modalPresentationStyle = .overCurrentContext screenAPINavigationController.present(viewController, animated: true) diff --git a/BankSDK/GiniBankSDK/Sources/GiniBankSDK/Core/Skonto/Models/SkontoDocumentPagesViewModel.swift b/BankSDK/GiniBankSDK/Sources/GiniBankSDK/Core/Skonto/Models/SkontoDocumentPagesViewModel.swift index 2be3b1fed..fb0147fb3 100644 --- a/BankSDK/GiniBankSDK/Sources/GiniBankSDK/Core/Skonto/Models/SkontoDocumentPagesViewModel.swift +++ b/BankSDK/GiniBankSDK/Sources/GiniBankSDK/Core/Skonto/Models/SkontoDocumentPagesViewModel.swift @@ -27,9 +27,11 @@ final class SkontoDocumentPagesViewModel: DocumentPagesViewModelProtocol { private var expiryDate: Date // Information to be displayed in the screen after highlighting Skonto details - private (set) var processedImages = [UIImage]() + private(set) var processedImages = [UIImage]() static var screenTitle = NSLocalizedStringPreferredGiniBankFormat("ginibank.skonto.document.pages.screen.title", comment: "Skonto discount details") + static var errorButtonTitle = NSLocalizedStringPreferredGiniBankFormat("ginibank.skonto.document.pages.error.buttonTitle", + comment: "Try again") var bottomInfoItems: [String] { return [expiryDateString, withDiscountPriceString, withoutDiscountPriceString] } diff --git a/BankSDK/GiniBankSDK/Sources/GiniBankSDK/Core/TransactionDocs/TransactionDocsViewModel.swift b/BankSDK/GiniBankSDK/Sources/GiniBankSDK/Core/TransactionDocs/TransactionDocsViewModel.swift index 131b5e6f0..d4440eb7a 100644 --- a/BankSDK/GiniBankSDK/Sources/GiniBankSDK/Core/TransactionDocs/TransactionDocsViewModel.swift +++ b/BankSDK/GiniBankSDK/Sources/GiniBankSDK/Core/TransactionDocs/TransactionDocsViewModel.swift @@ -56,7 +56,10 @@ public class TransactionDocsViewModel { func handlePreviewDocument(for documentId: String) { let transactionDoc = transactionDocs.first(where: { $0.documentId == documentId }) let screenTitle = transactionDoc?.fileName ?? "" - let viewController = DocumentPagesViewController(screenTitle: screenTitle) + let errorButtonTitle = NSLocalizedStringPreferredGiniBankFormat( + "ginibank.transactionDocs.preview.error.tryAgain.buttonTitle", + comment: "Try again") + let viewController = DocumentPagesViewController(screenTitle: screenTitle, errorButtonTitle: errorButtonTitle) viewController.modalPresentationStyle = .overCurrentContext documentPagesViewController = viewController presentingViewController?.present(viewController, animated: true) diff --git a/BankSDK/GiniBankSDK/Sources/GiniBankSDK/Resources/de.lproj/Localizable.strings b/BankSDK/GiniBankSDK/Sources/GiniBankSDK/Resources/de.lproj/Localizable.strings index 7442db62d..21926c162 100644 --- a/BankSDK/GiniBankSDK/Sources/GiniBankSDK/Resources/de.lproj/Localizable.strings +++ b/BankSDK/GiniBankSDK/Sources/GiniBankSDK/Resources/de.lproj/Localizable.strings @@ -130,6 +130,7 @@ "ginibank.skonto.help.back" = "Skonto"; "ginibank.skonto.document.pages.screen.title" = "Skonto-Details"; +"ginibank.skonto.document.pages.error.buttonTitle" = "Versuch's nochmal"; // MARK: - Transaction Docs feature "ginibank.transactionDocs.alert.title" = "Fügen Sie der Transaktion einen Anhang hinzu?"; diff --git a/BankSDK/GiniBankSDK/Sources/GiniBankSDK/Resources/en.lproj/Localizable.strings b/BankSDK/GiniBankSDK/Sources/GiniBankSDK/Resources/en.lproj/Localizable.strings index 3efc8d5a5..d1f2647b6 100644 --- a/BankSDK/GiniBankSDK/Sources/GiniBankSDK/Resources/en.lproj/Localizable.strings +++ b/BankSDK/GiniBankSDK/Sources/GiniBankSDK/Resources/en.lproj/Localizable.strings @@ -137,6 +137,7 @@ "ginibank.skonto.help.back" = "Skonto discount"; "ginibank.skonto.document.pages.screen.title" = "Skonto discount details"; +"ginibank.skonto.document.pages.error.buttonTitle" = "Try again"; // MARK: - Transaction Docs feature "ginibank.transactionDocs.alert.title" = "Add an attachment to this transaction?";