diff --git a/wp-admin/js/comment.js b/wp-admin/js/comment.js index fd347d448b..fcf703bf07 100644 --- a/wp-admin/js/comment.js +++ b/wp-admin/js/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/wp-admin/js/comment.min.js b/wp-admin/js/comment.min.js index c0e5b78a5d..0d56d7df50 100644 --- a/wp-admin/js/comment.min.js +++ b/wp-admin/js/comment.min.js @@ -1,2 +1,2 @@ /*! This file is auto-generated */ -jQuery(document).ready(function(m){postboxes.add_postbox_toggles("comment");var d=m("#timestampdiv"),c=m("#timestamp"),a=c.html(),o=d.find(".timestamp-wrap"),v=d.siblings("a.edit-timestamp");v.click(function(e){d.is(":hidden")&&(d.slideDown("fast",function(){m("input, select",o).first().focus()}),m(this).hide()),e.preventDefault()}),d.find(".cancel-timestamp").click(function(e){v.show().focus(),d.slideUp("fast"),m("#mm").val(m("#hidden_mm").val()),m("#jj").val(m("#hidden_jj").val()),m("#aa").val(m("#hidden_aa").val()),m("#hh").val(m("#hidden_hh").val()),m("#mn").val(m("#hidden_mn").val()),c.html(a),e.preventDefault()}),d.find(".save-timestamp").click(function(e){var a=m("#aa").val(),t=m("#mm").val(),l=m("#jj").val(),i=m("#hh").val(),n=m("#mn").val(),s=new Date(a,t-1,l,i,n);e.preventDefault(),s.getFullYear()==a&&1+s.getMonth()==t&&s.getDate()==l&&s.getMinutes()==n?(o.removeClass("form-invalid"),c.html(commentL10n.submittedOn+" "+commentL10n.dateFormat.replace("%1$s",m('option[value="'+t+'"]',"#mm").attr("data-text")).replace("%2$s",parseInt(l,10)).replace("%3$s",a).replace("%4$s",("00"+i).slice(-2)).replace("%5$s",("00"+n).slice(-2))+" "),v.show().focus(),d.slideUp("fast")):o.addClass("form-invalid")})}); \ No newline at end of file +jQuery(document).ready(function(m){postboxes.add_postbox_toggles("comment");var d=m("#timestampdiv"),c=m("#timestamp"),a=c.html(),v=d.find(".timestamp-wrap"),o=d.siblings("a.edit-timestamp");o.click(function(e){d.is(":hidden")&&(d.slideDown("fast",function(){m("input, select",v).first().focus()}),m(this).hide()),e.preventDefault()}),d.find(".cancel-timestamp").click(function(e){o.show().focus(),d.slideUp("fast"),m("#mm").val(m("#hidden_mm").val()),m("#jj").val(m("#hidden_jj").val()),m("#aa").val(m("#hidden_aa").val()),m("#hh").val(m("#hidden_hh").val()),m("#mn").val(m("#hidden_mn").val()),c.html(a),e.preventDefault()}),d.find(".save-timestamp").click(function(e){var a=m("#aa").val(),t=m("#mm").val(),i=m("#jj").val(),s=m("#hh").val(),l=m("#mn").val(),n=new Date(a,t-1,i,s,l);e.preventDefault(),n.getFullYear()==a&&1+n.getMonth()==t&&n.getDate()==i&&n.getMinutes()==l?(v.removeClass("form-invalid"),c.html(wp.i18n.__("Submitted on:")+" "+wp.i18n.__("%1$s %2$s, %3$s at %4$s:%5$s").replace("%1$s",m('option[value="'+t+'"]',"#mm").attr("data-text")).replace("%2$s",parseInt(i,10)).replace("%3$s",a).replace("%4$s",("00"+s).slice(-2)).replace("%5$s",("00"+l).slice(-2))+" "),o.show().focus(),d.slideUp("fast")):v.addClass("form-invalid")})}); \ No newline at end of file diff --git a/wp-includes/script-loader.php b/wp-includes/script-loader.php index cc24a17aa2..04994da384 100644 --- a/wp-includes/script-loader.php +++ b/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' ) ); diff --git a/wp-includes/version.php b/wp-includes/version.php index 58e7f73069..ee88899410 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -13,7 +13,7 @@ * * @global string $wp_version */ -$wp_version = '5.5-alpha-48394'; +$wp_version = '5.5-alpha-48395'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.