i18n: Ensure block type strings in the REST API end with a full stop.

Props ramiy, justinahinon.
Fixes #50805.


Built from https://develop.svn.wordpress.org/trunk@48982


git-svn-id: http://core.svn.wordpress.org/trunk@48744 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Helen Hou-Sandí 2020-09-16 19:23:07 +00:00
parent eef2e5c85c
commit 75262781d9
4 changed files with 6 additions and 6 deletions

View File

@ -923,7 +923,7 @@ class WP_REST_Server {
if ( ! is_callable( $handler['callback'] ) ) { if ( ! is_callable( $handler['callback'] ) ) {
$error = new WP_Error( $error = new WP_Error(
'rest_invalid_handler', 'rest_invalid_handler',
__( 'The handler for the route is invalid' ), __( 'The handler for the route is invalid.' ),
array( 'status' => 500 ) array( 'status' => 500 )
); );
} }
@ -1021,7 +1021,7 @@ class WP_REST_Server {
return new WP_Error( return new WP_Error(
'rest_no_route', 'rest_no_route',
__( 'No route was found matching the URL and request method' ), __( 'No route was found matching the URL and request method.' ),
array( 'status' => 404 ) array( 'status' => 404 )
); );
} }

View File

@ -51,7 +51,7 @@ class WP_REST_Block_Renderer_Controller extends WP_REST_Controller {
'args' => array( 'args' => array(
'context' => $this->get_context_param( array( 'default' => 'view' ) ), 'context' => $this->get_context_param( array( 'default' => 'view' ) ),
'attributes' => array( 'attributes' => array(
'description' => __( 'Attributes for the block' ), 'description' => __( 'Attributes for the block.' ),
'type' => 'object', 'type' => 'object',
'default' => array(), 'default' => array(),
'validate_callback' => static function ( $value, $request ) { 'validate_callback' => static function ( $value, $request ) {

View File

@ -87,11 +87,11 @@ class WP_REST_Block_Types_Controller extends WP_REST_Controller {
array( array(
'args' => array( 'args' => array(
'name' => array( 'name' => array(
'description' => __( 'Block name' ), 'description' => __( 'Block name.' ),
'type' => 'string', 'type' => 'string',
), ),
'namespace' => array( 'namespace' => array(
'description' => __( 'Block namespace' ), 'description' => __( 'Block namespace.' ),
'type' => 'string', 'type' => 'string',
), ),
), ),

View File

@ -13,7 +13,7 @@
* *
* @global string $wp_version * @global string $wp_version
*/ */
$wp_version = '5.6-alpha-48981'; $wp_version = '5.6-alpha-48982';
/** /**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema. * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.