mirror of
https://gitlab.com/mishakmak/pam-fprint-grosshack.git
synced 2026-04-08 20:03:34 +02:00
pam: Always return translated string from helper
This means that the different functions in the header match as all functions will return the translted string instead of only one of them.
This commit is contained in:
committed by
Benjamin Berg
parent
2fd86624e5
commit
c42e627ddd
@ -153,16 +153,16 @@ GNUC_UNUSED static const char *verify_result_str_to_msg(const char *result, bool
|
|||||||
|
|
||||||
if (strcmp (result, "verify-retry-scan") == 0) {
|
if (strcmp (result, "verify-retry-scan") == 0) {
|
||||||
if (is_swipe == false)
|
if (is_swipe == false)
|
||||||
return N_("Place your finger on the reader again");
|
return TR (N_("Place your finger on the reader again"));
|
||||||
else
|
else
|
||||||
return N_("Swipe your finger again");
|
return TR (N_("Swipe your finger again"));
|
||||||
}
|
}
|
||||||
if (strcmp (result, "verify-swipe-too-short") == 0)
|
if (strcmp (result, "verify-swipe-too-short") == 0)
|
||||||
return N_("Swipe was too short, try again");
|
return TR (N_("Swipe was too short, try again"));
|
||||||
if (strcmp (result, "verify-finger-not-centered") == 0)
|
if (strcmp (result, "verify-finger-not-centered") == 0)
|
||||||
return N_("Your finger was not centered, try swiping your finger again");
|
return TR (N_("Your finger was not centered, try swiping your finger again"));
|
||||||
if (strcmp (result, "verify-remove-and-retry") == 0)
|
if (strcmp (result, "verify-remove-and-retry") == 0)
|
||||||
return N_("Remove your finger, and try swiping your finger again");
|
return TR (N_("Remove your finger, and try swiping your finger again"));
|
||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@ -179,16 +179,16 @@ GNUC_UNUSED static const char *enroll_result_str_to_msg(const char *result, bool
|
|||||||
|
|
||||||
if (strcmp (result, "enroll-retry-scan") == 0 || strcmp (result, "enroll-stage-passed") == 0) {
|
if (strcmp (result, "enroll-retry-scan") == 0 || strcmp (result, "enroll-stage-passed") == 0) {
|
||||||
if (is_swipe == false)
|
if (is_swipe == false)
|
||||||
return N_("Place your finger on the reader again");
|
return TR (N_("Place your finger on the reader again"));
|
||||||
else
|
else
|
||||||
return N_("Swipe your finger again");
|
return TR (N_("Swipe your finger again"));
|
||||||
}
|
}
|
||||||
if (strcmp (result, "enroll-swipe-too-short") == 0)
|
if (strcmp (result, "enroll-swipe-too-short") == 0)
|
||||||
return N_("Swipe was too short, try again");
|
return TR (N_("Swipe was too short, try again"));
|
||||||
if (strcmp (result, "enroll-finger-not-centered") == 0)
|
if (strcmp (result, "enroll-finger-not-centered") == 0)
|
||||||
return N_("Your finger was not centered, try swiping your finger again");
|
return TR (N_("Your finger was not centered, try swiping your finger again"));
|
||||||
if (strcmp (result, "enroll-remove-and-retry") == 0)
|
if (strcmp (result, "enroll-remove-and-retry") == 0)
|
||||||
return N_("Remove your finger, and try swiping your finger again");
|
return TR (N_("Remove your finger, and try swiping your finger again"));
|
||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -201,7 +201,7 @@ verify_result (sd_bus_message *m,
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
msg = _(verify_result_str_to_msg (result, data->is_swipe));
|
msg = verify_result_str_to_msg (result, data->is_swipe);
|
||||||
send_err_msg (data->pamh, msg);
|
send_err_msg (data->pamh, msg);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user