From 7204ddd90e59ebf4526eb83cde11e3a9de34d695 Mon Sep 17 00:00:00 2001 From: dankito Date: Thu, 3 Sep 2020 11:50:56 +0200 Subject: [PATCH] Removed 'This cannot be undone and data will be lost.', only discourages user --- ui/BankingiOSApp/BankingiOSApp.xcodeproj/project.pbxproj | 4 ++++ ui/BankingiOSApp/BankingiOSApp/Base.lproj/Localizable.strings | 4 ++-- ui/BankingiOSApp/BankingiOSApp/de.lproj/Localizable.strings | 4 ++-- ui/BankingiOSApp/BankingiOSApp/ui/Messages.swift | 4 ++-- ui/BankingiOSApp/BankingiOSApp/ui/views/BankListItem.swift | 4 ++-- 5 files changed, 12 insertions(+), 8 deletions(-) diff --git a/ui/BankingiOSApp/BankingiOSApp.xcodeproj/project.pbxproj b/ui/BankingiOSApp/BankingiOSApp.xcodeproj/project.pbxproj index 22bfde45..ac5e8773 100644 --- a/ui/BankingiOSApp/BankingiOSApp.xcodeproj/project.pbxproj +++ b/ui/BankingiOSApp/BankingiOSApp.xcodeproj/project.pbxproj @@ -72,6 +72,7 @@ 36C4009824D23580005227AD /* SwiftBankIconFinderTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 36C4009724D23580005227AD /* SwiftBankIconFinderTest.swift */; }; 36C4009B24D2F9E4005227AD /* IconedTitleView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 36C4009A24D2F9E4005227AD /* IconedTitleView.swift */; }; 36C4009D24D3236B005227AD /* UrlUtil.swift in Sources */ = {isa = PBXBuildFile; fileRef = 36C4009C24D3236B005227AD /* UrlUtil.swift */; }; + 36D60F7924FFB6F100596ABC /* Messages.swift in Sources */ = {isa = PBXBuildFile; fileRef = 36D60F7824FFB6F100596ABC /* Messages.swift */; }; 36E21ECB24D88DF000649DC8 /* UIKitExtensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 36E21ECA24D88DF000649DC8 /* UIKitExtensions.swift */; }; 36E21ECF24DA0EEE00649DC8 /* IconView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 36E21ECE24DA0EEE00649DC8 /* IconView.swift */; }; 36E21ED124DC540400649DC8 /* SettingsDialog.swift in Sources */ = {isa = PBXBuildFile; fileRef = 36E21ED024DC540400649DC8 /* SettingsDialog.swift */; }; @@ -196,6 +197,7 @@ 36C4009724D23580005227AD /* SwiftBankIconFinderTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = SwiftBankIconFinderTest.swift; path = BankingiOSAppTests/BankIconFinder/SwiftBankIconFinderTest.swift; sourceTree = SOURCE_ROOT; }; 36C4009A24D2F9E4005227AD /* IconedTitleView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = IconedTitleView.swift; sourceTree = ""; }; 36C4009C24D3236B005227AD /* UrlUtil.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UrlUtil.swift; sourceTree = ""; }; + 36D60F7824FFB6F100596ABC /* Messages.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Messages.swift; sourceTree = ""; }; 36E21ECA24D88DF000649DC8 /* UIKitExtensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UIKitExtensions.swift; sourceTree = ""; }; 36E21ECE24DA0EEE00649DC8 /* IconView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = IconView.swift; sourceTree = ""; }; 36E21ED024DC540400649DC8 /* SettingsDialog.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SettingsDialog.swift; sourceTree = ""; }; @@ -418,6 +420,7 @@ 36BCF86224BA5097005BEC29 /* SwiftUiRouter.swift */, 36BCF86D24BA691B005BEC29 /* DependencyInjector.swift */, 36BCF88824C0A7D7005BEC29 /* Message.swift */, + 36D60F7824FFB6F100596ABC /* Messages.swift */, 36BE068824CE288800CBBB68 /* CollapsibleText.swift */, 36BE068A24CE3B0400CBBB68 /* SwiftExtensions.swift */, 36BE068C24CE41E700CBBB68 /* Styles.swift */, @@ -635,6 +638,7 @@ buildActionMask = 2147483647; files = ( 36BE065924CA3CAB00CBBB68 /* UIKitSearchBar.swift in Sources */, + 36D60F7924FFB6F100596ABC /* Messages.swift in Sources */, 36BE06C824D0DE7400CBBB68 /* UIKitTextField.swift in Sources */, 36BE064F24C9A17F00CBBB68 /* ImageTanView.swift in Sources */, 36E21EDB24DC990300649DC8 /* LabelledUIKitTextField.swift in Sources */, diff --git a/ui/BankingiOSApp/BankingiOSApp/Base.lproj/Localizable.strings b/ui/BankingiOSApp/BankingiOSApp/Base.lproj/Localizable.strings index 4ef24a4f..93f8cc00 100644 --- a/ui/BankingiOSApp/BankingiOSApp/Base.lproj/Localizable.strings +++ b/ui/BankingiOSApp/BankingiOSApp/Base.lproj/Localizable.strings @@ -112,8 +112,8 @@ "Unsaved changes" = "Unsaved changes"; "Changed data hasn't been saved. Are you sure you want to discard them?" = "Changed data hasn't been saved. Are you sure you want to discard them?"; -"Delete account?" = "Delete account?"; -"Really delete account '%@'? This cannot be undone and data will be lost." = "Really delete account '%@'?\n\nThis cannot be undone and data will be lost."; +"Really delete account '%@'?" = "Really delete account '%@'?"; +"All data for this account will be permanently deleted locally." = "All data for this account will be permanently deleted locally and can only be restored and can only be restored if you retrieve it again from your bank server."; /* BankAccountSettingsDialog */ diff --git a/ui/BankingiOSApp/BankingiOSApp/de.lproj/Localizable.strings b/ui/BankingiOSApp/BankingiOSApp/de.lproj/Localizable.strings index 8d27fc67..720b6569 100644 --- a/ui/BankingiOSApp/BankingiOSApp/de.lproj/Localizable.strings +++ b/ui/BankingiOSApp/BankingiOSApp/de.lproj/Localizable.strings @@ -112,8 +112,8 @@ "Unsaved changes" = "Nicht gespeicherte Änderungen"; "Changed data hasn't been saved. Are you sure you want to discard them?" = "Es wurden nicht alle Änderungen gespeichert. Sind Sie sich sicher, dass Sie sie verwerfen möchten?"; -"Delete account?" = "Konto löschen?"; -"Really delete account '%@'? This cannot be undone and data will be lost." = "Möchten Sie das Konto '%@' wirklich löschen?\n\nDies kann nicht rückgängig gemacht werden und alle zu diesem Konto gespeicherten Daten gehen unwiederbringlich verloren."; +"Really delete account '%@'?" = "Möchten Sie das Konto '%@' wirklich löschen?"; +"All data for this account will be permanently deleted locally." = "Alle Daten zu diesem Konto werden lokal vollständig gelöscht.\n\nZum Wiederhergestellen müssen sie vom Bankserver neu abgeholt werden."; /* BankAccountSettingsDialog */ diff --git a/ui/BankingiOSApp/BankingiOSApp/ui/Messages.swift b/ui/BankingiOSApp/BankingiOSApp/ui/Messages.swift index 609c8e76..dc077755 100644 --- a/ui/BankingiOSApp/BankingiOSApp/ui/Messages.swift +++ b/ui/BankingiOSApp/BankingiOSApp/ui/Messages.swift @@ -12,8 +12,8 @@ extension Message { } static func createAskUserToDeleteAccountMessage(_ bank: Customer, _ deleteAccount: @escaping (Customer) -> Void) -> Message { - return Message(title: Text("Delete account?"), - message: Text("Really delete account '\(bank.displayName)'? This cannot be undone and data will be lost."), + return Message(title: Text("Really delete account '\(bank.displayName)'?"), + message: Text("All data for this account will be permanently deleted locally."), primaryButton: .destructive(Text("Delete"), action: { deleteAccount(bank) } ), secondaryButton: .cancel()) } diff --git a/ui/BankingiOSApp/BankingiOSApp/ui/views/BankListItem.swift b/ui/BankingiOSApp/BankingiOSApp/ui/views/BankListItem.swift index 9220d39f..47af3fc4 100644 --- a/ui/BankingiOSApp/BankingiOSApp/ui/views/BankListItem.swift +++ b/ui/BankingiOSApp/BankingiOSApp/ui/views/BankListItem.swift @@ -49,8 +49,8 @@ struct BankListItem : View { func askUserToDeleteAccount() { // couldn't believe it, .alert() didn't work as SwiftUI resetted @State variable to dislpay it instantly, therefore Alert never got displayed // TODO: use values from Message.createAskUserToDeleteAccountMessage(self.bank, self.deleteAccount) - let alert = UIAlertController(title: "Delete account?".localize(), - message: "Really delete account '%@'? This cannot be undone and data will be lost.".localize(bank.displayName), + let alert = UIAlertController(title: "Really delete account '%@'?".localize(bank.displayName), + message: "All data for this account will be permanently deleted locally.".localize(), preferredStyle: .alert) alert.addAction(UIAlertAction(title: "Delete".localize(), style: .destructive, handler: { _ in self.deleteAccount(self.bank) } ))