Implemented translating biometric authentication type
This commit is contained in:
parent
bf9c0bc32b
commit
7047773e7b
|
@ -215,11 +215,11 @@ Unfortunately, Bankmeister cannot know whether a bank charges for real-time tran
|
||||||
|
|
||||||
/* ProtectAppSettingsDialog */
|
/* ProtectAppSettingsDialog */
|
||||||
|
|
||||||
"Protect App Settings Dialog title" = "Select app protection";
|
"Protect App Settings Dialog title" = "App protection";
|
||||||
"FaceID" = "FaceID";
|
"FaceID" = "FaceID";
|
||||||
"TouchID" = "TouchID";
|
"TouchID" = "TouchID";
|
||||||
"Password" = "Password";
|
"Password" = "Password";
|
||||||
"None" = "Unprotected";
|
"Unprotected" = "Unprotected";
|
||||||
"Authenticate with TouchID" = "Authenticate with TouchID";
|
"Authenticate with TouchID" = "Authenticate with TouchID";
|
||||||
"Enter new password" = "Enter new password";
|
"Enter new password" = "Enter new password";
|
||||||
"Confirm password" = "Confirm password";
|
"Confirm password" = "Confirm password";
|
||||||
|
|
|
@ -216,11 +216,11 @@ Ob eine Bank Gebühren für Echtzeitüberweisungen erhebt, kann Bankmeister leid
|
||||||
|
|
||||||
/* ProtectAppSettingsDialog */
|
/* ProtectAppSettingsDialog */
|
||||||
|
|
||||||
"Protect App Settings Dialog title" = "Appzugangsschutz festlegen";
|
"Protect App Settings Dialog title" = "Appzugangsschutz";
|
||||||
"FaceID" = "FaceID";
|
"FaceID" = "FaceID";
|
||||||
"TouchID" = "TouchID";
|
"TouchID" = "TouchID";
|
||||||
"Password" = "Passwort";
|
"Password" = "Passwort";
|
||||||
"None" = "Ungeschützt";
|
"Unprotected" = "Ungeschützt";
|
||||||
"Authenticate with TouchID" = "Mit TouchID authentifizieren";
|
"Authenticate with TouchID" = "Mit TouchID authentifizieren";
|
||||||
"Enter new password" = "Neues Passwort eingeben";
|
"Enter new password" = "Neues Passwort eingeben";
|
||||||
"Confirm password" = "Bestätigen";
|
"Confirm password" = "Bestätigen";
|
||||||
|
|
|
@ -82,7 +82,7 @@ struct ProtectAppSettingsDialog: View {
|
||||||
Section {
|
Section {
|
||||||
Picker("", selection: selectedAuthenticationTypeIndexBinding) {
|
Picker("", selection: selectedAuthenticationTypeIndexBinding) {
|
||||||
ForEach(0..<supportedAuthenticationTypes.count) { index in
|
ForEach(0..<supportedAuthenticationTypes.count) { index in
|
||||||
Text(self.supportedAuthenticationTypes[index].rawValue.firstLetterUppercased.localize())
|
Text(self.getAuthenticationTypeLabel(self.supportedAuthenticationTypes[index]))
|
||||||
.tag(index)
|
.tag(index)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -141,6 +141,22 @@ struct ProtectAppSettingsDialog: View {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private func getAuthenticationTypeLabel(_ type: AuthenticationType) -> LocalizedStringKey {
|
||||||
|
switch type {
|
||||||
|
case .biometric:
|
||||||
|
if authenticationService.deviceSupportsTouchID {
|
||||||
|
return "TouchID"
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
return "FaceID"
|
||||||
|
}
|
||||||
|
case .password:
|
||||||
|
return "Password"
|
||||||
|
default:
|
||||||
|
return "Unprotected"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private func selectedAuthenticationTypeChanged(_ type: AuthenticationType) {
|
private func selectedAuthenticationTypeChanged(_ type: AuthenticationType) {
|
||||||
isFaceIDSelected = false
|
isFaceIDSelected = false
|
||||||
isTouchIDSelected = false
|
isTouchIDSelected = false
|
||||||
|
|
Loading…
Reference in New Issue