Make WordPress Core

Ticket #50493: register_rest_route_3.patch.txt

File register_rest_route_3.patch.txt, 2.7 KB (added by Lwangaman, 4 years ago)
Line 
1From 4e48d97bb3540e0075a6fc7fc033925c68ca54ca Mon Sep 17 00:00:00 2001
2From: "John R. D'Orazio" <priest@johnromanodorazio.com>
3Date: Sat, 25 Jul 2020 15:45:54 +0200
4Subject: [PATCH] Update rest-api.php
5
6use 1. 2. in translator strings instead of %1$s %2$s
7---
8 src/wp-includes/rest-api.php | 8 ++++----
9 1 file changed, 4 insertions(+), 4 deletions(-)
10
11diff --git a/src/wp-includes/rest-api.php b/src/wp-includes/rest-api.php
12index 9c10a8292a..982605dedb 100644
13--- a/src/wp-includes/rest-api.php
14+++ b/src/wp-includes/rest-api.php
15@@ -40,7 +40,7 @@ function register_rest_route( $namespace, $route, $args = array(), $override = f
16                _doing_it_wrong(
17                        __FUNCTION__,
18                        sprintf(
19-                               /* translators: %1$s: string value of the namespace, %2$s: string value of the route */
20+                               /* translators: 1: string value of the namespace, 2: string value of the route */
21                                __( 'Routes must be namespaced with plugin or theme name and version. Instead there seems to be an empty namespace \'%1$s\' for route \'%2$s\'.' ),
22                                '<code>'.$namespace.'</code>',
23                                '<code>'.$route.'</code>'
24@@ -52,7 +52,7 @@ function register_rest_route( $namespace, $route, $args = array(), $override = f
25                _doing_it_wrong(
26                        __FUNCTION__,
27                        sprintf(
28-                               /* translators: %1$s: string value of the namespace, %2$s: string value of the route */
29+                               /* translators: 1: string value of the namespace, 2: string value of the route */
30                                __( 'Route must be specified. Instead within the namespace \'%1$s\', there seems to be an empty route \'%2$s\'.' ),
31                                '<code>'.$namespace.'</code>',
32                                '<code>'.$route.'</code>'
33@@ -68,7 +68,7 @@ function register_rest_route( $namespace, $route, $args = array(), $override = f
34                _doing_it_wrong(
35                        __FUNCTION__,
36                        sprintf(
37-                               /* translators: %1$s: string value of the namespace, %2$s: string value of the route */
38+                               /* translators: 1: string value of the namespace, 2: string value of the route */
39                                __( 'Namespace must not start or end with a slash. Instead namespace \'%1$s\' for route \'%2$s\' seems to contain a slash.' ),
40                                '<code>'.$namespace.'</code>',
41                                '<code>'.$route.'</code>'
42@@ -81,7 +81,7 @@ function register_rest_route( $namespace, $route, $args = array(), $override = f
43                _doing_it_wrong(
44                        __FUNCTION__,
45                        sprintf(
46-                               /* translators: %1$s: rest_api_init, %2$s: string value of the namespace, %3$s: string value of the route */
47+                               /* translators: 1: rest_api_init, 2: string value of the namespace, 3: string value of the route */
48                                __( 'REST API routes must be registered on the %1$s action. Instead route \'%3$s\' with namespace \'%2$s\' was not registered on this action.' ),
49                                '<code>rest_api_init</code>',
50                                '<code>'.$namespace.'</code>',