From 4ae6eb612c310dbb06feaaa83bfc2e078133409a Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Wed, 28 Sep 2022 14:02:35 +0000 Subject: [PATCH] I18N: Move code out of a translatable string in `register_rest_route()`. To simplify the string and exclude any parts that don't require translation, `$args` can be moved out of the string and added as a placeholder. Follow-up to [54339]. See #51986. git-svn-id: https://develop.svn.wordpress.org/trunk@54346 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/rest-api.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/wp-includes/rest-api.php b/src/wp-includes/rest-api.php index 47b922bcd8..ae1e714ea8 100644 --- a/src/wp-includes/rest-api.php +++ b/src/wp-includes/rest-api.php @@ -108,8 +108,9 @@ function register_rest_route( $namespace, $route, $args = array(), $override = f _doing_it_wrong( __FUNCTION__, sprintf( - /* translators: %s: The REST API route being registered. */ - __( 'REST API $args should be an array of arrays. Non-array value detected for %s.' ), + /* translators: 1: $args, 2: The REST API route being registered. */ + __( 'REST API %1$s should be an array of arrays. Non-array value detected for %2$s.' ), + '$args', '' . $clean_namespace . '/' . trim( $route, '/' ) . '' ), '6.1.0'