Skip to content

Commit

Permalink
Add back translators. Fix linting.
Browse files Browse the repository at this point in the history
  • Loading branch information
MaxwellGarceau committed Jan 4, 2025
1 parent ff888a8 commit 232852f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion mailchimp.php
Original file line number Diff line number Diff line change
Expand Up @@ -1059,7 +1059,7 @@ function mailchimp_sf_merge_validate_phone( $opt_val, $data ) {

// Trim whitespace
$opt_val = array_map( 'trim', $opt_val ); // Beginning and end
$opt_val = array_map( fn($s) => preg_replace( '/\s/', '', $s ), $opt_val ); // Middle
$opt_val = array_map( fn( $s ) => preg_replace( '/\s/', '', $s ), $opt_val ); // Middle

// Format number for validation
$opt_val = implode( '-', $opt_val );
Expand All @@ -1070,6 +1070,7 @@ function mailchimp_sf_merge_validate_phone( $opt_val, $data ) {
*/
case strlen( $opt_val ) < 12:
$message = sprintf(
/* translators: %s: field name */
esc_html__( '%s must contain the correct amount of digits', 'mailchimp' ),
esc_html( $data['name'] )
);
Expand All @@ -1081,6 +1082,7 @@ function mailchimp_sf_merge_validate_phone( $opt_val, $data ) {
*/
case ! preg_match( '/^[0-9]{3}-[0-9]{3}-[0-9]{4}$/', $opt_val ):
$message = sprintf(
/* translators: %s: field name */
esc_html__( '%s must consist of only numbers', 'mailchimp' ),
esc_html( $data['name'] )
);
Expand Down

0 comments on commit 232852f

Please sign in to comment.