diff --git a/src/js/_enqueues/admin/comment.js b/src/js/_enqueues/admin/comment.js index fd347d448b..fcf703bf07 100644 --- a/src/js/_enqueues/admin/comment.js +++ b/src/js/_enqueues/admin/comment.js @@ -2,7 +2,7 @@ * @output wp-admin/js/comment.js */ -/* global postboxes, commentL10n */ +/* global postboxes */ /** * Binds to the document ready event. @@ -84,8 +84,9 @@ jQuery(document).ready( function($) { } $timestamp.html( - commentL10n.submittedOn + ' ' + - commentL10n.dateFormat + wp.i18n.__( 'Submitted on:' ) + ' ' + + /* translators: 1: Month, 2: Day, 3: Year, 4: Hour, 5: Minute. */ + wp.i18n.__( '%1$s %2$s, %3$s at %4$s:%5$s' ) .replace( '%1$s', $( 'option[value="' + mm + '"]', '#mm' ).attr( 'data-text' ) ) .replace( '%2$s', parseInt( jj, 10 ) ) .replace( '%3$s', aa ) diff --git a/src/wp-includes/script-loader.php b/src/wp-includes/script-loader.php index cc24a17aa2..04994da384 100644 --- a/src/wp-includes/script-loader.php +++ b/src/wp-includes/script-loader.php @@ -1224,17 +1224,8 @@ function wp_default_scripts( $scripts ) { $scripts->add( 'link', "/wp-admin/js/link$suffix.js", array( 'wp-lists', 'postbox' ), false, 1 ); - $scripts->add( 'comment', "/wp-admin/js/comment$suffix.js", array( 'jquery', 'postbox' ) ); - $scripts->add_data( 'comment', 'group', 1 ); - did_action( 'init' ) && $scripts->localize( - 'comment', - 'commentL10n', - array( - 'submittedOn' => __( 'Submitted on:' ), - /* translators: 1: Month, 2: Day, 3: Year, 4: Hour, 5: Minute. */ - 'dateFormat' => __( '%1$s %2$s, %3$s at %4$s:%5$s' ), - ) - ); + $scripts->add( 'comment', "/wp-admin/js/comment$suffix.js", array( 'jquery', 'postbox' ), false, 1 ); + $scripts->set_translations( 'comment' ); $scripts->add( 'admin-gallery', "/wp-admin/js/gallery$suffix.js", array( 'jquery-ui-sortable' ) );