diff --git a/public_html/wp-content/plugins/camptix/inc/class-camptix-badges.php b/public_html/wp-content/plugins/camptix/inc/class-camptix-badges.php index f6c3f1876..fa53ccbba 100644 --- a/public_html/wp-content/plugins/camptix/inc/class-camptix-badges.php +++ b/public_html/wp-content/plugins/camptix/inc/class-camptix-badges.php @@ -12,7 +12,7 @@ function process_badges() { if ( ! current_user_can( 'manage_options' ) || ! wp_verify_nonce( 'badge-submission' ) ) { - return 'Invalid request'; + return __( 'Invalid request', 'wordcamporg' );; } $usernames = sanitize_text_field( $_POST['usernames'] ); @@ -23,15 +23,15 @@ function process_badges() { $valid_badges = [ 'wordcamp-volunteer' ]; if ( ! in_array( $operation, $valid_operations ) ) { - return 'Invalid badge operation used, valid commands are: ' . implode( ',', $valid_operations ); + return sprintf( __( 'Invalid badge operation used, valid commands are: %s', 'wordcamporg' ), implode( ',', $valid_operations ) ); } if ( ! in_array( $badge, $valid_badges ) ) { - return 'Invalid badge'; + return __( 'Invalid badge', 'wordcamporg' ); } if ( empty( $usernames ) ) { - return 'You must supply a list of usernames'; + return __( 'You must supply a list of usernames', 'wordcamporg' );; } $users = explode( "\n", $usernames ); @@ -55,23 +55,23 @@ function menu_badges() { // If adding more badges, make sure to add them to the validation check in `process_badges` ?> -