From 51cf539a981b28f2b3bd4793b1ffba3c680637e8 Mon Sep 17 00:00:00 2001 From: Brian Date: Sat, 31 Jan 2026 00:22:26 +0100 Subject: [PATCH 1/2] fix Plugin Check: MissingTranslatorsComment & MissingSingularPlaceholder #757 --- class-two-factor-core.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/class-two-factor-core.php b/class-two-factor-core.php index 8086c434..561d300d 100644 --- a/class-two-factor-core.php +++ b/class-two-factor-core.php @@ -867,8 +867,9 @@ public static function maybe_show_last_login_failure_notice( $user ) { if ( $last_failed_two_factor_login ) { echo '
'; printf( + /* translators: 1: number of failed login attempts, 2: time since last failed attempt */ _n( - 'WARNING: Your account has attempted to login without providing a valid two factor token. The last failed login occurred %2$s ago. If this wasn\'t you, you should reset your password.', + 'WARNING: Your account has attempted to login %1$s time without providing a valid two factor token. The last failed login occurred %2$s ago. If this wasn\'t you, you should reset your password.', 'WARNING: Your account has attempted to login %1$s times without providing a valid two factor token. The last failed login occurred %2$s ago. If this wasn\'t you, you should reset your password.', $failed_login_count, 'two-factor' @@ -917,6 +918,7 @@ public static function maybe_show_reset_password_notice( $errors ) { $errors->add( 'two_factor_password_reset', sprintf( + /* translators: %s: URL to create a new password. */ __( 'Your password was reset because of too many failed Two Factor attempts. You will need to create a new password to regain access. Please check your email for more information.', 'two-factor' ), esc_url( add_query_arg( 'action', 'lostpassword', wp_login_url() ) ) ) @@ -1654,6 +1656,7 @@ public static function process_provider( $provider, $user, $is_post_request ) { return new WP_Error( 'two_factor_too_fast', sprintf( + /* translators: %s: human-readable time delay until another attempt can be made. */ __( 'ERROR: Too many invalid verification codes, you can try again in %s. This limit protects your account against automated attacks.', 'two-factor' ), human_time_diff( $last_login + $time_delay ) ) @@ -1998,6 +2001,7 @@ private static function render_user_providers_form( $user, $providers ) {