From 3fc35855e9324da0172a1802c1e40a16112a5dd0 Mon Sep 17 00:00:00 2001 From: Andrew Nacin Date: Mon, 22 Apr 2013 19:04:02 +0000 Subject: [PATCH] Ensure that the resulting post time is localized after the date is changed. props SergeyBiryukov. fixes #24072. git-svn-id: https://develop.svn.wordpress.org/trunk@24046 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-admin/includes/template.php | 4 ++-- wp-admin/js/post.js | 11 ++++++----- wp-includes/script-loader.php | 2 ++ 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/wp-admin/includes/template.php b/wp-admin/includes/template.php index e74e51a1b2..51f7cc12e5 100644 --- a/wp-admin/includes/template.php +++ b/wp-admin/includes/template.php @@ -619,8 +619,8 @@ function touch_time( $edit = 1, $for_post = 1, $tab_index = 0, $multi = 0 ) { $minute = ''; echo '
'; - /* translators: 1: month input, 2: day input, 3: year input, 4: hour input, 5: minute input */ - printf(__('%1$s%2$s, %3$s @ %4$s : %5$s'), $month, $day, $year, $hour, $minute); + /* translators: 1: month, 2: day, 3: year, 4: hour, 5: minute */ + printf( __( '%1$s %2$s, %3$s @ %4$s : %5$s' ), $month, $day, $year, $hour, $minute ); echo '
'; diff --git a/wp-admin/js/post.js b/wp-admin/js/post.js index 96f1c801f4..6380eeca1b 100644 --- a/wp-admin/js/post.js +++ b/wp-admin/js/post.js @@ -483,11 +483,12 @@ jQuery(document).ready( function($) { } else { $('#timestamp').html( publishOn + ' ' + - $('option[value="' + $('#mm').val() + '"]', '#mm').text() + ' ' + - jj + ', ' + - aa + ' @ ' + - hh + ':' + - mn + ' ' + postL10n.dateFormat.replace( '%1$s', $('option[value="' + $('#mm').val() + '"]', '#mm').text() ) + .replace( '%2$s', jj ) + .replace( '%3$s', aa ) + .replace( '%4$s', hh ) + .replace( '%5$s', mn ) + + ' ' ); } diff --git a/wp-includes/script-loader.php b/wp-includes/script-loader.php index d8e6e6a3d3..65fb36c663 100644 --- a/wp-includes/script-loader.php +++ b/wp-includes/script-loader.php @@ -392,6 +392,8 @@ function wp_default_scripts( &$scripts ) { 'publishOn' => __('Publish on:'), 'publishOnFuture' => __('Schedule for:'), 'publishOnPast' => __('Published on:'), + /* translators: 1: month, 2: day, 3: year, 4: hour, 5: minute */ + 'dateFormat' => __('%1$s %2$s, %3$s @ %4$s : %5$s'), 'showcomm' => __('Show more comments'), 'endcomm' => __('No more comments found.'), 'publish' => __('Publish'),