mirror of
https://gitlab.freedesktop.org/libfprint/fprintd.git
synced 2026-05-06 10:18:04 +02:00
device: Generalize verify-too-fast error
It's not just related to swipe devices, so let's make it more generic
This commit is contained in:
parent
aea5cbd0ec
commit
244be2511f
5 changed files with 12 additions and 7 deletions
|
|
@ -178,8 +178,13 @@ verify_result_str_to_msg (const char *result, bool is_swipe)
|
|||
return TR (N_("Your finger was not centered, try swiping your finger again"));
|
||||
if (strcmp (result, "verify-remove-and-retry") == 0)
|
||||
return TR (N_("Remove your finger, and try swiping your finger again"));
|
||||
if (strcmp (result, "verify-swipe-too-fast") == 0)
|
||||
return TR (N_("Swipe was too fast, try again"));
|
||||
if (strcmp (result, "verify-too-fast") == 0)
|
||||
{
|
||||
if (is_swipe)
|
||||
return TR (N_("Swipe was too fast, try again"));
|
||||
else
|
||||
return TR (N_("Finger scan was too fast, try again"));
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -603,7 +603,7 @@ verify_result_to_name (gboolean match, GError *error)
|
|||
return "verify-remove-and-retry";
|
||||
|
||||
case FP_DEVICE_RETRY_TOO_FAST:
|
||||
return "verify-swipe-too-fast";
|
||||
return "verify-too-fast";
|
||||
|
||||
default:
|
||||
return "verify-retry-scan";
|
||||
|
|
|
|||
|
|
@ -182,9 +182,9 @@
|
|||
</doc:definition>
|
||||
</doc:item>
|
||||
<doc:item>
|
||||
<doc:term>verify-swipe-too-fast</doc:term>
|
||||
<doc:term>verify-too-fast</doc:term>
|
||||
<doc:definition>
|
||||
The user's swipe was too fast. The user should retry scanning their finger, the verification is still ongoing.
|
||||
The user's swipe or touch was too fast. The user should retry scanning their finger, the verification is still ongoing.
|
||||
</doc:definition>
|
||||
</doc:item>
|
||||
<doc:item>
|
||||
|
|
|
|||
|
|
@ -53,10 +53,10 @@ VALID_VERIFY_STATUS = [
|
|||
'verify-no-match',
|
||||
'verify-match',
|
||||
'verify-retry-scan',
|
||||
'verify-too-fast',
|
||||
'verify-swipe-too-short',
|
||||
'verify-finger-not-centered',
|
||||
'verify-remove-and-retry',
|
||||
'verify-swipe-too-fast',
|
||||
'verify-disconnected',
|
||||
'verify-unknown-error'
|
||||
]
|
||||
|
|
|
|||
|
|
@ -2741,7 +2741,7 @@ class FPrintdVirtualDeviceVerificationTests(FPrintdVirtualDeviceBaseTest):
|
|||
self.assertVerifyRetry(FPrint.DeviceRetry.CENTER_FINGER, 'verify-finger-not-centered')
|
||||
|
||||
def test_verify_retry_too_fast(self):
|
||||
self.assertVerifyRetry(FPrint.DeviceRetry.TOO_FAST, 'verify-swipe-too-fast')
|
||||
self.assertVerifyRetry(FPrint.DeviceRetry.TOO_FAST, 'verify-too-fast')
|
||||
|
||||
def test_verify_error_general(self):
|
||||
self.assertVerifyError(FPrint.DeviceError.GENERAL, 'verify-unknown-error')
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue