From 2999960f51e6940c22383f36d970992edf44a4e1 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Fri, 9 Jul 2021 10:56:49 +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. git-svn-id: https://develop.svn.wordpress.org/trunk@51391 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/widgets.php | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/src/wp-includes/widgets.php b/src/wp-includes/widgets.php index 2d1eb5d8ef..61caf6af56 100644 --- a/src/wp-includes/widgets.php +++ b/src/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' ); }