From e9bfb77426dd166266d7e7412526ef35cb2740f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= Date: Thu, 20 Feb 2025 17:42:14 +0100 Subject: [PATCH] pam/fingerprint-strings: Add proper variants for touching devices --- pam/fingerprint-strings.h | 28 ++++++++++++++++++++++++---- 1 file changed, 24 insertions(+), 4 deletions(-) diff --git a/pam/fingerprint-strings.h b/pam/fingerprint-strings.h index d3a9da5..aa5ead7 100644 --- a/pam/fingerprint-strings.h +++ b/pam/fingerprint-strings.h @@ -175,9 +175,19 @@ verify_result_str_to_msg (const char *result, bool is_swipe) if (strcmp (result, "verify-swipe-too-short") == 0) return TR (N_("Swipe was too short, try again")); if (strcmp (result, "verify-finger-not-centered") == 0) - return TR (N_("Your finger was not centered, try swiping your finger again")); + { + if (is_swipe) + return TR (N_("Your finger was not centered, try swiping your finger again")); + else + return TR (N_("Your finger was not centered, try touching the sensor again")); + } if (strcmp (result, "verify-remove-and-retry") == 0) - return TR (N_("Remove your finger, and try swiping your finger again")); + { + if (is_swipe) + return TR (N_("Remove your finger, and try swiping your finger again")); + else + return TR (N_("Remove your finger, and try touching the sensor again")); + } if (strcmp (result, "verify-too-fast") == 0) { if (is_swipe) @@ -210,9 +220,19 @@ enroll_result_str_to_msg (const char *result, bool is_swipe) if (strcmp (result, "enroll-swipe-too-short") == 0) return TR (N_("Swipe was too short, try again")); if (strcmp (result, "enroll-finger-not-centered") == 0) - return TR (N_("Your finger was not centered, try swiping your finger again")); + { + if (is_swipe) + return TR (N_("Your finger was not centered, try swiping your finger again")); + else + return TR (N_("Your finger was not centered, try touching the sensor again")); + } if (strcmp (result, "enroll-remove-and-retry") == 0) - return TR (N_("Remove your finger, and try swiping your finger again")); + { + if (is_swipe) + return TR (N_("Remove your finger, and try swiping your finger again")); + else + return TR (N_("Remove your finger, and try touching the sensor again")); + } if (strcmp (result, "enroll-too-fast") == 0) { if (is_swipe)