<?php
function mypackage_add_error( $code, $message ) {
/* translators: %s: Error Message */
return new WP_Error( $code, sprintf( esc_html__( '%s', 'mypackage' ), $message ) );
}
?>
FOUND 1 ERROR AFFECTING 1 LINE
193 | ERROR | Strings should have translatable content (WordPress.WP.I18n.NoEmptyStrings)
<?php
function mypackage_add_error( $code, $message ) {
return new WP_Error( $code, $message );
}
?>
And the function mypackage_add_error() should be used this way
<?php
mypackage_add_error( 'test-error', esc_html__( 'Test error message', 'text-domain' ) );
?>
https://wordpress.stackexchange.com/questions/295086/phpcs-strings-should-have-translatable-content