user-accounts: Consistently return translated strings for fprint helper

Always return translated strings from the fprint translation helper
header. This makes things more consistent overall.
This commit is contained in:
Benjamin Berg 2020-10-06 11:27:15 +02:00 committed by Benjamin Berg
parent e80b4b5f58
commit 64686cfee3
2 changed files with 11 additions and 11 deletions

View file

@ -702,7 +702,7 @@ handle_enroll_signal (CcFingerprintDialog *self,
scan_type = cc_fprintd_device_get_scan_type (self->device); scan_type = cc_fprintd_device_get_scan_type (self->device);
is_swipe = g_str_equal (scan_type, "swipe"); is_swipe = g_str_equal (scan_type, "swipe");
message = TR (enroll_result_str_to_msg (result, is_swipe)); message = enroll_result_str_to_msg (result, is_swipe);
set_enroll_result_message (self, ENROLL_STATE_RETRY, message); set_enroll_result_message (self, ENROLL_STATE_RETRY, message);
self->enroll_stage_passed_id = self->enroll_stage_passed_id =

View file

@ -130,16 +130,16 @@ G_GNUC_UNUSED static const char *verify_result_str_to_msg(const char *result, gb
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;
} }
@ -156,16 +156,16 @@ G_GNUC_UNUSED static const char *enroll_result_str_to_msg(const char *result, gb
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;
} }