diff --git a/src/wp-includes/class-wp-block-type-registry.php b/src/wp-includes/class-wp-block-type-registry.php index 969f0f0f64a42..8c3e6fc0ffb14 100644 --- a/src/wp-includes/class-wp-block-type-registry.php +++ b/src/wp-includes/class-wp-block-type-registry.php @@ -55,7 +55,8 @@ public function register( $name, $args = array() ) { if ( ! is_string( $name ) ) { _doing_it_wrong( __METHOD__, - __( 'Block type names must be strings.' ), + /* translators: %s: The received block type name type. */ + sprintf( __( 'Block type names must be strings, received %s.' ), gettype( $name ) ), '5.0.0' ); return false; @@ -64,7 +65,8 @@ public function register( $name, $args = array() ) { if ( preg_match( '/[A-Z]+/', $name ) ) { _doing_it_wrong( __METHOD__, - __( 'Block type names must not contain uppercase characters.' ), + /* translators: %s: Block name. */ + sprintf( __( 'Block type names must not contain uppercase characters. "%s" was given.' ), $name ), '5.0.0' ); return false; @@ -74,7 +76,8 @@ public function register( $name, $args = array() ) { if ( ! preg_match( $name_matcher, $name ) ) { _doing_it_wrong( __METHOD__, - __( 'Block type names must contain a namespace prefix. Example: my-plugin/my-custom-block-type' ), + /* translators: %s: Block name. */ + sprintf( __( 'Block type names must contain a namespace prefix. Example: my-plugin/my-custom-block-type. "%s" was given.' ), $name ), '5.0.0' ); return false;