From 486ab09a0ec8fbc4347862731fd5f0772f8247d8 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Mon, 25 Sep 2017 10:27:43 +0000 Subject: [PATCH] I18N: Add translator comments for placeholders in `WP_REST_Controller` strings. Props ramiy. Fixes #41667. Built from https://develop.svn.wordpress.org/trunk@41591 git-svn-id: http://core.svn.wordpress.org/trunk@41424 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- .../rest-api/endpoints/class-wp-rest-controller.php | 13 +++++++++++++ wp-includes/version.php | 2 +- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/wp-includes/rest-api/endpoints/class-wp-rest-controller.php b/wp-includes/rest-api/endpoints/class-wp-rest-controller.php index d07095cedc..78c3567147 100644 --- a/wp-includes/rest-api/endpoints/class-wp-rest-controller.php +++ b/wp-includes/rest-api/endpoints/class-wp-rest-controller.php @@ -36,6 +36,7 @@ abstract class WP_REST_Controller { * @since 4.7.0 */ public function register_routes() { + /* translators: %s: register_routes() */ _doing_it_wrong( 'WP_REST_Controller::register_routes', sprintf( __( "Method '%s' must be overridden." ), __METHOD__ ), '4.7' ); } @@ -48,6 +49,7 @@ abstract class WP_REST_Controller { * @return WP_Error|bool True if the request has read access, WP_Error object otherwise. */ public function get_items_permissions_check( $request ) { + /* translators: %s: method name */ return new WP_Error( 'invalid-method', sprintf( __( "Method '%s' not implemented. Must be overridden in subclass." ), __METHOD__ ), array( 'status' => 405 ) ); } @@ -60,6 +62,7 @@ abstract class WP_REST_Controller { * @return WP_Error|WP_REST_Response Response object on success, or WP_Error object on failure. */ public function get_items( $request ) { + /* translators: %s: method name */ return new WP_Error( 'invalid-method', sprintf( __( "Method '%s' not implemented. Must be overridden in subclass." ), __METHOD__ ), array( 'status' => 405 ) ); } @@ -72,6 +75,7 @@ abstract class WP_REST_Controller { * @return WP_Error|bool True if the request has read access for the item, WP_Error object otherwise. */ public function get_item_permissions_check( $request ) { + /* translators: %s: method name */ return new WP_Error( 'invalid-method', sprintf( __( "Method '%s' not implemented. Must be overridden in subclass." ), __METHOD__ ), array( 'status' => 405 ) ); } @@ -84,6 +88,7 @@ abstract class WP_REST_Controller { * @return WP_Error|WP_REST_Response Response object on success, or WP_Error object on failure. */ public function get_item( $request ) { + /* translators: %s: method name */ return new WP_Error( 'invalid-method', sprintf( __( "Method '%s' not implemented. Must be overridden in subclass." ), __METHOD__ ), array( 'status' => 405 ) ); } @@ -96,6 +101,7 @@ abstract class WP_REST_Controller { * @return WP_Error|bool True if the request has access to create items, WP_Error object otherwise. */ public function create_item_permissions_check( $request ) { + /* translators: %s: method name */ return new WP_Error( 'invalid-method', sprintf( __( "Method '%s' not implemented. Must be overridden in subclass." ), __METHOD__ ), array( 'status' => 405 ) ); } @@ -108,6 +114,7 @@ abstract class WP_REST_Controller { * @return WP_Error|WP_REST_Response Response object on success, or WP_Error object on failure. */ public function create_item( $request ) { + /* translators: %s: method name */ return new WP_Error( 'invalid-method', sprintf( __( "Method '%s' not implemented. Must be overridden in subclass." ), __METHOD__ ), array( 'status' => 405 ) ); } @@ -120,6 +127,7 @@ abstract class WP_REST_Controller { * @return WP_Error|bool True if the request has access to update the item, WP_Error object otherwise. */ public function update_item_permissions_check( $request ) { + /* translators: %s: method name */ return new WP_Error( 'invalid-method', sprintf( __( "Method '%s' not implemented. Must be overridden in subclass." ), __METHOD__ ), array( 'status' => 405 ) ); } @@ -132,6 +140,7 @@ abstract class WP_REST_Controller { * @return WP_Error|WP_REST_Response Response object on success, or WP_Error object on failure. */ public function update_item( $request ) { + /* translators: %s: method name */ return new WP_Error( 'invalid-method', sprintf( __( "Method '%s' not implemented. Must be overridden in subclass." ), __METHOD__ ), array( 'status' => 405 ) ); } @@ -144,6 +153,7 @@ abstract class WP_REST_Controller { * @return WP_Error|bool True if the request has access to delete the item, WP_Error object otherwise. */ public function delete_item_permissions_check( $request ) { + /* translators: %s: method name */ return new WP_Error( 'invalid-method', sprintf( __( "Method '%s' not implemented. Must be overridden in subclass." ), __METHOD__ ), array( 'status' => 405 ) ); } @@ -156,6 +166,7 @@ abstract class WP_REST_Controller { * @return WP_Error|WP_REST_Response Response object on success, or WP_Error object on failure. */ public function delete_item( $request ) { + /* translators: %s: method name */ return new WP_Error( 'invalid-method', sprintf( __( "Method '%s' not implemented. Must be overridden in subclass." ), __METHOD__ ), array( 'status' => 405 ) ); } @@ -168,6 +179,7 @@ abstract class WP_REST_Controller { * @return WP_Error|object The prepared item, or WP_Error object on failure. */ protected function prepare_item_for_database( $request ) { + /* translators: %s: method name */ return new WP_Error( 'invalid-method', sprintf( __( "Method '%s' not implemented. Must be overridden in subclass." ), __METHOD__ ), array( 'status' => 405 ) ); } @@ -181,6 +193,7 @@ abstract class WP_REST_Controller { * @return WP_Error|WP_REST_Response Response object on success, or WP_Error object on failure. */ public function prepare_item_for_response( $item, $request ) { + /* translators: %s: method name */ return new WP_Error( 'invalid-method', sprintf( __( "Method '%s' not implemented. Must be overridden in subclass." ), __METHOD__ ), array( 'status' => 405 ) ); } diff --git a/wp-includes/version.php b/wp-includes/version.php index 892cef12c6..2af66441b9 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.9-alpha-41590'; +$wp_version = '4.9-alpha-41591'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.