diff --git src/wp-includes/script-loader.php src/wp-includes/script-loader.php
index e5204a7aa0..cc401f6925 100644
|
|
function wp_default_scripts( &$scripts ) { |
476 | 476 | did_action( 'init' ) && $scripts->add_inline_script( 'wp-theme-plugin-editor', sprintf( 'wp.themePluginEditor.l10n = %s;', wp_json_encode( array( |
477 | 477 | 'saveAlert' => __( 'The changes you made will be lost if you navigate away from this page.' ), |
478 | 478 | '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.' ), |
479 | | 'lintError' => wp_array_slice_assoc( |
| 479 | 'lintError' => array( |
480 | 480 | /* translators: %d: error count */ |
481 | | _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.' ), |
482 | | array( 'singular', 'plural' ) |
| 481 | '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 ), |
| 482 | /* translators: %d: error count */ |
| 483 | '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. |
483 | 484 | ), |
484 | 485 | ) ) ) ); |
485 | 486 | |
… |
… |
function wp_default_scripts( &$scripts ) { |
580 | 581 | 'videoHeaderNotice' => __( 'This theme doesn’t support video headers on this page. Navigate to the front page or another page that supports video headers.' ), |
581 | 582 | // Used for overriding the file types allowed in plupload. |
582 | 583 | 'allowedFiles' => __( 'Allowed Files' ), |
583 | | 'customCssError' => wp_array_slice_assoc( |
| 584 | 'customCssError' => array( |
| 585 | /* translators: %d: error count */ |
| 586 | '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 ), |
584 | 587 | /* translators: %d: error count */ |
585 | | _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.' ), |
586 | | array( 'singular', 'plural' ) |
| 588 | '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. |
587 | 589 | ), |
588 | 590 | 'pageOnFrontError' => __( 'Homepage and posts page must be different.' ), |
589 | | 'saveBlockedError' => wp_array_slice_assoc( |
| 591 | 'saveBlockedError' => array( |
| 592 | /* translators: %s: number of invalid settings */ |
| 593 | 'singular' => _n( 'Unable to save due to %s invalid setting.', 'Unable to save due to %s invalid settings.', 1 ), |
590 | 594 | /* translators: %s: number of invalid settings */ |
591 | | _n_noop( 'Unable to save due to %s invalid setting.', 'Unable to save due to %s invalid settings.' ), |
592 | | array( 'singular', 'plural' ) |
| 595 | '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. |
593 | 596 | ), |
594 | 597 | 'scheduleDescription' => __( 'Schedule your customization changes to publish ("go live") at a future date.' ), |
595 | 598 | '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 src/wp-includes/widgets/class-wp-widget-custom-html.php src/wp-includes/widgets/class-wp-widget-custom-html.php
index a75e264479..855c3c5895 100644
|
|
class WP_Widget_Custom_HTML extends WP_Widget { |
175 | 175 | wp_add_inline_script( 'custom-html-widgets', sprintf( 'wp.customHtmlWidgets.init( %s );', wp_json_encode( $settings ) ), 'after' ); |
176 | 176 | |
177 | 177 | $l10n = array( |
178 | | 'errorNotice' => wp_array_slice_assoc( |
| 178 | 'errorNotice' => array( |
179 | 179 | /* translators: %d: error count */ |
180 | | _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.' ), |
181 | | array( 'singular', 'plural' ) |
| 180 | '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 ), |
| 181 | /* translators: %d: error count */ |
| 182 | '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. |
182 | 183 | ), |
183 | 184 | ); |
184 | 185 | wp_add_inline_script( 'custom-html-widgets', sprintf( 'jQuery.extend( wp.customHtmlWidgets.l10n, %s );', wp_json_encode( $l10n ) ), 'after' ); |