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 */
|
||||
|
||||
"Protect App Settings Dialog title" = "Select app protection";
|
||||
"Protect App Settings Dialog title" = "App protection";
|
||||
"FaceID" = "FaceID";
|
||||
"TouchID" = "TouchID";
|
||||
"Password" = "Password";
|
||||
"None" = "Unprotected";
|
||||
"Unprotected" = "Unprotected";
|
||||
"Authenticate with TouchID" = "Authenticate with TouchID";
|
||||
"Enter new password" = "Enter new password";
|
||||
"Confirm password" = "Confirm password";
|
||||
|
|
|
@ -216,11 +216,11 @@ Ob eine Bank Gebühren für Echtzeitüberweisungen erhebt, kann Bankmeister leid
|
|||
|
||||
/* ProtectAppSettingsDialog */
|
||||
|
||||
"Protect App Settings Dialog title" = "Appzugangsschutz festlegen";
|
||||
"Protect App Settings Dialog title" = "Appzugangsschutz";
|
||||
"FaceID" = "FaceID";
|
||||
"TouchID" = "TouchID";
|
||||
"Password" = "Passwort";
|
||||
"None" = "Ungeschützt";
|
||||
"Unprotected" = "Ungeschützt";
|
||||
"Authenticate with TouchID" = "Mit TouchID authentifizieren";
|
||||
"Enter new password" = "Neues Passwort eingeben";
|
||||
"Confirm password" = "Bestätigen";
|
||||
|
|
|
@ -82,7 +82,7 @@ struct ProtectAppSettingsDialog: View {
|
|||
Section {
|
||||
Picker("", selection: selectedAuthenticationTypeIndexBinding) {
|
||||
ForEach(0..<supportedAuthenticationTypes.count) { index in
|
||||
Text(self.supportedAuthenticationTypes[index].rawValue.firstLetterUppercased.localize())
|
||||
Text(self.getAuthenticationTypeLabel(self.supportedAuthenticationTypes[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) {
|
||||
isFaceIDSelected = false
|
||||
isTouchIDSelected = false
|
||||
|
|
Loading…
Reference in New Issue