diff --git a/wp-includes/script-loader.php b/wp-includes/script-loader.php index e5204a7aa0..cc401f6925 100644 --- a/wp-includes/script-loader.php +++ b/wp-includes/script-loader.php @@ -476,10 +476,11 @@ function wp_default_scripts( &$scripts ) { did_action( 'init' ) && $scripts->add_inline_script( 'wp-theme-plugin-editor', sprintf( 'wp.themePluginEditor.l10n = %s;', wp_json_encode( array( 'saveAlert' => __( 'The changes you made will be lost if you navigate away from this page.' ), 'saveError' => __( 'Something went wrong. Your change may not have been saved. Please try again. There is also a chance that you may need to manually fix and upload the file over FTP.' ), - 'lintError' => wp_array_slice_assoc( + 'lintError' => array( /* translators: %d: error count */ - _n_noop( 'There is %d error which must be fixed before you can update this file.', 'There are %d errors which must be fixed before you can update this file.' ), - array( 'singular', 'plural' ) + 'singular' => _n( 'There is %d error which must be fixed before you can update this file.', 'There are %d errors which must be fixed before you can update this file.', 1 ), + /* translators: %d: error count */ + 'plural' => _n( 'There is %d error which must be fixed before you can update this file.', 'There are %d errors which must be fixed before you can update this file.', 2 ), // @todo This is lacking, as some languages have a dedicated dual form. For proper handling of plurals in JS, see #20491. ), ) ) ) ); @@ -580,16 +581,18 @@ function wp_default_scripts( &$scripts ) { 'videoHeaderNotice' => __( 'This theme doesn’t support video headers on this page. Navigate to the front page or another page that supports video headers.' ), // Used for overriding the file types allowed in plupload. 'allowedFiles' => __( 'Allowed Files' ), - 'customCssError' => wp_array_slice_assoc( + 'customCssError' => array( /* translators: %d: error count */ - _n_noop( 'There is %d error which must be fixed before you can save.', 'There are %d errors which must be fixed before you can save.' ), - array( 'singular', 'plural' ) + 'singular' => _n( 'There is %d error which must be fixed before you can save.', 'There are %d errors which must be fixed before you can save.', 1 ), + /* translators: %d: error count */ + 'plural' => _n( 'There is %d error which must be fixed before you can save.', 'There are %d errors which must be fixed before you can save.', 2 ), // @todo This is lacking, as some languages have a dedicated dual form. For proper handling of plurals in JS, see #20491. ), 'pageOnFrontError' => __( 'Homepage and posts page must be different.' ), - 'saveBlockedError' => wp_array_slice_assoc( + 'saveBlockedError' => array( /* translators: %s: number of invalid settings */ - _n_noop( 'Unable to save due to %s invalid setting.', 'Unable to save due to %s invalid settings.' ), - array( 'singular', 'plural' ) + 'singular' => _n( 'Unable to save due to %s invalid setting.', 'Unable to save due to %s invalid settings.', 1 ), + /* translators: %s: number of invalid settings */ + 'plural' => _n( 'Unable to save due to %s invalid setting.', 'Unable to save due to %s invalid settings.', 2 ), // @todo This is lacking, as some languages have a dedicated dual form. For proper handling of plurals in JS, see #20491. ), 'scheduleDescription' => __( 'Schedule your customization changes to publish ("go live") at a future date.' ), 'themePreviewUnavailable' => __( 'Sorry, you can’t preview new themes when you have changes scheduled or saved as a draft. Please publish your changes, or wait until they publish to preview new themes.' ), diff --git a/wp-includes/version.php b/wp-includes/version.php index 38948f9075..a211a2df9b 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '5.0-alpha-42161'; +$wp_version = '5.0-alpha-42163'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema. diff --git a/wp-includes/widgets/class-wp-widget-custom-html.php b/wp-includes/widgets/class-wp-widget-custom-html.php index a75e264479..855c3c5895 100644 --- a/wp-includes/widgets/class-wp-widget-custom-html.php +++ b/wp-includes/widgets/class-wp-widget-custom-html.php @@ -175,10 +175,11 @@ class WP_Widget_Custom_HTML extends WP_Widget { wp_add_inline_script( 'custom-html-widgets', sprintf( 'wp.customHtmlWidgets.init( %s );', wp_json_encode( $settings ) ), 'after' ); $l10n = array( - 'errorNotice' => wp_array_slice_assoc( + 'errorNotice' => array( /* translators: %d: error count */ - _n_noop( 'There is %d error which must be fixed before you can save.', 'There are %d errors which must be fixed before you can save.' ), - array( 'singular', 'plural' ) + 'singular' => _n( 'There is %d error which must be fixed before you can save.', 'There are %d errors which must be fixed before you can save.', 1 ), + /* translators: %d: error count */ + 'plural' => _n( 'There is %d error which must be fixed before you can save.', 'There are %d errors which must be fixed before you can save.', 2 ), // @todo This is lacking, as some languages have a dedicated dual form. For proper handling of plurals in JS, see #20491. ), ); wp_add_inline_script( 'custom-html-widgets', sprintf( 'jQuery.extend( wp.customHtmlWidgets.l10n, %s );', wp_json_encode( $l10n ) ), 'after' );