From 7922a909745f09366a81edbcb4e3c0c6d8d4942d Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Fri, 9 Jul 2021 10:57:59 +0000 Subject: [PATCH] I18N: Translate `_doing_it_wrong()` messages in `wp_check_widget_editor_deps()`. This makes them consistent with other similar messages in core. Follow-up to [51387], [51388], [51390]. See #53437, #53569. Built from https://develop.svn.wordpress.org/trunk@51391 git-svn-id: http://core.svn.wordpress.org/trunk@51002 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/version.php | 2 +- wp-includes/widgets.php | 16 ++++++++++++++-- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/wp-includes/version.php b/wp-includes/version.php index a3e9234101..46a53c889d 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -13,7 +13,7 @@ * * @global string $wp_version */ -$wp_version = '5.9-alpha-51390'; +$wp_version = '5.9-alpha-51391'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema. diff --git a/wp-includes/widgets.php b/wp-includes/widgets.php index 2d1eb5d8ef..61caf6af56 100644 --- a/wp-includes/widgets.php +++ b/wp-includes/widgets.php @@ -2035,14 +2035,26 @@ function wp_check_widget_editor_deps() { if ( $wp_scripts->query( 'wp-editor', 'enqueued' ) ) { _doing_it_wrong( 'wp_enqueue_script()', - '"wp-editor" script should not be enqueued together with the new widgets editor (wp-edit-widgets or wp-customize-widgets).', + sprintf( + /* translators: 1: 'wp-editor', 2: 'wp-edit-widgets', 3: 'wp-customize-widgets'. */ + __( '"%1$s" script should not be enqueued together with the new widgets editor (%2$s or %3$s).' ), + 'wp-editor', + 'wp-edit-widgets', + 'wp-customize-widgets' + ), '5.8.0' ); } if ( $wp_styles->query( 'wp-edit-post', 'enqueued' ) ) { _doing_it_wrong( 'wp_enqueue_style()', - '"wp-edit-post" style should not be enqueued together with the new widgets editor (wp-edit-widgets or wp-customize-widgets).', + sprintf( + /* translators: 1: 'wp-edit-post', 2: 'wp-edit-widgets', 3: 'wp-customize-widgets'. */ + __( '"%1$s" style should not be enqueued together with the new widgets editor (%2$s or %3$s).' ), + 'wp-edit-post', + 'wp-edit-widgets', + 'wp-customize-widgets' + ), '5.8.0' ); }