Made (hopefully) translations for login, ask user to delete account and that bank is not supported by app better understandable

This commit is contained in:
dankito 2020-10-17 17:52:03 +02:00
parent 5e1bca2007
commit 86d1e5856e
8 changed files with 46 additions and 49 deletions

View File

@ -11,8 +11,8 @@ open class AskDeleteAccountAlert {
open fun show(bank: TypedBankData, presenter: BankingPresenter, context: Context, accountDeleted: (() -> Unit)? = null) { open fun show(bank: TypedBankData, presenter: BankingPresenter, context: Context, accountDeleted: (() -> Unit)? = null) {
AlertDialog.Builder(context) AlertDialog.Builder(context)
.setTitle(context.getString(R.string.alert_ask_delete_account_title, bank.displayName)) .setTitle(context.getString(R.string.alert_ask_delete_account_title))
.setMessage(context.getString(R.string.alert_ask_delete_account_message)) .setMessage(context.getString(R.string.alert_ask_delete_account_message, bank.displayName))
.setPositiveButton(R.string.delete) { dialog, _ -> .setPositiveButton(R.string.delete) { dialog, _ ->
presenter.deleteAccount(bank) presenter.deleteAccount(bank)
dialog.dismiss() dialog.dismiss()

View File

@ -47,10 +47,10 @@
<string name="other">Sonstige</string> <string name="other">Sonstige</string>
<string name="activity_login_authenticate_with_password_prompt">Geben Sie Ihr Passwort ein</string> <string name="activity_login_authenticate_with_password_prompt">Um die App zu entsperren geben Sie bitte Ihr Passwort ein</string>
<string name="activity_login_authenticate_with_password_hint">Passwort eingeben</string> <string name="activity_login_authenticate_with_password_hint">Passwort eingeben</string>
<string name="activity_login_authenticate_with_biometrics_prompt">Um die App zu entsperren authentifizieren Sie sich bitte per Fingerabdruck oder Gesichtserkennung</string>
<string name="activity_login_login_button_title">Anmelden</string> <string name="activity_login_login_button_title">Anmelden</string>
<string name="activity_login_authenticate_with_biometrics_prompt">Authentifizieren Sie sich per Fingerabdruck oder Gesichtserkennung</string>
<string name="activity_login_incorrect_password_entered">Falsches Passwort eingegeben</string> <string name="activity_login_incorrect_password_entered">Falsches Passwort eingegeben</string>
@ -88,7 +88,7 @@
<string name="dialog_add_account_enter_bank">Bank (Suche auch mittels Bankleitzahl oder Ort):</string> <string name="dialog_add_account_enter_bank">Bank (Suche auch mittels Bankleitzahl oder Ort):</string>
<string name="dialog_add_account_add">Hinzufügen</string> <string name="dialog_add_account_add">Hinzufügen</string>
<string name="dialog_add_account_bank_does_not_support_fints_3_error_message">%s untersützt FinTS 3.0 nicht und kann deshalb mit dieser App nicht verwendet werden.</string> <string name="dialog_add_account_bank_does_not_support_fints_3_error_message">%s untersützt FinTS 3.0 nicht und kann deshalb leider mit dieser App nicht verwendet werden.</string>
<string name="dialog_add_account_message_could_not_add_account">Konto konnte nicht hinzugefügt werden.\n\nFehlermeldung Ihrer Bank:\n\n%s</string> <string name="dialog_add_account_message_could_not_add_account">Konto konnte nicht hinzugefügt werden.\n\nFehlermeldung Ihrer Bank:\n\n%s</string>
<string name="dialog_transfer_money_account">Konto:</string> <string name="dialog_transfer_money_account">Konto:</string>
@ -107,7 +107,7 @@
<string name="dialog_transfer_money_message_transfer_successful">%1$s %2$s wurden erfolgreich an %3$s überwiesen.</string> <string name="dialog_transfer_money_message_transfer_successful">%1$s %2$s wurden erfolgreich an %3$s überwiesen.</string>
<string name="dialog_transfer_money_message_transfer_failed">Konnte nicht %1$s %2$s an %3$s überweisen.\n\nFehlermeldung Ihrer Bank:\n\n%4$s</string> <string name="dialog_transfer_money_message_transfer_failed">Konnte nicht %1$s %2$s an %3$s überweisen.\n\nFehlermeldung Ihrer Bank:\n\n%4$s</string>
<string name="transfer_money_from_pdf_error_message_not_a_searchable_pdf">Konnte Text nicht aus Datei "%1$s" extrahieren. Enthält sie auch Text oder nur Bilder?</string> <string name="transfer_money_from_pdf_error_message_not_a_searchable_pdf">Konnte Text nicht aus Datei "%1$s" extrahieren. Enthält die Datei auch Text oder nur Bilder?</string>
<string name="transfer_money_from_pdf_error_message_could_not_extract_text">Text konnte nicht aus Datei "%1$s" extrahiert werden:\n\n%2$s</string> <string name="transfer_money_from_pdf_error_message_could_not_extract_text">Text konnte nicht aus Datei "%1$s" extrahiert werden:\n\n%2$s</string>
<string name="transfer_money_from_pdf_error_message_could_not_extract_invoice_data">Überweisungsdaten konnten aus der Datei "%1$s" nicht ausgelesen werden:\n\n%2$s</string> <string name="transfer_money_from_pdf_error_message_could_not_extract_invoice_data">Überweisungsdaten konnten aus der Datei "%1$s" nicht ausgelesen werden:\n\n%2$s</string>
@ -177,12 +177,11 @@
<string name="share_account_data_account_number">Kontonumber %S</string> <string name="share_account_data_account_number">Kontonumber %S</string>
<string name="alert_ask_discard_changes_title">Nicht gespeicherte Änderungen</string> <string name="alert_ask_discard_changes_title">Änderungen verwerfen?</string>
<string name="alert_ask_discard_changes_message">Es wurden nicht alle Änderungen gespeichert. Sind Sie sich sicher, dass Sie sie verwerfen möchten?\n\n(TODO: Oder einfach: Änderungen verwerfen?)</string> <string name="alert_ask_discard_changes_message">Ihre Änderungen wurden nicht gespeichert. Sind Sie sich sicher, dass Sie sie verwerfen möchten?</string>
<string name="alert_ask_delete_account_title">Konto \'%s\' wirklich löschen?</string> <string name="alert_ask_delete_account_title">Konto löschen?</string>
<string name="alert_ask_delete_account_message">Alle Daten zu diesem Konto werden lokal vollständig gelöscht. <string name="alert_ask_delete_account_message">Möchten Sie das Konto \'%s\' aus der App entfernen? Sämtliche lokal gespeicherten Kontodaten werden hierbei gelöscht.</string>
\n\nZum Wiederherstellen müssen sie, falls dann noch möglich, erneut vom Bankserver abgeholt werden.</string>
<string name="error_no_name_entered">Bitte geben Sie den Namen des Empfängers ein</string> <string name="error_no_name_entered">Bitte geben Sie den Namen des Empfängers ein</string>

View File

@ -47,10 +47,10 @@
<string name="other">Other</string> <string name="other">Other</string>
<string name="activity_login_authenticate_with_password_prompt">Please enter your password</string> <string name="activity_login_authenticate_with_password_prompt">To unlock app please enter your password</string>
<string name="activity_login_authenticate_with_password_hint">Enter your password</string> <string name="activity_login_authenticate_with_password_hint">Enter your password</string>
<string name="activity_login_authenticate_with_biometrics_prompt">To unlock app please authenticate with fingerprint or face recognition</string>
<string name="activity_login_login_button_title">Login</string> <string name="activity_login_login_button_title">Login</string>
<string name="activity_login_authenticate_with_biometrics_prompt">Authenticate with fingerprint or face recognition</string>
<string name="activity_login_incorrect_password_entered">Incorrect password entered</string> <string name="activity_login_incorrect_password_entered">Incorrect password entered</string>
@ -88,7 +88,7 @@
<string name="dialog_add_account_enter_bank">Bank (find also by bank code or city):</string> <string name="dialog_add_account_enter_bank">Bank (find also by bank code or city):</string>
<string name="dialog_add_account_add">Add</string> <string name="dialog_add_account_add">Add</string>
<string name="dialog_add_account_bank_does_not_support_fints_3_error_message">%s does not support FinTS 3.0 and therefore cannot be used in this application.</string> <string name="dialog_add_account_bank_does_not_support_fints_3_error_message">%s does not support FinTS 3.0 and can therefore unfortunately not be used with this app.</string>
<string name="dialog_add_account_message_could_not_add_account">Could not add account.\n\nError message from your bank:\n\n%s</string> <string name="dialog_add_account_message_could_not_add_account">Could not add account.\n\nError message from your bank:\n\n%s</string>
<string name="dialog_transfer_money_account">Account:</string> <string name="dialog_transfer_money_account">Account:</string>
@ -177,12 +177,11 @@
<string name="share_account_data_account_number">Account number %S</string> <string name="share_account_data_account_number">Account number %S</string>
<string name="alert_ask_discard_changes_title">Unsaved changed</string> <string name="alert_ask_discard_changes_title">Discard changes?</string>
<string name="alert_ask_discard_changes_message">Changed data hasn\'t been saved. Are you sure you want to discard them?\n\n(TODO: Oder einfach: Discard changes?)</string> <string name="alert_ask_discard_changes_message">Your changes have not been saved. Are you sure you want to discard them?</string>
<string name="alert_ask_delete_account_title">Really delete account \'%s\'?</string> <string name="alert_ask_delete_account_title">Delete account?</string>
<string name="alert_ask_delete_account_message">All data for this account will locally be permanently deleted. <string name="alert_ask_delete_account_message">Would you like to remove account \'%s\' from app? All locally stored account data will be deleted.</string>
\n\nThey can only be restored, if then still possible, by retrieving it again from your bank server.</string>
<string name="error_no_name_entered">Please enter recipient\'s name</string> <string name="error_no_name_entered">Please enter recipient\'s name</string>

View File

@ -46,11 +46,12 @@
/* LoginDialog */ /* LoginDialog */
"Login Dialog title" = "Login"; "Login Dialog title" = "Login";
"To unlock app please enter your password" = "To unlock app please enter your password";
"Enter your password" = "Enter your password";
"Authenticate to change app protection settings" = "Authenticate to change app protection settings"; "Authenticate to change app protection settings" = "Authenticate to change app protection settings";
"Authenticate with biometrics to unlock app reason" = "Authenticate to unlock your data";
"To unlock app please authenticate with FaceID" = "To unlock app please authenticate with FaceID"; "To unlock app please authenticate with FaceID" = "To unlock app please authenticate with FaceID";
"To unlock app please authenticate with TouchID" = "To unlock app please authenticate with TouchID"; "To unlock app please authenticate with TouchID" = "To unlock app please authenticate with TouchID";
"Enter your password" = "Enter your password"; "Authenticate with biometrics to unlock app reason" = "Authenticate to unlock your data";
"Login" = "Login"; "Login" = "Login";
"Authentication failed" = "Authentication failed"; "Authentication failed" = "Authentication failed";
"Incorrect password entered" = "Incorrect password entered"; "Incorrect password entered" = "Incorrect password entered";
@ -66,7 +67,7 @@
"Unsupported banks" = "Unsupported banks"; "Unsupported banks" = "Unsupported banks";
"%@ does not support FinTS 3.0" = "%@ does not support FinTS 3.0"; "%@ does not support FinTS 3.0" = "%@ does not support FinTS 3.0";
"Only banks supporting FinTS 3.0 can be used in this app." = "In this app only banks supporting the German banking standard FinTS 3.0 can be used."; "%@ does not support FinTS 3.0." = "In this app only banks supporting the German online banking standard FinTS 3.0 can be used.";
/* AddAccountDialog */ /* AddAccountDialog */
@ -191,11 +192,11 @@ Unfortunately, Bankmeister cannot know whether a bank charges for real-time tran
"Delete account" = "Delete account"; "Delete account" = "Delete account";
"Unsaved changes" = "Unsaved changes"; "Discard changes?" = "Discard 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?"; "Your changes have not been saved. Are you sure you want to discard them?" = "Your changes have not been saved. Are you sure you want to discard them?";
"Really delete account '%@'?" = "Really delete account '%@'?"; "Delete account?" = "Delete account?";
"All data for this account will be permanently deleted locally." = "All data for this account will locally be permanently deleted.\n\nThey can only be restored, if then still possible, by retrieving it again from your bank server."; "Would you like to remove account '%@' from app?" = "Would you like to remove account '%@' from app? All locally stored account data will be deleted.";
/* BankAccountSettingsDialog */ /* BankAccountSettingsDialog */

View File

@ -46,11 +46,12 @@
/* LoginDialog */ /* LoginDialog */
"Login Dialog title" = "Anmelden"; "Login Dialog title" = "Anmelden";
"Authenticate to change app protection settings" = "Authentifizieren Sie sich um die Einstellungen zum Schutz der Appdaten zu ändern"; "To unlock app please enter your password" = "Um die App zu entsperren geben Sie bitte Ihr Passwort ein";
"Authenticate with biometrics to unlock app reason" = "Authentifizieren Sie sich bitte um ihre Daten zu entsperren"; "Enter your password" = "Geben Sie Ihr Passwort ein";
"To unlock app please authenticate with FaceID" = "Authentifizieren Sich sich bitte mit FaceID um die App zu entsperren"; "To unlock app please authenticate with FaceID" = "Authentifizieren Sich sich bitte mit FaceID um die App zu entsperren";
"To unlock app please authenticate with TouchID" = "Authentifizieren Sich sich bitte mit TouchID um die App zu entsperren"; "To unlock app please authenticate with TouchID" = "Authentifizieren Sich sich bitte mit TouchID um die App zu entsperren";
"Enter your password" = "Geben Sie Ihr Passwort ein"; "Authenticate with biometrics to unlock app reason" = "Authentifizieren Sie sich bitte um ihre Daten zu entsperren";
"Authenticate to change app protection settings" = "Authentifizieren Sie sich um die Einstellungen zum Schutz der Appdaten zu ändern";
"Login" = "Anmelden"; "Login" = "Anmelden";
"Authentication failed" = "Authentifizierung fehlgeschlagen"; "Authentication failed" = "Authentifizierung fehlgeschlagen";
"Incorrect password entered" = "Falsches Passwort eingegeben"; "Incorrect password entered" = "Falsches Passwort eingegeben";
@ -65,8 +66,8 @@
"No supported banks found" = "Keine unterstützten Banken gefunden"; "No supported banks found" = "Keine unterstützten Banken gefunden";
"Unsupported banks" = "Nicht unterstützte Banken"; "Unsupported banks" = "Nicht unterstützte Banken";
"%@ does not support FinTS 3.0" = "%@ wird von App nicht unterstützt"; "%@ does not support FinTS 3.0" = "Hinzufügen von %@ nicht möglich";
"Only banks supporting FinTS 3.0 can be used in this app." = "In dieser App können nur Banken verwendet werden, die den deutschen Online-Banking Standard FinTS 3.0 unterstützen."; "%@ does not support FinTS 3.0." = "In dieser App können nur Banken verwendet werden, die den deutschen Online-Banking Standard FinTS 3.0 unterstützen. %@ unterstützt diesen Standard nicht.";
/* AddAccountDialog */ /* AddAccountDialog */
@ -192,11 +193,11 @@ Ob eine Bank Gebühren für Echtzeitüberweisungen erhebt, kann Bankmeister leid
"Delete account" = "Konto löschen"; "Delete account" = "Konto löschen";
"Unsaved changes" = "Nicht gespeicherte Änderungen"; "Discard changes?" = "Änderungen verwerfen?";
"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?"; "Your changes have not been saved. Are you sure you want to discard them?" = "Ihre Änderungen wurden nicht gespeichert. Sind Sie sich sicher, dass Sie sie verwerfen möchten?";
"Really delete account '%@'?" = "Konto '%@' wirklich löschen?"; "Delete account?" = "Konto 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 Wiederherstellen müssen sie, falls dann noch möglich, erneut vom Bankserver abgeholt werden."; "Would you like to remove account '%@' from app?" = "Möchten Sie das Konto \'%@\' aus der App entfernen? Sämtliche lokal gespeicherten Kontodaten werden hierbei gelöscht.";
/* BankAccountSettingsDialog */ /* BankAccountSettingsDialog */

View File

@ -5,15 +5,15 @@ import BankingUiSwift
extension Message { extension Message {
static func createUnsavedChangesMessage(_ discardChanges: @escaping () -> Void) -> Message { static func createUnsavedChangesMessage(_ discardChanges: @escaping () -> Void) -> Message {
return Message(title: Text("Unsaved changes"), return Message(title: Text("Discard changes?"),
message: Text("Changed data hasn't been saved. Are you sure you want to discard them?"), message: Text("Your changes have not been saved. Are you sure you want to discard them?"),
primaryButton: .discard(discardChanges), primaryButton: .discard(discardChanges),
secondaryButton: .cancel()) secondaryButton: .cancel())
} }
static func createAskUserToDeleteAccountMessage(_ bank: IBankData, _ deleteAccount: @escaping (IBankData) -> Void) -> Message { static func createAskUserToDeleteAccountMessage(_ bank: IBankData, _ deleteAccount: @escaping (IBankData) -> Void) -> Message {
return Message(title: Text("Really delete account '\(bank.displayName)'?"), return Message(title: Text("Delete account?"),
message: Text("All data for this account will be permanently deleted locally."), message: Text("Would you like to remove account '\(bank.displayName)' from app?"),
primaryButton: .destructive(Text("Delete"), action: { deleteAccount(bank) } ), primaryButton: .destructive(Text("Delete"), action: { deleteAccount(bank) } ),
secondaryButton: .cancel()) secondaryButton: .cancel())
} }

View File

@ -66,12 +66,10 @@ struct LoginDialog: View {
} }
} }
else { else {
loginReason.map { loginReason in Text(loginReason ?? "To unlock app please enter your password")
Text(loginReason) .multilineTextAlignment(.center)
.multilineTextAlignment(.center) .padding()
.padding() .padding(.bottom, 0)
.padding(.bottom, 0)
}
Form { Form {
Section { Section {

View File

@ -61,11 +61,10 @@ struct BankListItem : View {
} }
private func askUserToDeleteAccount() { private func askUserToDeleteAccount() {
// couldn't believe it, .alert() didn't work as SwiftUI resetted @State variable to dislpay it instantly, therefore Alert never got displayed // couldn't believe it, .alert() didn't work as SwiftUI reset @State variable to display it instantly, therefore Alert never got displayed
// TODO: use values from Message.createAskUserToDeleteAccountMessage(self.bank, self.deleteAccount)
UIAlert( UIAlert(
"Really delete account '%@'?".localize(bank.displayName), "Delete account?".localize(),
"All data for this account will be permanently deleted locally.", "Would you like to remove account '%@' from app?".localize(bank.displayName),
UIAlertAction.destructive("Delete") { self.deleteAccount(self.bank) }, UIAlertAction.destructive("Delete") { self.deleteAccount(self.bank) },
UIAlertAction.cancel() UIAlertAction.cancel()
).show() ).show()